Your argument with generics is actually.. irrelevant in 7 since the <> operator will infer the type from the left side.
17 Replies - 5681 Views - Last Post: 23 January 2013 - 10:58 AM
#17
Re: JavaFX usage - discuss?
Posted 22 January 2013 - 04:32 PM
True, but it was meant to be C# code
#18
Re: JavaFX usage - discuss?
Posted 23 January 2013 - 10:58 AM
Ryano121, on 22 January 2013 - 10:54 PM, said:
I fail to see your point here. I think what you are really complaining about is moron developers who can't document their code.
Boils down to stupid method and variable names, not a problem with var at all. If you really get stuck then it takes 2 seconds to hover over the method and see what it returns. Not a problem. When var really saves you is with long types e.g-
var Connection = Connection();
Boils down to stupid method and variable names, not a problem with var at all. If you really get stuck then it takes 2 seconds to hover over the method and see what it returns. Not a problem. When var really saves you is with long types e.g-
People are inherently unreliable, so you cannot and should not rely on someone's comments to decipher any given piece of code. You can read what they wrote, but you had better darn well verify it anyway.
If you fail to see how:
var run = Run();
is much more confusing to someone than:
bool run = Run();
then, we will never agree.
If the programmers comments tell me that var run = Run() returns a bool, I actually have go and look. If he instead declared bool run = Run(), I would not, as long as VS gave me no errors.
var may make the language less verbose, but it breeds laziness. I wonder how much time is lost deciphering types declared with var while debugging vs time saved while writing code.
|
|

New Topic/Question
Reply



MultiQuote



|