3 ms·
And this works as long as everyone is fully committed to functional programming and you have little to no turn over or a small dedicated team. The minute you s
by alttab 12y ago
And this works as long as everyone is fully committed to functional programming and you have little to no turn over or a small dedicated team.
The minute you step into the standard industry things change a little bit. I once maintained an amazing piece of javascript that did dynamic server requests and rendered graph data, processed user input, changed views, and make lasting configuration changes to the database. The first 30 or so lines of code was simply setting up the functional haskellish environment for javascript, and the last 40 lines + 40 lines of HTML put everything else together. It was terse, compact, elegant, and impossible to maintain or make wider changes after the original author had moved on. It was tightly contained into one piece of the code, so not something that will be seen on the mainline easily. Going in and fixing any tiny little bug forced any unfortunate developer to immediately learn Chinese. Someone was tasked to re-write it so the rest of the team could maintain it effectively.
I like ruby/python a lot because it meets in the middle fairly easily, and doesn't require contortions to the natural intent of the language to get rid of cruft.
- the_af 12y agoPlease note I specifically said I wasn't talking about javascript or languages with dynamic typing in general. I'm not fluent in javascript and the only js code I've looked at in my current job is HORRIBLE, and it isn't functional-style code. We are phasing it out because no-one wants to touch it. I was talking about currying and FP in nicer languages.
- alttab 12y agoAnd that's fine. The concept of functional programming (currying, etc) is still difficult to execute on a large team or in a long-running code base with developer turn over. That said, new programmers are born everyday and they are finding themselves in a world we didn't. A lot of kids these days love python so they get introduced to list comprehensions quickly. C++ or Java never gave you that right away.