So You Want To Write Your Own Language

Jacob Carlborg via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Dec 26 04:05:21 PST 2015


On 25/12/15 04:25, Jakob Jenkov wrote:

> I think it depends a lot on your personal preference. For instance, I am
> always annoyed about immutable types being forced upon me (okay, they
> wouldn't be forced, but I'd have to work to get rid of them). I like
> mutable types.

Yeah, we don't need to flip all the defaults, but something like 
safe/system has clearly the wrong default.

> Regarding the AST macros - I simply don't know enough about how that
> works in practice to have an opinion. Java doesn't have that stuff, so I
> don't know what I am missing :-)

There's a lot of stuff that Java doesn't have ;). In theory, all the 
lowerings that the compiler already does could be implemented with AST 
macros. "scope" is lowered to try-catch-finally, "foreach" is lowered to 
a "for" loop and so on.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list