3 ms·
ML-like and Lisp-like languages tend not to be pure. There are mainly 3 kinds of pure functional programming languages: theorem provers, research languages, and
by danharaj 11y ago
ML-like and Lisp-like languages tend not to be pure. There are mainly 3 kinds of pure functional programming languages: theorem provers, research languages, and languages descended from Miranda. Both sides of the purity design spectrum are influential, popular, and used in industry. So i don't think it's "hipsterism" that explains why purity has been successful in certain functional programming languages.
The research languages are mostly shaped by the idiosyncrasies of the researchers who developed them. The theorem provers are pure functional because no one actually wants to run the programs they write. This leaves Miranda-style languages.
Miranda was pure for design reasons: Miranda was also a lazy language. Having unrestricted side effects in a lazy language is almost completely unworkable. This tension between side effects and laziness 'protects' lazy languages from giving into the siren call of side effects as Simon Peyton Jones puts it. Without laziness, they often give in.
So between your example and mine, it seems that some technical capability enabled by purity is the primary motivator for a continued culture of purity. With Miranda, it was laziness that required purity. The inference is that those languages became popular because laziness was useful enough to create a community in the first place: no culture of purity without community of users. Smalltalk's development environment was a similar kind of highly valuable and distinguishing feature.
The abstract notion that purity is better for developers doesn't carry enough value. It's only when it's translated into concrete capabilities that it starts being considered.