Hacker News new | ask | show | jobs
by Stevvo 2618 days ago
You want others to be able to contribute to your codebase, humans don't think in a functional and deceptive manner; we think imperatively.
4 comments

Quite to the contrary, the limitations of functional languages are intended to make code easier to reason about for humans. Making small programs is one thing, but the combinatorial explosion in potential states as you approach large programs and systems of programs make it difficult to near impossible for humans to reason about software. You can only keep so much in your head at any given time.
Even so, you can write code imperatively in scheme, it's just a bit less natural. The keyword 'begin' has the same semantics as common lisp's 'progn', which allows imperative code to be written.

I was careful to say "functional-first". Racket has a fully-fledged object system, too.

I find I am a much "better" programmer in Scheme than in any other language, in the sense that idioms that I would normally struggle to express (at all, let alone cleanly) simply flow out as if I had invented them myself. Programming in Scheme is hugely fun.

If it were true that humans thought "imperatively", then we'd all still be using languages with GOTO.

I'm not sure that's true. You can get used to anything.