5 ms·
Sick article. I'd say I'm a reluctant advocate of this style, and the author touched upon the two points that I always present to my colleagues: 1. The focus o
by jim-jim-jim 6y ago
Sick article. I'd say I'm a reluctant advocate of this style, and the author touched upon the two points that I always present to my colleagues:
1. The focus on verbs can make things clearer.
2. Under ideal circumstances, it's no more complex than Unix pipes.
But I'm still not 100% convinced it makes for more readable code. Sometimes I still need variable names for documentation purposes. This isn't so bad in Haskell, since the type signature can make the intention known, but something like J...
- remexre 6y agoI've been trying to write a bunch of Forth, and I've gotta say stack comments (essentially type signatures, though typically not checked) are invaluable; that, and making definitions small enough that you can verify that they're obviously correct within a few seconds. (Typically, most definitions are one-liners.)
- throwaway_pdp09 6y ago> Sick article A little red-faced here but I don't know if you're saying it's good or bad (suspect former but not sure). Matters as upon it depends whether I read the article or not, so... help me out? :)
- jim-jim-jim 6y agoSick = good
- timbit42 6y agoShows your (lack of) age.
- h3rald 6y agoHaving created a small concatenative language myself[1], no, the pure concatenative style with no variables and stack combinators is just too much for a normally-wired brain. BUT! I tried to cheat a little bit to make things more readable. Take this example from the min front page, which showcases its concatenative style: . ls-r (mtime now 3600 - >) filter Can you guess what it does? You might, but what about this: . ls-r :files ((mtime > (now - 3600)) ><) =changed-in-last-hour @files #changed-in-last-hour filter Now ok, I went insane with sigils and weird operators but: - creating variables helps - using infix notation via the infix-dequote (><) operator makes expressions much more readable Why would I use this rather than a traditional language? It helps reasoning in terms of point-free function composition and in some case it is faster to work with, i.e. processing rules, pipelines, task sequences etc. [1] https://min-lang.org https://min-lang.org