dmd 1.046 and 2.031 releases

Lutger lutger.blijdestijn at gmail.com
Mon Jul 6 05:54:20 PDT 2009


bearophile wrote:

...
>>D does introduce another operator, the  :..case operator <g>.<
> 
> Unfortunately the brain of all people will see just ".." as the operator
> there, and it has a different semantics there, it's a special case. I am
> not going to like this.

I don't think that will happen. After all, many brains got used to [..) and 
[..], this is not that different. In the context of case statements, an 
inclusive range is more intuitive. 
 
>>std.string: deprecated std.string.find and std.string.find, replaced with
>>std.string.indexOf; deprecated std.string.rfind and std.string.irfind,
>>replaced with std.string.lastIndexOf; added flag CaseSensitive for indexOf
>>and lastIndexOf; removed startsWith and endsWith because std.algorithm
>>defines them; defined std.string.byDchar.<
> 
> Replacing the simple to read, and easy to understand names "find" and
> "rfind" with "indexOf" and "lastIndexOf" that are longer and also have
> upper case letters in the middle looks doesn't look like an improvement.

indexOf and lastIndexOf are much more descriptive of what the function 
actually does, I think they are easier to understand.



More information about the Digitalmars-d-announce mailing list