MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/cjhzk/why_java_sucks_and_c_rocks_final/c0t37o7/?context=3
r/programming • u/ais04 • Jun 27 '10
197 comments sorted by
View all comments
Show parent comments
2
Extension properties only make sense if you also have an extensible way to store the data is represents. Currently I don't know of any way to do that without leaking memory, but I'm open to ideas.
4 u/chrisforbes Jun 28 '10 I disagree. Not all properties need to introduce a new backing field. Often they are simply a view of something that already exists. 1 u/[deleted] Jun 28 '10 In this case I think a partial solution would be worse than none at all. Especially since you can create GetXxx and SetXxx extension methods. 1 u/chrisforbes Jun 28 '10 Well, I don't care about SetXxx methods in general, but I'd rather be able to lose the parens and the 'Get' off GetXxx(). 1 u/[deleted] Jun 29 '10 Oh, you are a C# programmer.I normally use VB, where you only have to include parens if you are actually passing in arguments. 1 u/chrisforbes Jun 29 '10 I'm a programmer, and I use C# when appropriate, but I'm sure not a "C# programmer". Specialization is for insects.More seriously, how does VB disambiguate calling from merely referencing nullary functions? I suppose you need some operator to do that? 1 u/[deleted] Jun 29 '10 Yep. The operator AddressOf is used when you want to turn a method into a delegate.
4
I disagree. Not all properties need to introduce a new backing field. Often they are simply a view of something that already exists.
1 u/[deleted] Jun 28 '10 In this case I think a partial solution would be worse than none at all. Especially since you can create GetXxx and SetXxx extension methods. 1 u/chrisforbes Jun 28 '10 Well, I don't care about SetXxx methods in general, but I'd rather be able to lose the parens and the 'Get' off GetXxx(). 1 u/[deleted] Jun 29 '10 Oh, you are a C# programmer.I normally use VB, where you only have to include parens if you are actually passing in arguments. 1 u/chrisforbes Jun 29 '10 I'm a programmer, and I use C# when appropriate, but I'm sure not a "C# programmer". Specialization is for insects.More seriously, how does VB disambiguate calling from merely referencing nullary functions? I suppose you need some operator to do that? 1 u/[deleted] Jun 29 '10 Yep. The operator AddressOf is used when you want to turn a method into a delegate.
1
In this case I think a partial solution would be worse than none at all. Especially since you can create GetXxx and SetXxx extension methods.
1 u/chrisforbes Jun 28 '10 Well, I don't care about SetXxx methods in general, but I'd rather be able to lose the parens and the 'Get' off GetXxx(). 1 u/[deleted] Jun 29 '10 Oh, you are a C# programmer.I normally use VB, where you only have to include parens if you are actually passing in arguments. 1 u/chrisforbes Jun 29 '10 I'm a programmer, and I use C# when appropriate, but I'm sure not a "C# programmer". Specialization is for insects.More seriously, how does VB disambiguate calling from merely referencing nullary functions? I suppose you need some operator to do that? 1 u/[deleted] Jun 29 '10 Yep. The operator AddressOf is used when you want to turn a method into a delegate.
Well, I don't care about SetXxx methods in general, but I'd rather be able to lose the parens and the 'Get' off GetXxx().
1 u/[deleted] Jun 29 '10 Oh, you are a C# programmer.I normally use VB, where you only have to include parens if you are actually passing in arguments. 1 u/chrisforbes Jun 29 '10 I'm a programmer, and I use C# when appropriate, but I'm sure not a "C# programmer". Specialization is for insects.More seriously, how does VB disambiguate calling from merely referencing nullary functions? I suppose you need some operator to do that? 1 u/[deleted] Jun 29 '10 Yep. The operator AddressOf is used when you want to turn a method into a delegate.
Oh, you are a C# programmer.
I normally use VB, where you only have to include parens if you are actually passing in arguments.
1 u/chrisforbes Jun 29 '10 I'm a programmer, and I use C# when appropriate, but I'm sure not a "C# programmer". Specialization is for insects.More seriously, how does VB disambiguate calling from merely referencing nullary functions? I suppose you need some operator to do that? 1 u/[deleted] Jun 29 '10 Yep. The operator AddressOf is used when you want to turn a method into a delegate.
I'm a programmer, and I use C# when appropriate, but I'm sure not a "C# programmer". Specialization is for insects.
More seriously, how does VB disambiguate calling from merely referencing nullary functions? I suppose you need some operator to do that?
1 u/[deleted] Jun 29 '10 Yep. The operator AddressOf is used when you want to turn a method into a delegate.
Yep. The operator AddressOf is used when you want to turn a method into a delegate.
2
u/[deleted] Jun 28 '10
Extension properties only make sense if you also have an extensible way to store the data is represents. Currently I don't know of any way to do that without leaking memory, but I'm open to ideas.