4 ms·
Parentheses aren't an issue if you write Lisp in Emacs.
by sn9 9y ago
Parentheses aren't an issue if you write Lisp in Emacs.
- hellofunk 9y agoYou don't need emacs for good parenthesis control. The same tools emacs uses for this are available in about a dozen editors at least. Vim, Atom, Cursive/IntelliJ, Eclipse, Sublime Text, it's pretty common in most good editors.
- platz 9y agoUnderstanding programs with recusion requires actually programming with recusion that many devs just aren't exposed to. It's just not the dominant paradigm
- yogthos 9y agoExplicit recursion is rarely used in FP, and it's often a code smell. It's almost always better to use higher order functions instead. The advantage is that you can implement a particular transformation once, check for edge cases, and reuse it from there on. You also end up with declarative code that talks about what it's doing without distracting your with implementation details. Clojure has a rich set of functions for manipulating data such as map, filter, reduce, and so on. There are also libraries such as Specter https://github.com/nathanmarz/specter https://github.com/nathanmarz/specter that allow you to declaratively transform complex data. I highly recommend watching this https://youtu.be/rh5J4vacG98 https://youtu.be/rh5J4vacG98 short video to see how it works.
- platz 9y agoYou misinterpret my comment thinking it is a statement about myself, when it is a statement about the wider programming community.
- yogthos 9y agoMy point is that you don't really program with recursion in Clojure, so it's not an actual problem for people using the language.
- platz 9y agoMy point is that there is a learning curve no matter which way you slice it, as one must also learn to use higher-order functions effectively (I do not believe mainstream devs know this innately) and this is an obstacle for newcomers.
- yogthos 9y agoPretty much all mainstream languages use higher order functions nowadays, it really shouldn't be a foreign concept at this point.
- platz 9y agoThe basics of HOF are not foreign concepts at this point (e.g. map, filter). But FP amplifies the degree and nature in which they are used. for example learning to use folds or transducers. Learning to avoid mutation etc
- cutler 9y agoWhy is learning a few FP concepts considered more taxing than the all the cruft which accompanies OOP? My experience is that FP concepts and idioms are a breath of fresh air compared with OOP design patterns.
- platz 9y agoIt is not 'more taxing'. It is less familiar and implies an effort to learn for an existing dev. (I am talking about existing devs, not those learning their first language). The issue for those folks is not absolute difficulty but motivation.
- yogthos 9y agoYou don't even have to use Emacs nowadays. Atom has lisp-paredit and parinfer package, VS Code has paredit, Cursive has a structural mode, and so on.