(non)nullable types

Yigal Chripun yigal100 at gmail.com
Sat Feb 14 11:45:43 PST 2009


Andrei Alexandrescu wrote:
> Nick Sabalausky wrote:
>> "bearophile" <bearophileHUGS at lycos.com> wrote in message
>> news:gn6ism$1rgc$1 at digitalmars.com...
>>> Yigal Chripun:
>>>> IMO "if" needs to be expression instead of a statement.
>>>> also See http://nemerle.org/Quick_Guide#Decisions
>>> If you want to turn D into a more functional language, then that may
>>> be positive. But I think D will not change so much, so better for you
>>> to stick to things that are more likely to change.
>>>
>>
>> D's already becoming more functional. Evidence: pure, immutable,
>> std.algorithm.
>
> ...std.functional.
>
> Andrei

Besides, such a change will allow us to remove the ugly ?: operator and 
will free the ? sign.

One of my favorite Ruby features (besides Blocks) is that Ruby allows 
using ? and ! as part of identifiers. This is used in Ruby by convention 
to represent methods that answer questions, and methods that are more 
"dangareous" like in-place modification of data.

so you can write:
if (range.more?) ..
and it also has array.sort vs. array.sort! where the former gives a 
sorted copy and the latter sorts in-place.



More information about the Digitalmars-d mailing list