Reimplementing the bulk of std.meta iteratively

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Sep 29 10:27:03 UTC 2020


On Tuesday, 29 September 2020 at 10:03:12 UTC, Ola Fosheim 
Grøstad wrote:
> conditional instruction. Two such tiny imperative languages are 
> Self and Beta. So you basically merge the concept of a block 
> and an object as well.. A constructor/destructor pair is just a 
> single coroutine that has suspended.

That last sentence is hypothetical. You could construct a 
language that only consists of concurrent closures. Would it be 
slow? Only if the optimizer isn't advanced enough, but in reality 
compiler authors depend on heuristics (common programming 
patterns) so it is quite difficult to get such languages to 
perform well in practice.

Compilers are sadly not very good at high level optimization... 
Which is why languages ship with pre-canned constructs, libraries 
and runtimes...




More information about the Digitalmars-d mailing list