is it possible to have a default property for any given class ?
someone
someone at somewhere.com
Mon Jun 7 19:35:28 UTC 2021
On Monday, 7 June 2021 at 16:10:08 UTC, Jack wrote:
> I think you meant to implement ranges? you can implement in the
> way you wanted: ```foreach(lobjComputer; lobjComputers)``` ...
Thanks for your reply !
I am aware that ranges are one of D's gems, I did take an
overview of them last night or the night before but did not get
immersed in them too much. Will look at them.
The first thing that came to mind was to implement them as a
collection as I always did on other languages, but I suppose
ranges could be an alternative.
> ... but the recommend approach is to get this array through the
> array index operator
When you say so, you mean you prefer arrays over ranges or, that
you disagree with the recommended approach for whatever reasons ?
Could you elaborate ?
More information about the Digitalmars-d-learn
mailing list