new DIP5: Properties 2
Michel Fortin
michel.fortin at michelf.com
Mon Jul 27 04:51:33 PDT 2009
On 2009-07-27 04:54:57 -0400, Kagamin <spam at here.lot> said:
> http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP5
>
> As namespaces were proposed, a variant of them is in DIP5 now.
Hum, what's the difference between:
int width
{
private int val;
int opGet() { return val; }
int opSet(int newVal) { return val = newVal; }
}
and
namespace width
{
private int val;
int opGet() { return val; }
int opSet(int newVal) { return val = newVal; }
}
?
I mean, what's the purpose of giving a type to the namespace when you
already have a type for the opGet return value?
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list