Count your blessings!

Michel Fortin michel.fortin at michelf.com
Fri Jun 12 04:25:10 PDT 2009


On 2009-06-10 20:14:25 -0400, Andrei Alexandrescu 
<SeeWebsiteForEmail at erdani.org> said:

> Michel Fortin wrote:
>> On 2009-06-10 17:38:55 -0400, Andrei Alexandrescu 
>> <SeeWebsiteForEmail at erdani.org> said:
>> 
>>> * there is nothing to improve threads, further demotivating support for 
>>> Deadlock-Oriented Programming (DOP) in D
>> 
>> On the contrary. I believe they're doing nothing because their hands are tied.
>> 
>> They cannot do much for multithreading at the language level without 
>> creating breaking changes.
> 
> Actually they could. For example, introducing qualifiers that add 
> restrictions would be backwards-compatible.

Even if it is not a breaking change at the language level, to be really 
useful you have to update the standard library to use those restricting 
keywords where it makes sense, thus adding restrictions existing parts 
of the standard library and breaking things. See why they didn't 
implement 'const':

<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4211070>

* Adding const is too late now.  Had this been added from 1.0,
  the situation could have been different.
[...]
* Compatibility is a very important feature of the JDK.
  Arguably, the collection classes should be modified to
  indicate that the elements are const.  That would
  require all existing implementations to be updated in
  the same way, effectively breaking all existing non-JDK
  implementations of the collection interfaces.  Similarly,
  hashCode would have to be const, breaking the current
  implementation of String.


-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list