Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Scheme is not a pure functional language

I think OP wittily conflates 2 senses of pure. Scheme is purely functional in the sense that it's _only_ functional, as opposed to a hybrid like Scala, as OP points out.

But it's not purely functional in the sense of Haskell, that famous flagship of effect-less programming. Here 'pure' is contrasted against _effectful_ functions.



In Scheme, everything is an expression and because of macros and mutability not all expressions are functions in any sense beyond that by which we commonly use 'function' as a synonym for 'programming procedure'. What Scheme doesn't have is a symantics that distinguishes between statements and expressions.


Good point about the macros and mutability.

There's FP vs imperative and then there's FP vs OOP. Scala is the FP-OOP hybrid and Scheme is the FP-imperative hybrid.

These are vast simplifications but useful to start a conversation with. Thanks!


Excellent summary. Yes, I did indeed conflate these two meanings of "pure" because I didn't want to get my post side-tracked into a discussion of this point.

Unfortunately if you want a language with industrial strength tools and libraries that is pure in the effect-less sense, Haskell is the only choice. So when I try to talk about the issue of effect management it sounds like I'm merely plugging my favourite language instead of making an argument about the importance of a fundamental property.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: