Why is array.reverse a property and not a method?

"Jérôme M. Berger" jeberger at free.fr
Wed Jul 14 01:04:11 PDT 2010


Andrei Alexandrescu wrote:
> On 07/12/2010 02:28 PM, bearophile wrote:
>> Andrei Alexandrescu:
>>>> sort is all but deprecated, since std.algorithm.sort exists.
>>>>
>>>> reverse could even more easily be implemented as a library
>>>> function than sort, it should be removed as well.
>>>
>>> http://www.digitalmars.com/d/2.0/phobos/std_algorithm.html#reverse
>>
>> D site can enjoy a page that lists the deprecated D2 features (and
>> maybe for each of them lists what to use instead of it), so current
>> D2 programmers can avoid what will be removed.
> 
> Good point.
> 
> I'd to do some more renaming around Phobos and figure out an approach to
> deprecating names that aren't longer used.
> 
> I'm thinking:
> 
> std.conv -> std.conversion
> 
> Rationale: it's a seldom typed name so shortening it is just odd
> 
> std.stdio -> std.io
> 
> Rationale: stuttering sucks.
> 
> put(R, E) -> putNext(R, E)
> 
> Rationale: conveys the notion that there is progress in the output.
> 
> BidirectionalRange -> DoublyEndedRange
> 
> Rationale: bidirectional suggests something that can move *in* either
> direction, whereas in fact the range can be shortened from either end.
> 
> Would this be an improvement?
> 
	You can also add:
iota -> sequence

Rationale: according to the dictionary, an iota is "an infinitesimal
amount" (http://www.merriam-webster.com/dictionary/iota) which has
nothing to do with what the function does and can even be argued to
mean the reverse! Given the dictionary definition, one would expect
iota to represent either an empty range or a range with just one
element...

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100714/c167b25e/attachment.pgp>


More information about the Digitalmars-d mailing list