3 ms·
Great. I was wondering if anyone is interested in writing a book or a blog titled something to the effect of "all the brutal concepts in the languages you want
by meshuggah 11y ago
Great. I was wondering if anyone is interested in writing a book or a blog titled something to the effect of "all the brutal concepts in the languages you want to learn or respect." For example, monads in Haskell, macros and continuations in Scheme...Maybe languages like C, Forth, Prolog, Smalltalk etc also have such arcane concepts that "scare" people??
- pklausler 11y agoI don't know about scaring people, but many programming languages have concepts that are best demonstrated with small examples that make people say "whoa". For example, it's amazing that append() in Prolog can be run "backwards" from the concatenated result to yield all the lists that can be concatenated to produce it. Or that the monadic bind operator in Haskell (>>=) can be defined in terms of join and fmap, or that ($) = id. Programming languages have idiomatic expressions, and learning why they do what they do can produce enlightenment. It's no accident that C supports syntax like 3["hello"]. It looks mysterious, but not when you know that x[y] == *((x)+(y)) by definition. APL was especially rich in idiomatic expressions; I suppose that it's a sign of having easily composed primitives.
- Patient0 11y ago($) = id !? < tries it out in Raskell/Ghci > I see now why it's true, but still... Whoah!! Thanks for that! I think your suggestion would make a terrific online book.