Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, I did not intend my statement to be sarcastic. It was a genuine question. Blame my lack of social skills, or the fact that I am on the spectrum. I was curious about the implementation details, i.e. why "!" (in map), why "a", why "idup", etc. That is not to say I am reluctant to read the documentation, I am more than willing, but I wanted to know the story behind it. I have ideas, but they might be wrong. I do not want to guess when I can have a direct answer from Walter.


a!arg is used because I hated the look of a<arg> used in C++. (Using < > to bracket things when < means less than and > means greater than is always trying to short-circuit my brain.)


What makes the choice of < > for template parameter bad appears when someone tries to nest templates.

     a<b<arg>> 
and now a means greater becomes a shift right. That's one of the reason that it you had a genious ideo to find domething else in D

a(template params)(runtime params) at declaration a!(template params)(runtime params) at invocation with the type deduction and parenthesis omission making often even disappear completely the template syntax.

thank you




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: