Hacker News new | past | comments | ask | show | jobs | submit login

What's obvious to some is obtuse to others.

Take iterating and filtering as a prominent example. For some, the functional approach highlights the operations themselves and avoids boilerplate. For others, the indentation of traditional loops and conditions alone is worth that.

Usually there's a certain language culture attached to that. A Perl programmer sees "map sort map" and knows what's going on, everyone else is just going "Schwartzian what?". A big problem with JavaScript is that it doesn't have a culture that points in a specific direction, so you're bound to encounter all kinds of approaches, and none is really "native".

Swift probably isn't as bad, but it'll hit the same cultural barriers from time to time, depending on the previous experience and general environmental conditioning of the programmers.




I wholeheartedly agree. I’ll just mention that this is especially acute in Haskell. Haskell is widely considered to be a language with a steep learning curve, but for experts and experienced ones it is easy to lose track of how advanced the code really is and how obtuse it is to a beginner. The lens library is the best example. I often write extremely concise data structure manipulation code that composes lenses, prisms, getters and traversals, sometimes using (->) other times using Indexed as the profunctor. It’s obvious to me but I’m sometimes told at code review time that it’s too hard to understand.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: