Brian Adkins wrote at 07/12/2014 04:19 PM:
Thanks for the advice Neil. I'm a little confused by your "Racket is an imperative 
language" statement though - it seems quite "functional" to me, which was one of the 
attractions.
[...]

Racket can be used as a functional language, so long as one remembers that it's mostly an algorithmic language with an imperative and sequential evaluation model, with not much obvious magic.

I often see Racket code that (among other problems) looks like the programmer sometimes thinks they are using a declarative language, or code that would be more defensible if Racket were doing lazy evaluation. What should be O(1) becomes O(n), O(n) becomes O(n^2), constant cost per n increases orders of magnitude unnecessarily, etc.

I think that Racket's closure application is pretty easy to understand if people are sat down and walked through it. I suspect people get confused by having lots of different models thrown at them, or they kinda skip over the evaluation model introductory info, or they're exposed to the evaluation model very early on (while overwhelmed with concepts) but then don't go back and re-learn the intro stuff later (after they have internalized more context to anchor).

Neil V.

____________________
 Racket Users list:
 http://lists.racket-lang.org/users

Reply via email to