Accessors, byLine, input ranges
Michel Fortin
michel.fortin at michelf.com
Fri Jan 29 11:22:26 PST 2010
On 2010-01-29 13:57:06 -0500, "Steven Schveighoffer"
<schveiguy at yahoo.com> said:
>> You win because Steven's definition is not good enough. I said before
>> that we should have a authoritative definition. If we really can't
>> define how a property should be defined after some reflection, then you
>> really win.
>
> Be careful here, don't give Andrei hard criteria for declaring victory ;)
"some reflection" is a hard criteria now? :-)
> But my larger point was that convention is convention, whether you use
> parentheses to designate what a function does, or the symbol name
> itself. Deciding the convention is liable to suit some and not
> others. Some people hate the flat terse names of Phobos' modules.
> Does that mean those people are wrong? Does that mean Walter and
> Andrei are wrong? The only thing that is wrong here is deciding there
> is exactly one right rigid way to designate what should and should not
> be a property.
Andrei wanted a good enough guideline so I gave one to him. We need a
guideline if we hope for some consistency. Hopefully this guideline
will be used through Phobos and this will set the example.
> I think we should have a definition of property convention for Phobos,
> but I don't think it needs to be the *only* way people use properties
> in their own projects. In fact, it can't be because there is no
> english (or whatever language you use) interpreter in the compiler.
If someone want to diverge from the guideline, then that's his choice.
It's pretty much like operator overloading: you can use it the intended
way, or you can build boost::spirit.
It's not like the compiler will ever be able to enforce this kind of
thing, so there'll always be room for abuse, if you feel like it.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list