What would a minimal subset of D look like?

Araq rumpf_a at web.de
Mon Jun 24 13:47:06 UTC 2019


On Monday, 24 June 2019 at 10:31:27 UTC, Ola Fosheim Grøstad 
wrote:
> On Saturday, 22 June 2019 at 16:45:55 UTC, Yatheendra wrote:
>> This sounds like the Erlang recommendation (they call it 
>> tagged tuples, records).
>
> Sort of, except it is compile-time only.
>
>> Nim has AST macros.
>
> I have no real experience with Nim, but the AST macros seems to 
> be very close to the parse-tree. I could be wrong, but I think 
> something more abstract is needed.


**Disclaimer**: I invented Nim.

The AST is "close to" the parse-tree but that's not a problem, 
the usual things that a macro system is capable of can all be 
done (async, serialization, lazy evaluation, control flow 
abstractions, currying, DSLs), and reasonably easy too.

It's certainly ugly in some ways but that is not because it is 
"close to" the parse-tree (hey, it works for Lisp too!) but 
because it was a research project that escaped the lab. Almost no 
effort was spent on API design. But we're getting there.



More information about the Digitalmars-d mailing list