3 ms·
I'm too much of a noob to know what I'm talking about but so far this series of talks has convinced me FP with strong typing brings something new to the table i
by greggman 10y ago
I'm too much of a noob to know what I'm talking about but so far this series of talks has convinced me FP with strong typing brings something new to the table in the same way that say C brings something over assembly and s expressions in lisp bring something over non s expression languages.
http://fsharpforfunandprofit.com/ http://fsharpforfunandprofit.com/
In particular this example convinced me I'm missing out on something
http://fsharpforfunandprofit.com/posts/designing-for-correctness/ http://fsharpforfunandprofit.com/posts/designing-for-correct...
- kazinator 10y agoWell, C brings ... functional programming over assembly, right? Look, calculation with machine words, but without side effects: int x = 42; int y = x / 2; double z = sqrt(x*x + y*y); return 1 + z; We're just binding fresh variables, and nesting expressions that evaluate terms and return results. No assignment anywhere. Yes, functional programming matters. It lets you add two things together in C without worrying about allocating a destination operand for the result, whose clobbering won't affect anything anywhere else. This sort of thing in turn makes it a heck of a lot easier to write OS schedulers, drivers, memory managers, codecs, ray tracers, database engines, ...