www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - __traits conflicts with rationale

reply Deewiant <deewiant.doesnotlike.spam gmail.com> writes:
http://www.digitalmars.com/d/rationale.html

"__ keywords should indicate a proprietary language extension, not a basic part
of the language."

You said it, not me. ;-)

-- 
Remove ".doesnotlike.spam" from the mail address.
Aug 07 2007
next sibling parent Sean Kelly <sean f4.ca> writes:
Deewiant wrote:
 http://www.digitalmars.com/d/rationale.html
 
 "__ keywords should indicate a proprietary language extension, not a basic part
 of the language."
 
 You said it, not me. ;-)

Exactly. Sean
Aug 07 2007
prev sibling parent reply Walter Bright <newshound1 digitalmars.com> writes:
Deewiant wrote:
 http://www.digitalmars.com/d/rationale.html
 
 "__ keywords should indicate a proprietary language extension, not a basic part
 of the language."
 
 You said it, not me. ;-)
 

I know. Generally, the __traits thing is an experiment.
Aug 07 2007
next sibling parent reply Robert Fraser <fraserofthenight gmail.com> writes:
Walter Bright Wrote:

 Deewiant wrote:
 http://www.digitalmars.com/d/rationale.html
 
 "__ keywords should indicate a proprietary language extension, not a basic part
 of the language."
 
 You said it, not me. ;-)
 

I know. Generally, the __traits thing is an experiment.

A fairly successful experiment, if you ask me. All we need is a little runtime reflection now.. hint, hint, nudge, nudge.
Aug 07 2007
parent "Craig Black" <craigblack2 cox.net> writes:
"Robert Fraser" <fraserofthenight gmail.com> wrote in message 
news:f9ae0p$hcl$1 digitalmars.com...
 Walter Bright Wrote:

 Deewiant wrote:
 http://www.digitalmars.com/d/rationale.html

 "__ keywords should indicate a proprietary language extension, not a 
 basic part
 of the language."

 You said it, not me. ;-)

I know. Generally, the __traits thing is an experiment.

A fairly successful experiment, if you ask me. All we need is a little runtime reflection now.. hint, hint, nudge, nudge.

If __traits worked properly it would be adequate to generate runtime reflection via templates. I see this as ideal because it makes generating reflection data optional and flexible. However, see the Inadeqaucies of __traits thread. Kirk McDonald's also has a blog on the subject http://kirkmcdonald.blogspot.com/2007/07/inadequacies-of-traits.html. -Craig
Aug 07 2007
prev sibling parent Sean Kelly <sean f4.ca> writes:
Walter Bright wrote:
 Deewiant wrote:
 http://www.digitalmars.com/d/rationale.html

 "__ keywords should indicate a proprietary language extension, not a 
 basic part
 of the language."

 You said it, not me. ;-)

I know. Generally, the __traits thing is an experiment.

In chat the other day, I was bemoaning some of the keyword choices for the new features in D 2.0. The functional aspect of each is fantastic, but the facade for some doesn't have the sort of elegance that I feel is a hallmark of the D language. Unfortunately, I think you've set a rather high bar for new features in D. What we've got is consistently so clean and cohesive that any break from this trend sticks out like a sore thumb. Regarding "__traits" -- my suspicion was that you chose a keyword that didn't require renaming the "std.traits" module to something else. In light of the fact that it is an experimental feature, this decision makes perfect sense. But until this post, I had been dreading that we would be stuck with the name forever. I think it would help if an additional sentence of explanation were added to the changelog for new or experimental features, if for no other reason than to forestall some negative reaction to the frilly bits. Assuming "__traits" is sorted, the only feature needing a facelift is const. Again, functionally excellent, but I just can't get over feeling that it's awkward to visually parse and to use in its current form. Like "__traits", knowing that the current syntax is not set in stone would diminish my resistance to using the new features. Sean
Aug 07 2007