3 ms·
It's not just a matter of syntax. It's what some people call the difference between expression (which are mathematical) and statements (which are harder to mana
by T_S_ 15y ago
It's not just a matter of syntax. It's what some people call the difference between expression (which are mathematical) and statements (which are harder to manage mathematically). Check out Hughes' well known paper or some discussions about it. <http://weblog.raganwald.com/2007/03/why-why-functional-programming-matters.html> http://weblog.raganwald.com/2007/03/why-why-functional-progr...;
I simply point out this feature because most people focus on language features and this is "programmer feature" that you might not think of if it wasn't pointed it out.
- silentbicycle 15y agoOr, put another way, statement-based languages vs. expression-based languages. Strictly speaking, they can be equivalent, but each pushes code in different directions by default. (And for the whole "= means mutate-variable" thing, I think "<-" is a good operator.)
- mahyarm 15y agoSqueak smalltalk has the <- character. It's actually the '_' character but displays as a one character width left arrow. You can also use :=