|
Members in Shoutbox
None.
Shoutbox Search
Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper /me > Marks as action Shoutbox Information
Moderators may delete any and all shouts at will.
|
Global Shoutbox
Please log in to shout.
[2016-7-18. : 8:19 pm] Roy -- lil-Infernolil-Inferno shouted: Roy Any decent IDE can do it for you IMO. Sure, they can generate them, but that doesn't make them any more appealing.[2016-7-18. : 8:18 pm] Roy -- That's fine too, Vrael. As long as it's a tangible reason, I can't hold it against you.[2016-7-18. : 8:18 pm] Vrael -- I oppose it mostly because you were talking about it and I was feeling dickish[2016-7-18. : 8:18 pm] lil-Inferno -- RoyRoy shouted: Honestly, it's a fault of the language if getters and setters are a pain to write. C# handles it really well with auto-properties. Any decent IDE can do it for you IMO.[2016-7-18. : 8:15 pm] Roy -- I think people who oppose it mostly oppose the Java Way™, which is hideous.[2016-7-18. : 8:14 pm] Roy -- That wouldn't break anything referencing it, because you get/set things the same way you would with a public property.[2016-7-18. : 8:13 pm] Roy -- Since all you do is add the little { get; set; } after the property name.[2016-7-18. : 8:13 pm] Roy -- Converting a public property to a getter/setter when the time comes is a viable solution in some cases, but it causes problems if you're doing serialization of any sort.[2016-7-18. : 8:10 pm] Roy -- In fact, if you don't mind the extra costs associated with refactoring and can accept that risk for the sake of sparing a few characters in your source file, you can choose not to use them. And this goes for any language, including Java.[2016-7-18. : 8:09 pm] Roy -- If everything you write is its most optimal from the very beginning, you can get away with not using getters and setters.[2016-7-18. : 8:08 pm] Vrael -- RoyRoy shouted: You don't change a getter. Changing the public interface breaks code. Therefore the best solution is to hide the implementation completely, so that no matter what changes, you can still fulfill the contract of the public interface. so what do we need getters and setters for again?[2016-7-18. : 8:06 pm] Roy -- You don't change a getter. Changing the public interface breaks code. Therefore the best solution is to hide the implementation completely, so that no matter what changes, you can still fulfill the contract of the public interface.[2016-7-18. : 8:05 pm] Vrael -- if you change a getter in java or w/e from returning an int to returning a float, and that breaks something that expected an int, all you've got is a bunch of extra crap[2016-7-18. : 8:05 pm] Roy -- Sorry, but you need to learn what "spaghetti code" means. You might not like getters and setters, but it's plain as day that they decouple code.[2016-7-18. : 8:03 pm] Vrael -- yes, getters and setters are unnecessary spaghetti code that add frivolous lines of code to otherwise clean beautiful python[2016-7-18. : 8:01 pm] Roy -- So... Spaghetti code. Touch one thing, fix the whole codebase. That's a design issue that scoping solves.[2016-7-18. : 8:01 pm] Vrael -- now if you needed to change a calculation or something that should actually be encapsulated, you of course can change the underlying internals without breaking the agreement[2016-7-18. : 8:00 pm] Vrael -- in python if you need to change from an int to a float you just do it, and if anything breaks that needs it to be an int that's your fault for breaking the agreement that we were supposed to be exchanging an interger-like object[2016-7-18. : 7:57 pm] Vrael -- " I just explained when you [2016-7-18. : 7:57 pm] Roy -- Or does Python have a magic bullet that solves the refactoring problem without getters and setters?[2016-7-18. : 7:57 pm] Roy -- You don't need getters and setters in any language. I just explained when you should use them.[2016-7-18. : 7:56 pm] * Generalpie yawns and flops over*[2016-7-18. : 7:56 pm] Vrael -- oh wait I wouldn't have to write anything because it's python and you don't need getters and setters for attributes[2016-7-18. : 7:56 pm] Vrael -- I didn't agree, it was painful because in python I'd have to write this:[2016-7-18. : 7:52 pm] Vrael -- RoyRoy shouted: Honestly, it's a fault of the language if getters and setters are a pain to write. C# handles it really well with auto-properties. getters and setters are a pain to write in every language[2016-7-18. : 7:51 pm] Roy -- Honestly, it's a fault of the language if getters and setters are a pain to write. C# handles it really well with auto-properties.[2016-7-18. : 7:49 pm] Roy -- This becomes less trivial and more beneficial when you're refactoring classes with more complex properties exposed publicly.[2016-7-18. : 7:48 pm] Roy -- If you use an int for example, and then have a bunch of code that relies on that int, but figure out later you should be using a float and rounding, you can make the change internally and just update the getter to provide the rounded value.[2016-7-18. : 7:46 pm] Roy -- CecilSunkureCecilSunkure shouted: OOP is more like... Okay, I want to add a data member to this class, like an int. Lets make it private. If it's private that means we need to add a gettor and a settor. The gettor should be const, because gettors do not modify internal state. That's not OOP; that's scoping. And it's useful if your internal implementation changes that you don't break anything using it thanks to maintaining a consistent public interface.[2016-7-18. : 7:08 pm] Generalpie -- I tried getting into it and it was just too different for me from when I last played[2016-7-18. : 6:44 pm] jjf28 -- VerdantVerdant shouted: step 1: remove flash oh hell no; that's how bruisers catch teemo![2016-7-18. : 12:29 pm] Ahli -- alternatively, I've uploaded it here on SEN now: http://www.staredit.net/sc1db/file/3560/[2016-7-18. : 12:20 pm] Ahli -- Sie_SayokaSie_Sayoka shouted: got a link for it? i cant find it http://www.samods.org/starcraft/modding_tools googled one that works[2016-7-18. : 9:02 am] Ahli -- sc ai edit III allows you to look at exported map script file contents |