[Proposal] Additional operator overloadings for multidimentional indexing and slicing
Jonathan M Davis
jmdavisProg at gmx.com
Mon Jun 4 03:07:19 PDT 2012
On Monday, June 04, 2012 14:00:18 Dmitry Olshansky wrote:
> On 04.06.2012 13:57, Don Clugston wrote:
> > On 03/06/12 19:31, tn wrote:
> >> On Friday, 1 June 2012 at 01:57:36 UTC, kenji hara wrote:
> >>> I'd like to propose a new language feature to D community.
> >>> ...
> >>> This patch is an additional enhancement of opDollar (issue 3474 and
> >>> #442).
> >>
> >> Sounds awesome. However, the name opDollar should be changed to
> >> something like opSize, opLength, opEnd or almost anything else
> >> than the current name.
> >
> > opDollar is a pretty awful name but nobody could come up with something
> > that is less awful. At least it is not confusing. Everybody instantly
> > knows what it does.
> > For built-in arrays $ is the length and the size, but that isn't
> > generally true.
> >
> > Wish we had a better name, but opLength isn't it, and nor is opSize.
> > opEnd might be the best of those three, but it kinda sounds like
> > something to do with ranges.
>
> opEndSymbol ? It's no dollar but it's clear what it overloads.
TDPL already lists opDollar, and it's overloading the $ operator, so I would
dispute that a better name _could_ exist. That would be like saying that
opEquals would be better if it were renamed to opDoubleEqualSign.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list