Skip to main content
24 events
when toggle format what by license comment
Apr 12, 2017 at 7:31 history edited CommunityBot
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
Apr 12, 2012 at 4:33 comment added Jim G. -1: I tend to quickly lose interest in a project every time I need to have a variable in a class that could have simply been declared public...: Give me a break!
Apr 12, 2012 at 4:32 history edited Jim G. CC BY-SA 3.0
added 4 characters in body
Apr 11, 2012 at 14:39 history edited CommunityBot
insert duplicate link
Apr 11, 2012 at 14:39 history closed maple_shaft exact duplicate
Apr 11, 2012 at 13:48 comment added Kyralessa You didn't say what language you're using. The answer to this question depends on the language. Some languages have ways to make this sort of thing easier. For instance, C# has auto-properties, which don't need a private backing variable, and code snippets, which make it easier to quickly create code even if it's repetitive.
Apr 11, 2012 at 13:19 comment added ElGringoGrande If you are loosing interest in a project because of tedious work you better find another profession. A large chunk of real development is tedious. Not just getter/setters/properties. But all kinds of things like coding conventions etc.
Feb 8, 2012 at 17:32 comment added kevin cline The answer is completely language-dependent, and also dependent on the clients of the class.
Feb 8, 2012 at 16:06 answer added T I timeline score: 0
Feb 8, 2012 at 15:40 answer added back2dos timeline score: 3
Feb 8, 2012 at 14:07 answer added Rune FS timeline score: 1
Feb 8, 2012 at 14:05 answer added mouviciel timeline score: 0
Feb 8, 2012 at 13:35 answer added Pierre timeline score: -2
Mar 13, 2011 at 16:53 comment added TheLQ @maartins Big +1 for lombok in Java. I used to be in the same boat of "I hate getters" until I found out I can just type @Data and be done with it
Mar 13, 2011 at 14:28 comment added maaartinus Use lombok.Data or other annotations from it to generate the accessors for you without changing the source code.
Mar 13, 2011 at 10:20 answer added jpkroehling timeline score: 3
Mar 13, 2011 at 9:59 answer added Zachary K timeline score: 0
Mar 13, 2011 at 9:49 answer added user1249 timeline score: 10
Mar 13, 2011 at 9:01 vote accept Sal Rahman
Mar 13, 2011 at 8:54 answer added stijn timeline score: 20
Mar 13, 2011 at 8:51 answer added KeesDijk timeline score: 28
Mar 13, 2011 at 8:49 comment added Ed Swangren In a language like Java where you don't have syntactical support for creating simple accessors there are cases where a public variable makes sense. Sometimes you just know that it will never be more than a simple field.
Mar 13, 2011 at 8:29 comment added user7043 There are reasons to do so in e.g. Java. There is absolutely no reason to in e.g. Python. This is (one minor) part of why I use the latter...
Mar 13, 2011 at 8:24 history asked Sal Rahman CC BY-SA 2.5