Simen kjaeraas wrote:
Don <nos...@nospam.com> wrote:

aarti_pl wrote:
bearophile pisze:
aarti_pl:

I think that proposed names exactly reflect the meaning. So I would say it is perfectly consistent with D convention.

Dollars are money, but opDollar is not a member function that returns the price of a struct. So I don't agree with you, or I don't understand what you mean.

Bye,
bearophile
I agree. opDollar is not particularly fitting to D language operator concept. opLength/opSize would fit better.

Unfortunately $ is not necessarily the length, nor the size. It might not even be an arithmetic type.

opEnd, then?


That was the only other viable suggestion. But I don't think it's very intuitive -- eg, it sounds like there ought to be an opBegin(); why isn't it used for ranges?; etc.
I'd go for opLength() if it really was a length, but it's not.

The big thing in favour of opDollar() is that everyone instantly knows exactly what it means.

Reply via email to