4 ms·
Condidering that 1) mostly imperative programming has worked wonders for ages with a huge body of work to show for (almost every basic infrastrcuture, all majo
by coldtea 11y ago
Condidering that
1) mostly imperative programming has worked wonders for ages with a huge body of work to show for (almost every basic infrastrcuture, all major OSes, almost all popular programs etc are writen in one of C/C++/Pascal/Obj-C/Fortran/Ada/Java). Might have its security and stability warts, but it has shown pragmatic results.
2) "fully functional" might have its security and stability assurances, but it has little of importance historically to show for all its boasting (the AI winter is not something to be really proud of).
I'd call BS, and say that "mostly functional" works fine, thank you very much, in that it takes (1) that already works (with some issues) and makes it even better with a touch of (2).
- bumeye 11y agoI think the author means to say that it's kind of an all or nothing thing. You either go purely functional and get all the benefits, or you don't and barely get any benefits at all. You could say that "almost functional" does not really exist, just like "almost secure" does not exist. And yes, you can still program with a non-functional language just fine he does not refute that.
- coldtea 11y ago>I think the author means to say that it's kind of an all or nothing thing. You either go purely functional and get all the benefits, or you don't and barely get any benefits at all. Yes. And what I say is that "I get enough benefits from going halfway functional, thank you very much". >You could say that "almost functional" does not really exist, just like "almost secure" does not exist. You could say that but you would be wrong. Most Lisp coders for example have also used imperative code where they need it, with side effects and all. Nobody cared much about such total "functionalness" and purity as you get today from Haskell programmers (most of them non professional of course since there are far more Haskell programmers than Haskell jobs) and the like...
- ksherlock 11y agoahem pure lazy functional. One could read the article and walk away believing that laziness is the problem.
- tincholio 11y agoDid you even read the article? His point was that introducing some functional features to imperative languages do not confer them the safety benefits found in type systems such as Haskell's. It has absolutely nothing to do with pragmatism or any such thing.
- coldtea 11y ago>Did you even read the article? I did, did you? >His point was that introducing some functional features to imperative languages do not confer them the safety benefits found in type systems such as Haskell's. And my point was that I don't want ALL the safety benefits found in type systems such as Haskells. If I would, I would be using Haskell. Or rather, while I might want it, I also want other things more, so I wouldn't sacrifice all of them to get it. His point was that mostly functional "does not work" which is a BS thing to say, because it's an absolute statement. And his whole article revolves around that absolute, e.g.: >The idea of "mostly functional programming" is unfeasible. It is impossible to make imperative programming languages safer by only partially removing implicit side effects. Nope, you can very much make them safer. It might not make them the "safest" it can be, but it can totally make them safer. Even merely substituting for loops with map and fold will eliminate lots of potential bugs. Heck, you can even make C much safer by just removing pointer arithmetic or just adding a built-in string type. Either of those two things alone would eliminate tons of bugs while the language would remain the imperative thing that it is.
- kstenerud 11y agoExactly right. While some purists will bemoan imperfection and invent all sorts of "horror stories" from their ivory tower, engineers who actually get things done are quite satisfied with "good enough." Functional purism after awhile starts to smack of the bad old days of waterfall development, where each step in the series requires perfection lest the remaining steps collapse (if everyone would just follow this perfect system, we'd all have rainbows and unicorns). You can have perfect safety, or you can have a workable system delivered in a timely manner.
- 11y ago