A general programming discussion community.
Rules:
- Be civil.
- Please start discussions that spark conversation
Other communities
Systems
Functional Programming
Also related
- 0 users online
- 5 users / day
- 14 users / week
- 44 users / month
- 138 users / 6 months
- 1 subscriber
- 336 Posts
- 544 Comments
- Modlog
A pure functional program can not have any I/O, but yes, they exist.
They’re generally considered pretty useless in terms of our modern view of what a computer should be (an interactive object) instead, purely functional languages are great for traditional computers (something used for computing i.e. math solutions).
Purely functional languages can do extremely complex things but, at the end of the day, you’re writing a program to solve a single starting state and that program will always resolve to the same output (and the occasional rabid functional purist will argue that a program “return” is itself a side effect).
I love functional-ish programming, where as much of the program as I can manage is side effect free and those aide effects are limited to the fringes of the program where it needs to interact with I/O (read/writing from a disk, database, cli, GUI, whatever) as that seems like the most powerful balance to me.
Oh, and lately, I’ve done a lot of my functional programming in PHP… most modern languages have a good support for functional programming in a limited context.
Lambda calculus