digitalmars.D - UFCS is just awesome
"fedvasu" <vadie.misc gmail.com> writes:
I a noob at D, I am an intermediate java programmer, I am learning C++ for my next project(employment). I knew about D, I always felt like D is "C++: The good parts(TM) without tooling". I dabbled a bit in D (a few project euler problems,nothing major) DMD and LDC work flawlessly on fedora (good job maintainers! very much appreciated). I am casually browsing Ali Cehrli's book in my free time.Thanks Ali for a decent resource. (First post so please tolerate the thank yous and me toos) Coming to the point. I read this article by Walter (http://www.drdobbs.com/cpp/uniform-function-call-syntax/232700394) I think it is way awesome, I mean seriously I am one of the (junior)maintainers for a large codebase(>2 million SLOC java) for our customer. I was like can't we just have a few static functions in a class and could use them as if they are methods of our class?(atleast for new classes we create) We have a crap load of fat classes and boy I have a headache when I have to peek into 10000+ SLOC classes,lot of repetition. I even liked the article more when Walter mentions STL's approach (Algorithms + Iterators + Containers) and clearly stated why extension methods are inferior to UFCS (more boiler-plate and call syntax restrictions). I think small things like this add upto a lot for long term maintainability of application software. I am more intrigued about D than before!
Sep 18 2013
"Peter Alexander" <peter.alexander.au gmail.com> writes:
Always good to hear positive feedback about D :-)I think small things like this add upto a lot for long term maintainability of application software.
Absolutely. Of course, you need to get the big things right too, but the small things make it all so much more bearable.
Sep 18 2013