4 ms·
"Code is data" is orthogonal to smart/dumb code vs dumb/smart data, as it's a property of reflective (introspective?) programming languages, not functional ones
by lmkg 17y ago
"Code is data" is orthogonal to smart/dumb code vs dumb/smart data, as it's a property of reflective (introspective?) programming languages, not functional ones. You could conceivably use imperative or OOP techniques in JavaScript to construct a string to eval(), but then Dijkstra would shamble out of his grave to give you a very stern glare. An array of functions to invoke is really more like a cute functional way of expressing a complicated switch. "Code is data" refers more to meta-programing, which would be having the language write the functions for you based on a higher-level description.
- amalcon 17y agoI was under the impression that it was neither "macros" nor "first-class functions", but rather something that encompassed both of them: basically, the idea that the programmer shouldn't need to treat one part of the data differently just because the processor does.