Can we just have struct inheritence already?
H. S. Teoh
hsteoh at quickfur.ath.cx
Wed Jun 12 05:43:37 UTC 2019
On Wed, Jun 12, 2019 at 12:44:08AM -0400, Nick Sabalausky (Abscissa) via Digitalmars-d wrote:
> On 6/11/19 2:29 AM, Walter Bright wrote:
> >
> > 2. How would you determine the dimension of an array of 0 size
> > elements?
>
> By reading .length instead of performing an unnecessary division.
+1. I never liked that nonsensical sizeof(array)/sizeof(array[0])
"trick" or idiom. It was a hack around a deficient language way back
when. Today we have D, and D has .length. We should be using that
instead. Why are we still bending over backwards to support outdated
hacks?
T
--
Freedom of speech: the whole world has no right *not* to hear my spouting off!
More information about the Digitalmars-d
mailing list