[nem-en] Extension properties?
Michal Moskal
michal.moskal at gmail.com
Sat Jul 1 19:52:37 CEST 2006
On 6/30/06, Snaury <snaury at gmail.com> wrote:
> I wonder if extension properties would be supported in any near
> future? Reading blog entry at
> http://nemerle.org/blog/archive/2005/Mar-06.html I liked its "extend"
> syntax a lot, which even shows properties there. However for now:
>
> public module Extensions {
> public Property[this sc : SomeClass, ...] {
> get {}
> set {}
> }
> }
>
> It doesn't allow this, because properties can't be static (and this
> keyword can be used only when methods are static)...
Actually properties can be static, it's only the indexer properties that cannot.
They said, they will consider extension properties and events in C#
3.0. One way would be to wait for some spec. Other one would be to
invent one ourselves and possibly change it later.
--
Michał
More information about the devel-en
mailing list