I am also unconvinced that the imperative nature of many languages is the problem. Not sure what it is.
(let* ((a 1) (b a))
(+ a b))
is an abbreviation for (let ((a 1))
(let ((b a))
(+ a b))))
which, in turn, is a syntactic sugar for ((lambda (a)
((lambda (b)
(+ a b)) a)) 1)
There is no "assignment", only lexicaly scooped bindings, which are "stateless" and "declarative".Looping constructs in Racket are just syntactic sugar - layered macros, based on what they call "contracts", I suppose.
In CL looping constructs are micro-DSLs.
I think tel is mostly on the right track of what I mean when I compare Racket to traditional ALGOL languages, but it is also true to say that Racket is not strictly non-imperative either: it is ultimately a multi-paradigm language, just one that culturally leans harder towards a functional-declarative style. My early projects were just as lousy with mutable state and in-order processing as anything I wrote in Python; but I got better.
I think what really drove me to Lisp and FP languages was the notion of nearly everything being first-class values, from functions to objects, and it's this quality, compared to the tedium of building yet another !"¤&¤&! constructor pattern that really attracted me. This, plus things like macros, the way the language allows for function composition so readily, is what made Lisp feel like 'how programming should've been all along' for me. Haskell as well induced that same reaction in other ways (mmm ... curry ...), though I'm still not entirely convinced that such strict purity is practical.
And I like currying and such, as well. Even use it in Racket quote often. Isn't too uncommon to see something like in my projects.
((compose
(curry func1 val1)
func2
func3) seed)
I think what really makes Racket so amazing to me is just how easy it is to iteratively write a function. Start with a core, and gradually append around it more and more till it is done. Testing with values throughout the whole process.I also like the literature around Lisp. Land of Lisp and SICP are both very well written and just plain fun to read.
Today I wrote a struct system in 29 lines of code. Kinda hard sometimes to do that and then even think about going back to, well, much of anything but another Lisp or composable FP language, really.