On 2009-03-27 04:45:26 -0400, "Simen Kjaeraas" <simen.kja...@gmail.com> said:

I feel the problem here is that you can access a type's static members
through an instance of it, not so much the property syntax.

One could argue that auto foo = TimeSpan.seconds = 30; looks weird, but
writing weird code is in no way dependent on property syntax.

Perhaps static being accessible from the instance is a problem, but you can easily work around the problem by making the function's name clearer by adding a verb. If you had:

        auto foo = TimeSpan.createFromSeconds = 30;

it'd still look strange, sure, but the intent would still be pretty clear. So in short functions that perform an action should have a verb.

--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to