4 ms·
The Red Language has always described itself as functional imperative. I used to point out to people that functional programming can be imperative and nobody (
by austincheney 8y ago
The Red Language has always described itself as functional imperative. I used to point out to people that functional programming can be imperative and nobody (I do mean nobody I spoke to about this) would believe me on this. Then I would point out to people Red Language as an example and they would scratch their heads in confusion.
Even the Wikipedia article gets this wrong: https://en.wikipedia.org/wiki/Functional_programming https://en.wikipedia.org/wiki/Functional_programming
Functional imperative is the idea of using functions to define the shape of an application, which is to say the nesting of functions defines both the stacked structure and the resulting control flow opposed to describing units of logic or any sort of reflection.
https://en.wikipedia.org/wiki/Function_model#Functional_decomposition https://en.wikipedia.org/wiki/Function_model#Functional_deco...
- 9214 8y agoIdiomatically written Red is largerly data-driven, composed out of mini languages and micro formats (dialects), with huge emphasis on homoiconicity and rich set of available datatypes. Functions indeed are mostly used to guide the flow of program and stack dialects on top of one another, so the resulting app is like a dedicated toolchain (or even a VM), where each component is a small interpreter or compiler.
- bjz_ 8y ago> I used to point out to people that functional programming can be imperative and nobody (I do mean nobody I spoke to about this) would believe me on this. Interesting. Monadic Haskell can be quite imperative if you want it to be, as can SML or OCaml. Scheme and Lisp have imperative parts too.
- macintux 8y agoDitto Erlang.
- grenadier21 8y agoHaskell's IO is literally the idea of sequencing commands reified, though, so the comparison is a bit apples-to-oranges.
- lmm 8y ago> the nesting of functions defines both the stacked structure and the resulting control flow That's called not being functional. What distinction are you drawing between "functional imperative" and regular imperative languages?
- lerpa 8y agoWhat's the different between that and plain old structured programming subroutines?
- thedeepself 8y ago> The Red Language has always described itself as functional imperative I dont think that is accurate. All data items in red actually have attributes. Red has prototype-based OO. It's a very powerful language. I just wish they had better web app and ORMS...