www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Migrating to Shared

reply bobef <bobef abv-nospam.bg> writes:
Walter Bright Wrote:

 I wrote a brief article which should help:
 
 http://www.digitalmars.com/d/2.0/migrate-to-shared.html

__gshared, __etc. These look ugly IMHO. :)
May 14 2009
next sibling parent reply BCS <none anon.com> writes:
Hello bobef,

 Walter Bright Wrote:
 
 I wrote a brief article which should help:
 
 http://www.digitalmars.com/d/2.0/migrate-to-shared.html
 


I think that's the point: they look ugly because they are ugly.
May 14 2009
parent reply Leandro Lucarella <llucax gmail.com> writes:
BCS, el 14 de mayo a las 16:48 me escribiste:
 Hello bobef,
 
Walter Bright Wrote:
I wrote a brief article which should help:
http://www.digitalmars.com/d/2.0/migrate-to-shared.html


I think that's the point: they look ugly because they are ugly.

I prefer normal keywords for standard things (keywords or symbols starting with __ are historically reserved for compiler specific features or even private stuff in Python). For __gshared I agree that it's something ugly and it's fine if it looks ugly. But __traits?! Come on! __traits is beutiful, it deserves a beutiful keyword ;) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ----------------------------------------------------------------------------
May 14 2009
next sibling parent reply dsimcha <dsimcha yahoo.com> writes:
== Quote from Leandro Lucarella (llucax gmail.com)'s article
 BCS, el 14 de mayo a las 16:48 me escribiste:
 Hello bobef,

Walter Bright Wrote:
I wrote a brief article which should help:
http://www.digitalmars.com/d/2.0/migrate-to-shared.html


I think that's the point: they look ugly because they are ugly.

with __ are historically reserved for compiler specific features or even private stuff in Python). For __gshared I agree that it's something ugly and it's fine if it looks ugly. But __traits?! Come on! __traits is beutiful, it deserves a beutiful keyword ;)

True. I think I subconsciously avoid anything with an __ in front of it because to me the connotation of an __ is "Only works if the stars align just right. We're trying to scare you away from this feature for a reason. Here be monsters." If traits, excuse me, __traits, is stable enough not to deserve this connotation, then it absolutely deserves its own keyword.
May 14 2009
parent reply BCS <ao pathlink.com> writes:
Reply to dsimcha,

 True.  I think I subconsciously avoid anything with an __ in front of
 it because to me the connotation of an __ is "Only works if the stars
 align just right. We're trying to scare you away from this feature for 
 a reason.  Here be monsters."

like __gshared? <g>
 If traits, excuse me, __traits, is stable enough not to deserve this
 connotation, then it absolutely deserves its own keyword.

I think traits should get first class treatment as it really isn't being used as the backdoor hack that the __ implies.
May 14 2009
parent dsimcha <dsimcha yahoo.com> writes:
== Quote from BCS (ao pathlink.com)'s article
 Reply to dsimcha,
 True.  I think I subconsciously avoid anything with an __ in front of
 it because to me the connotation of an __ is "Only works if the stars
 align just right. We're trying to scare you away from this feature for
 a reason.  Here be monsters."


Exactly, except __gshared deserves this treatment.
May 14 2009
prev sibling parent Rainer Deyke <rainerd eldwood.com> writes:
Leandro Lucarella wrote:
 I prefer normal keywords for standard things (keywords or symbols starting
 with __ are historically reserved for compiler specific features or even
 private stuff in Python). For __gshared I agree that it's something ugly
 and it's fine if it looks ugly.
 
 But __traits?! Come on! __traits is beutiful, it deserves a beutiful
 keyword ;)

I like the idea of using __ for temporary, transitional, and experimental keywords. Using __ has several advantages here: - It's unlikely to collide with existing identifiers. - You can create as many of them as you want without worrying about namespace pollution. - It's ugly as a reminder that the feature is temporary, transitional, or experimental. - It's easy to search for and easy to globally replace with a real keyword. Eventually all features using __ keywords should be removed, renamed, or modified in such as way that they do not require a keyword at all. -- Rainer Deyke - rainerd eldwood.com
May 14 2009
prev sibling parent reply Walter Bright <newshound1 digitalmars.com> writes:
bobef wrote:
 __gshared, __etc. These look ugly IMHO. :)

They're only allowed in safe mode, and are meant to inspire people to use them only when there's no other choice. Hence the unattractiveness <g>
May 14 2009
parent Don <nospam nospam.com> writes:
Walter Bright wrote:
 bobef wrote:
 __gshared, __etc. These look ugly IMHO. :)

They're only allowed in safe mode, and are meant to inspire people to use them only when there's no other choice. Hence the unattractiveness <g>

Agreed. Yet as others have said, __traits deserves a beautiful keyword.
May 15 2009