4 ms·
I think there is a fourth category not covered by the OP, which is Generative Programming[0]. This paradigm does not have a fundamental reduction nature (the o
by AdieuToLogic 10y ago
I think there is a fourth category not covered by the OP, which is Generative Programming[0].
This paradigm does not have a fundamental reduction nature (the opposite, actually), is not concerned with memory cell manipulation, and is not limited to predicate calculus (though its products can certainly be used for such).
Well known examples include C++ templates, Scala macros, JavaScript/Perl/Ruby evaluation of text blocks, Aspect Oriented Programming[1], amongst others which I am sure I have unwittingly omitted.
0 - https://www.amazon.com/Generative-Programming-Methods-Tools-Applications/dp/0201309777 https://www.amazon.com/Generative-Programming-Methods-Tools-...
1 - https://en.wikipedia.org/wiki/Aspect-oriented_programming https://en.wikipedia.org/wiki/Aspect-oriented_programming
- mathw 10y agoIt doesn't really compute anything though - other than producing more code which is in one of the core paradigms. I wouldn't argue that this is a paradigm in the same category. It's a very handy set of (often very complex) shortcuts. C++ templates at one level just save you a lot of typing. At another level they let you do type-level computation, but that's just shifting execution into the compile phase instead of the runtime phase. AOP, as far as my experience goes, is a structural thing. Again, it doesn't change anything fundamental about how programs are evaluated but rather how the pieces of a program are assembled.
- chriswarbo 10y agoMaybe this could be seen as a form of term rewriting system? That's the paradigm behind languages like Maude and Pure.
- nickpsecurity 10y agoYou beat me to it. That's exactly what I was thinking. It would be rooted in equational logic or something like that. The K Framework they did the C semantics and KCC compiler in comes to mind. There's also term rewriting languages like Stratego that do everything that way. LISP's as used by Alan Kay et al are like a hybrid of that, functional, and imperative programming that made for great productivity with DSL's. So, it may be a subset of something else or its own paradigm. Worth people thinking on. Plus, I think the style doesn't get enough attention given the results I've seen its practitioners pull off with little code.
- eternalban 10y agoAspect oriented programming is not programming. To convince yourself, write hello world in AOP using nothing but aspects.
- foundry27 10y agoYou’re ignoring the point of AOP. If writing Hello world is a cross-cutting concern as its placement in an aspect would seem to imply, then what are the core concerns of the solution? How do those core concerns differ from those that cross-cut? AOP can only really be applied when you’ve answered that. This is like saying that a car isn’t a -real- vehicle because it can’t fly in the sky without a road beneath it. It’s silly.
- eternalban 10y agoI am not ignoring the point, I am stressing it to highlight the fallacy of considering AOP a "programming paradigm".
- AdieuToLogic 10y agoI am stressing it to highlight the fallacy of considering AOP a "programming paradigm". AOP was not presented as 'a "programming paradigm"'. It serves as a novel example of "Generative Programming", which is the paradigm I mentioned. The reasoning behind including AOP in the examples is based on the ability to use it to produce, manipulate, and/or otherwise enrich program flow independent of the assets being processed. Thus its "generative nature", such as when environments use declarative constructs (such as Java Annotations[0] or C# Attributes[1]) decorating functions/methods/types to manage DBMS transactions. 0 - https://docs.oracle.com/javase/tutorial/java/annotations/basics.html https://docs.oracle.com/javase/tutorial/java/annotations/bas... 1 - https://msdn.microsoft.com/en-us/library/aa288454(v=vs.71).aspx https://msdn.microsoft.com/en-us/library/aa288454(v=vs.71).a...
- willtim 10y agoAOP is just a modern take on the joke COMEFROM instruction from 1971. It is not a programming paradigm.