On 2013-11-10 21:38, Timothee Cour wrote:

I agree; eg, just to name 2 features that I proposed that could be
simply implemented via AST macros as Jacob said:
* [proposal: a new string litteral to embed variables in a string
<http://forum.dlang.org/post/mailman.94.1383254681.9546.digitalmar...@puremagic.com>
http://forum.dlang.org/post/mailman.94.1383254681.9546.digitalmar...@puremagic.com]
* [Re: feature request: __ARGS__ for logging (cf __FILE__, __LINE__,
__FUNC___ http://forum.dlang.org/post/kegmp0$30dn$1...@digitalmars.com]

It seems we could even get rid of __FILE__,__LINE__,__MODULE__ with AST
macros.

Let see, what else. These could, most likely, have been implemented using AST macros:

* scope
* foreach
* for
* inlining delegates. I think the current solution to pass a delegate/lambda as an alias parameter is a bit weird

One of my favorites that is not already in the language is implementing database queries:

Person.where(e => e.name == "John");

Will be translate to the following SQL:

select * from person where name = 'John'

Another one is the property shortcut, see the example for attribute macros: http://wiki.dlang.org/DIP50#Attribute_macros

--
/Jacob Carlborg

Reply via email to