Follow

It really frustrates me that we somehow collectively decided type-level metaprogramming and codegen were "magic" and too confusing, but late-binding, dynamic dispatch, ad-hoc polymorphism, and a whole bunch of other stuff were totally normal and fine

· Edited · · 7 · 12 · 50

@sliminality @samth I think there are two contributing factors:
(a) lots of intro CS curriculum has built up intuitively pleasing metaphors for polymorphism
(b) it’s easier to build “partly working” code when failures happen at runtime than compile time, which feels easier/more productive because humans are bad at evaluating future reward/punishment

@samth @sliminality I think we're in the early years of type directed metaprogramming being accessible to industry, while all the OO stuff has been in industry for decades. Type directed metaprogramming is awesome, and I think we'll see more of it. Tooling does need to improve though.

@sliminality I totally agree. Maybe part of that is that e.g. typical C++ template compiler errors used to be (and sometimes still are) an enormous flood of absolute gibberish. And with all this run-time magic, you can still just printf-trace if you want, which is arguably more accessible for non-veterans.
I see there's a lot work going into improving error messages, e.g. in new MSVC versions or in Rust, but ... maybe that's a little late.

Sign in to participate in the conversation
types.pl

A Mastodon instance for programming language theorists and mathematicians. Or just anyone who wants to hang out.