Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Scrap Your Boilerplate

Name: Anonymous 2015-05-01 16:43

12 lines of Agda code is verified red-black tree insertion.
12 lines of Java code would be a class declaration with some getters/setters

Name: Anonymous 2015-05-02 9:00

>>7
good luck having code like foo.x += 1
If you remove public attribute, then of course you have to change the code using that attribute. So what? This is only relevant for library API. In other cases you just refactor the code using that attribute. If you change the implementation, you most likely have to check the caller code anyway, to check that it's still correct (boring edge cases etc.). The good part in public attribute here is that it forces you to check the usage if implementation changes totally. That reduces bugs. Oh, did I mention using getters and setters make the code harder to read, thus introducing more bugs. LOL, I bet your enterprise code is unreadable shit, full of bugs. All because you insist on your stupid OOP principles. Fucking coder.

Name: Anonymous 2015-05-02 13:43

>>22
I would not change the getArmor() to incorporate buffs/debuffs, I would add a new function getAdjustedArmor() since the raw armor value is still probably used (say in a stat screen for an item or w/e)

Name: Anonymous 2015-05-02 14:33

I would not change the getArmor() to incorporate buffs/debuffs, I would add a new function getAdjustedArmor()
And existing mods would not care about buffs/debuffs.

Name: Anonymous 2015-05-02 14:51

>>41
No, you don't have to change client code, unless you're a shitcoder ignorant of the encapsulation principle. You don't have to refactor and you don't have to check the caller code. The world becomes quite a magical place if you only stop being an ignoramus and start learning proven programming techniques.

Name: Anonymous 2015-05-02 14:54

>>41
The good part in public attribute here is that it forces you to check the usage if implementation changes totally. That reduces bugs.
You sound like a goddamn Haskiefaggot. "Static types everywhere are good, they reduce bugs because if you change a type, you'll break as much code as possible, forcing you to check every usage. The more broken the better!!1" Fucking idiot.

Name: Anonymous 2015-05-02 16:53

>>35
I honestly don't know which one of the two you are referring to. It might very well be a match between trolls.

Name: Anonymous 2015-05-02 19:01

If you rely too much on oo shit to take care of stuff without you having to think about it, you'll start getting bugs where the program does things other than what you think it should do. The code may be doing something now that is very different from what it did when it was first written.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List