JavaFX usage - discuss?

  • (2 Pages)
  • +
  • 1
  • 2

17 Replies - 19779 Views - Last Post: 23 January 2013 - 10:58 AM

#16 Ghlavac  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 519
  • Joined: 14-January 09

Re: JavaFX usage - discuss?

Posted 22 January 2013 - 04:24 PM

Your argument with generics is actually.. irrelevant in 7 since the <> operator will infer the type from the left side.
Was This Post Helpful? 0
  • +
  • -

#17 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • View blog
  • Posts: 3,002
  • Joined: 30-January 11

Re: JavaFX usage - discuss?

Posted 22 January 2013 - 04:32 PM

True, but it was meant to be C# code :)
Was This Post Helpful? 0
  • +
  • -

#18 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 849
  • View blog
  • Posts: 2,585
  • Joined: 29-July 11

Re: JavaFX usage - discuss?

Posted 23 January 2013 - 10:58 AM

View PostRyano121, 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.

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.
Was This Post Helpful? 2
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2