Arbitrary abbreviations in phobos considered ridiculous

Nick Sabalausky a at a.a
Sat Mar 10 11:56:00 PST 2012


"H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote in message 
news:mailman.412.1331398464.4860.digitalmars-d at puremagic.com...
>
> Breaking changes tend to
> happen inside a class, so if something doesn't *need* access to private
> members, then it doesn't, and shouldn't, need to be a class member.
>

Unless they need polymorphism :(

> In retrospect, I do find myself frequently factorizing code *within* a
> class such that most member functions don't actually need direct access
> to private members, or if they do, they use as few private members as
> possible to do what they need to do. So by Dr. Dobbs' standard, most of
> these member functions ought to be external to the class proper.
>
> This is where UFCS really shines... now I *can* actually move these
> members out of the class, and it doesn't even change the class API!
> Plus, *users* can add new pseudo-members and it extensibly enhances the
> class API while retaining that resilience to change.
>

It also has the benefit of shrinking the vtables of each instance. (Although 
I think 'final' might have the same effect if used the same way?)

> D is getting more awesome by the day. Now I truly can't convince myself
> to go back to C++!
>

Totally. But I had given up on C++ ten years ago. Unfortunately, as I may be 
getting into some iOS/Android game dev soon (likely with Marmalade, since 
Corona looks to be little more than a shiny overpriced toy - just like its 
older brother Flash), I may need to start using C++ again. Ugh. I love game 
dev, but I'm not looking forward to that aspect of it. Mature Arm support 
for D can't come soon enough! If there were a date, I'd be counting the 
days.

> There are two ways to write error-free programs; only the third one works.

Heh, once again, a gem. I also laughed out loud at the "That phone number is 
imaginary, rotate your phone 90 degrees and try again".





More information about the Digitalmars-d mailing list