3 ms·
J and K remind me of the essay about the Lisp Curse[0], which mentions that the expressiveness of the language became a sort of Achilles heel in its culture. It
by nonbirithm 6y ago
J and K remind me of the essay about the Lisp Curse[0], which mentions that the expressiveness of the language became a sort of Achilles heel in its culture. It talks about people writing their projects in Lisp and not expecting other people to adapt to their conventions or combine their efforts on one library, where every solution worked well enough initially - but only for one person, its author.
In K the error messages are far harder to understand than most languages, and you'd need either enough comments or many hours of experience with the language to understand what a piece of code does, due to its sheer expressiveness. Also, there's comparatively less documentation for when you're trying to do something practical. I can't imagine introducing J or K in an open source project will be helpful if other contributors have to catch up to my understanding of the language and need to internalize and remember which single-character symbols mean "print" or "iter." I imagine that at least a Python programmer could reasonably understand the gist of a similar Ruby program, merely due to the fact that "class" and "map" and "length" are sequences of characters that usually show up in both languages. Not so with K.
Still, I find the vastly different ways of doing things with K interesting to see, even if I will only use it personally.
[0] http://winestockwebdesign.com/Essays/Lisp_Curse.html http://winestockwebdesign.com/Essays/Lisp_Curse.html
- ggrrhh_ta 6y agoVery interesting link.
- coliveira 6y agoThat is fine. Most people simply cannot drive a Formula-1 car, but it would be stupid to conclude that a F-1 is a cursed car and nobody should want to drive one. Similarly, a few languages can only be used by highly trained people who understand well how it works. Lisp, Forth, and J are in that category of tools that require highly trained people. In their hand, one of these languages can do fantastic things, in the hands of an average programmer you have nothing.
- dunefox 6y agoLisp without macros can be and is used by 'normal programmers'. And even with macros it's not like it's witchcraft that only a select few can handle. It's a powerful language, but nonetheless a language that everyone can learn.
- mandus 6y agoThat is actually a nice analogy! No one, not even the pro formula-1 drivers will want to drive a f1 car in regular traffic. Much the same with these languages (apls, lisps, forth, etc); they have their place and role, but is better not used in regular open source or commercial codes.
- dunefox 6y agoThat is absolutely false. I have seen absolutely horrible "clever" code hacks in Java production code - absolutely opaque and extremely complicated. Lisp is definitely a good choice for 'regular open source or commercial code'.
- galaxyLogic 6y agoIt's about redundancy. Code in other languages has much more of it, and that is good for understandability, recognizability. With less redundancy it is easier to make errors both in writing AND reading of code. APL is like compressed code. The redundancy has been compressed out. Therefore reading a page of APL is like reading a book in other languages. Even though the text is shorter you still have to understand as much of program behavior. Reading APL means reading something FAST and we know that it is easy to have errors whenever you try to do something fast, say like typing very fast.
- dunefox 6y ago> With less redundancy it is easier to make errors both in writing AND reading of code. I don't really see that. Boilerplate code is not helpful for clarity or correctness. It's just more code that you have to write that can introduce errors.
- galaxyLogic 6y agoThe errors you introduce into boilerplate code are trivial syntax errors easy to spot by the parser. The difficult errors are the semantic ones because the parser can not catch them. Think about human languages. They have large amounts of redundancy and for a good evolutionary reason I believe. It is easier to distinguish meaning when words around a given word anchor it into a specific context. Redundant languages have a built-in error-correcting code built into them. They take more bits to transmit but those extra bits correct, and help detect errors.
- moonchild 6y agoActually, it's somewhat the opposite. The lisp curse refers to the ways in which lisp can easily be extended with nonstandard or bespoke features. Apl relies much more heavily on primitives; they are so expressive and general that you often don't even need to add functions. This gives the code more universality (assuming you know the language, which I expect should be a given).