4 ms·
So you won't have to spend an eternity to reverse engineer the syntax of a language you don't know. Like a lean Chinese book written in Chinese would be a bit c
by kowdermeister 9y ago
So you won't have to spend an eternity to reverse engineer the syntax of a language you don't know. Like a lean Chinese book written in Chinese would be a bit counter productive intended for westerners.
- rajman187 9y agoIt's a terrible language in general, so your analogy doesn't really work. It would be really easy to introducs this in python, for example. If it takes someone an eternity to reverse engineer python then there is a bigger problem here than learning functional programming...
- kowdermeister 9y agoWhich of JavaScript's terribleness appears in the examples provided by the article? I was referring to fully functional languages. I love Python too, however its lambdas have a bit weird syntax.
- wruza 9y agoEven “why javascript” link has error in it. And I spotted it not even writing js daily, probably because of the fact that it is such a joke.
- kowdermeister 9y agoThat "error" is an urlencoded question mark. If that's your biggest problem, fine, but point fingers at GitHub :)
- wruza 9y agoIt is not in url, it is in the text “equivalent”.
- Veen 9y agoHowever much it might pain you, JavaScript is the most popular programming language on the planet. Most developers who are interested in learning functional programming are JavaScript developers. It would be boneheaded to use anything other than JavaScript.
- shakna 9y ago> It would be boneheaded to use anything other than JavaScript. There's a whole heap of really easy to read languages that are used to explain this kind of thing. Scheme and SICP come to mind, for example.
- marcosdumay 9y ago> Most developers who are interested in learning functional programming are JavaScript developers. Whatever they believe, they will probably gain much more from learning a second language (any second language) than by learning about functional programming jargon.
- floor__ 9y agoInstead of criticizing the language used why don’t you create the same style of informative website for whatever language you want? It would be pretty neat to have the same website with the option to select what language to see the examples.
- eru 9y agoAnd JavaScript has enough functional support to be able to express the concepts. Some of the more type-y stuff is a bit harder to describe, though. But I think it's a worthwhile tradeoff for ease of accessibility. (Now using C++ would have been truly boneheaded---since they don't have first-class functions in that language.)
- AzzieElbab 9y ago"Now using C++ would have been truly boneheaded ..." https://bartoszmilewski.com/2015/01/20/functors/ https://bartoszmilewski.com/2015/01/20/functors/
- eru 9y agoYes, you can do it in C++. But it's not a good medium for teaching those concepts. (The excellent article you linked to explains them in Haskell first, and then shows how to do them in C++ only afterwards.)
- wruza 9y agoIt always wondered me why javascript people would spend an eternity to get a new syntax. Is it afterpain of learning the precedence or []+{} rules? It is not that bad in other languages, and no, it is not Chinese, let you believe.
- TuringTest 9y agoUnderstanding Haskell syntax requires a lot more than learning the precedence of []+{}. Plus, if you already have a very chewy and hard topic to learn, adding a new PL syntax on top of it certainly won't help.
- kowdermeister 9y agoI can get usually into new syntax fairly fast, but with languages like Haskell, where the syntax and the concepts also new, then complexity just rise exponentially for me and I have too many questions with too few answers, so I lose interest.
- ashark 9y agoApparently-idiomatic (I think—I can't tell) Haskell reads like line noise mixed with pig latin to me. I've bounced off it harder than any other programming language I've ever taken more than 15 seconds to try to understand. It makes me feel the way I assume dyslexic people feel.
- klibertp 9y agoIt's not "Haskell syntax" - the language itself doesn't have that many syntactic constructs. The "line noise" feeling comes from the ability to define new operators with custom precedence and associativity and the fact that people use the custom operators for everything. I don't know why it is so - OCaml also allows you to define your own operators, but OCaml programmers tend to use that ability much less frequently.