[Issue 8381] Uniform function call syntax (pseudo member) enhancement suggestions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 12 12:06:41 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8381



--- Comment #6 from David Piepgrass <qwertie256 at gmail.com> 2012-07-12 12:06:36 PDT ---
Argh, so many typos, I should be careful when I rename things...

> // Static helper method provides an easy way to create MyClass
> public static Foo LoadFrom(string filename, ...)
> However, the client didn't like that, and insisted that Create() should be a
> constructor "for consistency". I was able to rearrange things to make Create()
> into a constructor, but my code was a little clunkier that way.

s/MyClass/Foo/
s/Create/LoadFrom/

Oh how nice it would be if we could simply correct our posts.

> You could also argue that it's not obvious that:
> var.func(arg);
> 
> ...can "transform" itself into:
> func(var, arg);

That feature is used very often, so newcomers will learn it quickly. And it is
definitely a more obvious transformation than func!Type(...).

P.S. I'm just throwing it out there, but couldn't classes themselves be treated
as objects, a la Objective C? That could open the door to another approach, in
which UFCS applies to class objects.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list