On 7/13/14, 8:13 AM, fra wrote:
On Friday, 11 July 2014 at 16:44:32 UTC, Ary Borenszweig wrote:
I think D would be much easier to use if it had proper macros. No need
to mess around with q{...}, with string concatenations for generating
code (let the compiler do that) and also to make the code more
readable and easier to write.

Please, D designers, try looking at other languages to get some
inspiration. I read in Reddit that Walter said "I didn't have time to
look at how Rust does things". Really? As a language designer I would
try to learn about every other possible language to get the best of
all of them in my language. Looking at only C++ is not very good.

But that's just my opinion. I'd like D to be easier to use. If one day
I have to use it in my workplace, better if it's good! :-)

Macros are an aberration that allow code writers to create code
that is plan impossible to understand and mantain. Mixins can
give you pretty much the same amoun of functionality while
imposing sane limits to what can be done.

Do you really find my sample code hard to understand? Macros looks just like regular function definitions, only with placeholders.

Concatenating strings to generate code, or creating ast nodes to generate code: that is plain impossible to understand and maintain.

Reply via email to