B# language for embedded development. And as a D competitor
kris
foo at bar.com
Thu Mar 23 13:36:58 PST 2006
pragma wrote:
> In article <dvv16o$250d$1 at digitaldaemon.com>, kris says...
>
>>
>>BTW: What do you think about the B# get|set design?
>
>
> (I know this wasn't exactly an open question, but...)
>
> I think it's a bit like the 'readonly' proposal, warmed over. Its basically the
> same thing as adding some attributes to get the job done in D:
>
> readonly ubyte foo; // read-only
> writable readonly ubyte foo; // default
> writable ubyte foo; // write-only (mostly useless unless we have a 'register'
> construct similar to B#)
>
> IMO, the {get; set; } syntax just doesn't seem to jive with D to me.
>
> - EricAnderton at yahoo
Except that it appears to map onto an overiddable method, with an
implicit 'value' property for the set() ?
I could be mistaken, but B# get|set seems to be akin to an extensible
property for class members? Kind of like an optional opEqual & opAssign
for each D class/struct attribute?
More information about the Digitalmars-d
mailing list