I am a well-read Humbert. I even remember reading back then that Norvig’s essay about how all the “stupid” OO “design patterns” can be just higher-order functions, (which are, in turn, are just instances Barbara Liskov’s Abstraction by Parameterization principle). Yes, I have read her books too, and the Jackson’s, and Richard Bird’s and what not.
Like Jelal in the Orhan Pamuk’s “Black Book” I have carefully selected and cultivated my “garden of memory” (or was it “memery”?) which is now begin to wither and to fade away. Was it all in vain? Well, everything is in vain in the long-enough run, but not like this.
I remember when the “Make an Illegal State Unrepresentable” mantra became a real meme, and how it was really originated within Haskell – the most constrained languages (which is good!), as the idiomatic way to forbid degens from creating a partially initialized [structurally-identical] structured value and to pass it to a function which expects a fully validated input, with all the representation invariants hold.
I remember when Rich Hickey, already being a well-established guru and messiah, popularized the “transducers” meme by giving another talk to his sectarian followers. Since Clojure is a dynamically typed language (with the dynamic dispath at its core), it was largely irrelevant (look, how smart I am!), but still.
Then Scott Wlaschin came along with his website and the series of talks. The most important ones were “Where Is The Code?”, of course, and that one where he showed how to explicitly request at the type-level a ValidatedUser for a critical business-logic function (a domain concept, which is semantically different from just a User).
This, of course, was just an instance of an explicit state transition, constrained and enforced at the type-level, by defining a distinct transducer, which requires a valid state, that cannot be created by any means, but a specific function.
Then there was another meme – the Typestate pattern in Rust, where they discovered that Haskell has a lot of such type-level “patterns”, which allow more control over how structural values can be created and how to actually enforce the crucial representation invariants (all the way back to that Barbara Liskov’s book again).
And yes, in principle, Algebraic Data Types and composition of higher-order functions is enough for everything, and some additional type-level constraints (“such that” at the type-level) makes this even better.
So I wrote some prompts, full of meaningful restrictions and principle-guided constraints (which none of you could even come up with, because it requires the actual bottom-up conceptual understanding, just like of a really decent mathematician), and the fucking Grok and Gemini spat out the code which has a semantic quality one have ever seen before.
It turned a domain model, made out of “pure” Algebraic Data Types, into a pure-functional chaining of explicit state transitions (by applying pure “transducers”), which is just “abstraction by parameterization” principle at the type-level.
No, type-level “lambdas” are not required, because they are generalization of type-constructors, and require its own layer of type-constraints (yes, types all the way up).
No fucking Microsoft or JP Morgan, leave along anything on Github, have this level of semantic quality. Everything is just function (method) calls – a proper chaining, which is nesting – and parameterization, without stupid memes. This is also “natural”, so well-structured, that all these “Hexagon architectures” (again, aroused in and adopted from Haskell) sort of emerge naturally.
The point is that these LLMs without any form understanding whatsoever, operating, in principle, at the mere level of syntactic tokens, are capable of spitting out the code of such quality that literally makes 99% of “coders” useless and obsolete.
Yes, to force them being systematically constrained to just the “right things” (patterns) is difficult, and everything falls apart when the prompt is less specific, but still, it spews out a straightforward “function pipelines” which are bug-free by construction.
I really do not know how to react. Yes, any top-tier boxer past his prime has to be come a “trainer”, but maybe “not like this”.