4 ms·
OT, and the HN front page has moved on, but just in case someone is interested, and potentially in chatting... A year or so ago, I was exploring live-ish coding
by mncharity 3y ago
OT, and the HN front page has moved on, but just in case someone is interested, and potentially in chatting... A year or so ago, I was exploring live-ish coding with small code fragments and extremely rich namespace manipulation. Sort of "PL is about naming"(so make that awesomely powerful) + "multi-phase collaborative-compilation extensible-language"(and give those namespaces control over everything). Context on steroids.
Perhaps think of javascript-like objects, but much less impoverished. With multiple inheritance prototyping. And fields that not just shadow, but can compose array/object values. And aliases, renames, deletions, set ops, etc, etc. Extremely succinct specification of namespace derivations and variants. Sort of a configuration system. "Object A is composed of interwoven parts of specifications B and C, and when creating variations on A, the contributions of those parts can be altered by name".
And the namespace then becomes the parse, compile, runtime, and dynamic scope contexts. For Maude-like localized control - "in this lexical context, I want integers absent, numbers to parse as Decimal, use this type system, be implemented using this library, with this allocator, ...". So a lexical scope can begin with `use C99;` or `use Python 3.11;`, and those are "simply" two unremarkable computation contexts. From past experience, it's nice to have a forcing factor of "ok, if we were merely implementing one language then mumble would be satisficing, but when doing n languages, we need to up our game by ...".
My next step was going to be putting together an illustrative demo using the great diversity of computations one might describe as say "2+2". Integers and float types, with diverse and not-always-contiguous bit layouts, cpu flags, finite rings, etc, etc. It ended up backburnered, but summer is coming, and this thread reminded me of it.