3 ms·
Yes, but your comparison isn't fair. How many distinct functions does TXR Lisp have? I guarantee you that k has less. Moreover, if I can do something in a coup
by smabie 7y ago
Yes, but your comparison isn't fair. How many distinct functions does TXR Lisp have? I guarantee you that k has less.
Moreover, if I can do something in a couple of characters, why do I need names? This trend towards huge stdlibs and intellisense and heavyweight IDEs is ridiculous. I can write k or q with notepad if I felt like it. The ability to understand the entire language and never have to reach for documentation is very powerful.
I've noticed you criticizing k and array languages in general in some other threads so I'm going to ask you a genuine question: do you have any experience with them? Not even professional experience, just like, spent a weekend programming something cool? Because before I tried them I was very dismissive and now I absolutely adore k.
- kazinator 7y ago> How many distinct functions does TXR Lisp have? A few more than it had a month ago. When you can name things in any way you want, the sky is the limit. You have to watch the image size and startup times, of course. Nowadays you can cram a lot into something that is tiny by modern standards. > Moreover, if I can do something in a couple of characters, why do I need names? Firstly, those characters are names. Secondly, you need bigger names than one character if you want more functions, so then you have a better choice of functions for writing programs that are smaller in terms of the number of operations they combine. Note also that my second example: (defun merge-hashes (hlist) [group-reduce (hash) car (op cons (cdr @2) @1) [mappend hash-alist hlist]]) doesn't introduce any names, other than the one it is defining, merge-hashes and the local variable/parameter hlist. Everything else is a built-in, resulting in "point-free" style. If by "why do I need names" we mean locally introduced names for intermediate values, I completely agree. I don't need to introduce names if I can achieve the calculation just by a functional combination of operations.
- smabie 7y agoI mean, I'm just saying that most functions are unnecessary. We don't need them, and they actually make things worse. For example, I just counted, and q has a total of 209 distinct functions in the language (and that's pretty large for some apl/k purists). And it's not like the language is lacking functionality, additional functions are simply not necessary. Compare that to really any other non-trivial language, and the difference is pretty stark. Like, look at Common Lisp, for example.