Re:Switched from Subversion to Git
by jrockway on Saturday August 15, 2009 @11:29PM
(#765593)
200,000 getters and setters.
[ Parent
| on HN ]
I'm not convinced language snobbery is something to be encouraged personally :/ If it was lisp it'd be 200,000 lines of parenthesis, if it were python it'd be 200,000 of significant whitespace, perl? 200,000 of random punctuation characters etc etc.
It's not the language, it's what you do with it that counts. If someone is writing countless getters and setters, in any language, they're clearly doing something terribly wrong.
my 2c.
Sure, but at the same time all languages were not created equal. Some are better designed and more powerful than others. They're not all just equally great at different things and let's sing "Kum ba yah" together now.
> 200,000 of significant whitespace
Significant whitespace does not occupy its own lines in Python.
Java doesn't require getters and setters :/
Does there exist even a single non-trivial Java project that does not have loads and loads of them?
Umm yes. Most of them. FWIW, Mibbit/Comet server etc is about 30k lines of java, and the number of 'getter/setters' is probably < 10.
But has anyone fixed this in Java yet, or does every large app still consist of thousands of nearly-identical methods?
Things like parentheses and whitespace don't affect the ongoing maintenance of your codebase; a bunch of code that your IDE typed for you does.
Using your IDE to type code for you is the problem. Not Java. Place the blame where it should be. If a programmer is foolish enough to use an IDE to generate code, and doesn't mind if it's near identical rubbish, then it's not the languages fault anymore.
So could you explain the "right way". I'm not a Java programmer, and googling did not reveal any way to generate accessors other than inserting code in your source file.
An explanation of how you do it would be very valuable, at least to me.
Re:Switched from Subversion to Git
by windsurfer on Sunday August 16, 2009 @09:35AM
(#766067)
I think it's called inheritance, but most programmers try to stay away from that because of the headaches of the diamond problem.