Ideas from the Chapel language (swap)

Sean Kelly sean at f4.ca
Wed Oct 3 12:49:28 PDT 2007


Bruce Adams wrote:
> bearophile Wrote:
> 
>> The Cray Inc is designing the Chapel Language:
>> http://chapel.cs.washington.edu/
>> The following notes are from the specification V. 0.750:
>> http://chapel.cs.washington.edu/spec-0.750.pdf
>> I think it's rather cute, it looks like a cross between C++, Fortress and Python. Here are few things I think can be interesting for D designers too:
>>
>> - Chap. 11.5 page 65, swap operator (useful but probably not enough to justify a new operator)
> 
> swap is very useful especially in exception safe programming.

Certainly.  But how much of a need is there for swap in a 
reference-based language like D?  I would think that most swaps would 
simply operate on references.  Unless you're talking about structs, and 
structs do not have copy ctors so there is little risk of an exception.


Sean



More information about the Digitalmars-d mailing list