3 ms·
Is functional programming the only other style?
by mLuby 10y ago
Is functional programming the only other style?
- jsmith0295 10y agoit is on HN
- undersuit 10y agoThe paper describes function-level programming, it is different than functional programming; see the languages APL, K, and J.
- scottlocklin 10y agoThank you for saying this. I don't think anybody else noticed. In fact, people in the J community occasionally get confused about this as well. Most people shit their pants when confronted with something like FP (Backus language demonstrating these ideas): I know I did when I first encountered J. Much more confusing than ML or Lisp. Still not sure it's the right thing, but for parallel problems it probably is. Kids don't seem to have a problem with it though, so it's probably just old habits. Wiki page for anyone who reads this: https://en.wikipedia.org/wiki/Function-level_programming https://en.wikipedia.org/wiki/Function-level_programming
- PeterisP 10y agoThere are a bunch of other paradigms, e.g. declarative programming was considered the thing some decades ago; but in general nowadays most domains are best handled by the tools & approaches we have from either the direct imperative simplicity, the OOP camp, or the functional mindset.
- wtetzner 10y agoI think declarative is still preferred, if you can make it work. I think the real issue is coming up with a declarative language that is general purpose and efficient enough. For specific domains, however, declarative languages have done quite well, e.g. SQL, regexps, XPath, etc.
- PeterisP 10y agoI believe that what we're seeing is declarative paradigm used as subsystems / domain specific languages that do a particular core task accurately and efficiently, but surrounded with a general purpose "scripting environment" in which you do the messy interfaces with the surrounding world and users. Besides the obvious SQL example, the current ML systems such as Tensorflow are a great illustration; you declare a particular computation graph and then the system "just executes it" over multiple GPUs.
- marcosdumay 10y agoFunctional is one of the many possible idioms of declarative programming. It's just one that's completely focused on an idealization of "software", instead of any more concrete problem. That makes it more general than most. And the functional idealization is more similar to what real computers run than other representations (some people already mentioned Prolog). Those give FP some advantages over the others, at least for now.
- DonaldFisk 10y agoNo. Other styles include logic (e.g. Prolog), (forward chaining) production systems (e.g. CLIPS), dataflow, and (gated) quantum computing. There's some overlap between the different styles.