3 ms·
"Working without names (also known as implicit or tacit or point-free programming) is sometimes a more natural and less irritating way to compute. Getting rid o
by praptak 1y ago
"Working without names (also known as implicit or tacit or point-free programming) is sometimes a more natural and less irritating way to compute. Getting rid of names can also lead to much more concise code. And less code is good code."
Does Forth really reduce the burden of naming things? You don't name results but don't
you have to pay for it with the burden of naming words? (My impression is that there's more words in a Forth program than functions in an equivalent program in a language that has named variables).
- 7thaccount 1y agoThe quote makes more sense IMO for array languages like J that support a tacit style. J's "trains" just make things flow without a lot of variables. Aaron Hsu's Co Dfns compiler (spoken about on here and YouTube) also uses this style with Dyalog APL. Forth is concatenative, so you can build the words on top of each other without worrying about a ton of variables. So I think it's partially true for Forth.
- vdupras 1y agoYeah, I wouldn't have phrased it like in the article either. What I'd say is that Forth is more about naming processes than variables.
- astrobe_ 1y ago> Does Forth really reduce the burden of naming things? I would say that you have less names, but they are more important. Plus, it is more difficult to name things because you prefer short names; in all languages, when you have a good naming "discipline", follow a naming convention, you end up with an informal "grammar" inside of your names. In Forth this is even more important. > My impression is that there's more words in a Forth program than functions in an equivalent program in a language that has named variables Yes, some people have called that "ravioli code" or "confetti code", IIRC. But most of them are support words. In Forth, you also eventually end up with "module APIs". This also exists in C or Java or ..., except the ratio useful:support is lower.