I'm inclined to dump the mindset, but not the abil...
# thinking-together
d
I'm inclined to dump the mindset, but not the ability of languages to act in an imperative/mutable way - an impure language seems necessary to express some useful and fast algorithms, but the default mode of thought should be more functional rather than imperative, message passing + immutable data sharing rather than shared mutable memory. (But I think currying - saying
(+) 1
instead of
x => x + 1
- tends to be confusing and isn't worth the keystrokes it saves. And fundamentally it doesn't match how modern computers work. Arguably Haskell's always-lazy-eval has similar, if lesser, problems.)
👍 1
n
One alternative syntax for currying like work is wildcards: ? + 1. "And fundamentally it doesn't match how modern computers work." - Yep and that's why I use only x86 asm.</s> 😅
d
I guess that's a joke but to be clear, it's not just x86--I've never heard of a processor or a popular VM that supported currying; functions / calling conventions always take argument tuples. It would be convenient to have a shorter lambda syntax like
=> # + 1
or such, but it's syntactic sugar, not currying.
n
Yea I think fundmental difference between currying and normal lambda is ability not to care about number of parameters. However you get pretty much same effect if you can pass list of values as arguments. In any case it's odd to limit your thinking about 'how iron fundamentally works' when topic is how Von Neumann-architecture is dominating.
And I could imagine that there is VM that support that but if it's not popular so what...
g
not to be the person always bringing up the same stuff every time (just in the midst of this particular research rabbit hole) but concatenative languages like forth can be very close to the metal and directly support point free programming albeit not in exactly the same way