www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Identity, equality -- a non-shallow discussion

reply Georg Wrede <georg.wrede nospam.org> writes:
Matthew wrote:
 "Anders F Björklund" <afb algonet.se> wrote:
 Kris wrote:

 The topic is /not/ a campaign to change the language. I'll repeat
  that: it is NOT a campaign, since it's been shown such causes,
 however well intentioned, and/or well supported, are naught but
 exercises in futility.

It does seem to be a campaign about preferring how '==' is done in Java? (even if doing it not by a language change, but switching '==' for 'is')

I don't think that's valid. Kris has pointed out a very disturbing design flaw in the syntax of the language, and has suggested _what he sees_ as the most pragmatic solution, based on his experience

 I happen to disagree with his solution, and favour a full and proper
 addressing of the flaw, but I agree with his main thesis nonetheless.

Exactly! This is both urgent and important! If we don't investigate this thoroughly, right now, we'll regret it for the rest of D's life. (Which I hope will be gte 20 years!) Also, we shouldn't restrict our thinking here to just "=== or not, == vs is" and such. We may end up with a proper solution that may have 1, or even more than 3 kinds of operators. -- But we don't know it yet. So, at this point we should switch to a *proper study of the underlying issues* instead. Once that is _well_understood_, the solution will become apparent, automagically. ------ On second thought, we should *stop* thinking about "=== vs ==, == vs is" etc., right now. Equality, identity, shallow, deep, type categories -- *these are the real issues* ! These have to be handled in a coherent (or at least in a clear and intuitive) manner in the language overall. And _this_ is what has to be rethought, from bottom up. (We may end up with something that's not too different from how it's right now -- but the point is: we have to _know_ and understand what we want, instead of things "just happening to be like they are now". Browsing the genesis of our current equality/identity "system" gives an impression of short-sighted ahas combined with feelings based small choices here and there. None of which has looked at the big picture. Not a good receipe for the next Killer Language. For this, we need our varied backgrounds -- as an immense resource of combined knowledge, not as a stumbling block of idle bickering.
Apr 14 2005
parent reply "Ben Hinkle" <bhinkle mathworks.com> writes:
 So, at this point we should switch to a *proper study of the underlying 
 issues* instead. Once that is _well_understood_, the solution will become 
 apparent, automagically.

I have lost track of the '=='/'is' thread that Kris started. Is there a link to the summary of the issue? [snip]
 Browsing the genesis of our current equality/identity "system" gives an 
 impression of short-sighted ahas combined with feelings based small 
 choices here and there. None of which has looked at the big picture. Not a 
 good receipe for the next Killer Language.

Can you be more specific? How did you browse the genesis? Do you mean you looked through the archives? A summary of what you found would be helpful.
Apr 14 2005
parent Georg Wrede <georg.wrede nospam.org> writes:
The article was <d3k3tl$2hmq$1 digitaldaemon.com>.
(13 Apr 2005 22:23:58 GMT) digitalmars.D:21425

Ben Hinkle wrote:
So, at this point we should switch to a *proper study of the underlying 
issues* instead. Once that is _well_understood_, the solution will become 
apparent, automagically.

I have lost track of the '=='/'is' thread that Kris started. Is there a link to the summary of the issue? [snip]
Browsing the genesis of our current equality/identity "system" gives an 
impression of short-sighted ahas combined with feelings based small 
choices here and there. None of which has looked at the big picture. Not a 
good receipe for the next Killer Language.

Can you be more specific? How did you browse the genesis? Do you mean you looked through the archives? A summary of what you found would be helpful.

Unfortunately, I was at a foreign computer, so I can't check from the history which posts I looked at, and which were relevant. (Right now I'd, suggest starting with: http://www.digitalmars.com/d/archives/index.html http://www.digitalmars.com/d/archives/18188.html if not better, they're at least a start.) But, I also was around at that time, so part of my "impression of short-sighted..." comes from having been there at the time. One day, I will download all old messages, and really make a study of old topics. There may exist some golden insights, just waiting to be discovered. OTOH, someone with more time at hand, possibly not self confident with D programming himself, might want to do this properly. That would include cross referencing (ala Ctags), some statistics, and other stuff that helps one navigate and efficiently mine the text base.
Apr 15 2005