View Single Post
05/20/14, 10:27 AM   #5
Wobin
 
Wobin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 78
Code:
local value = --some String input that has to be parsed in the setter
value = gsSomeValue(value)
I'm sorry, but this ... just isn't clear at all. I would rate code readability much more highly over unnecessary encapsulation. What does it do? Do I have to trace back into the function to get a sense of just what's happening to a string as a -side effect- of a get/setter? Why are we setting it back to the local value?

If I came across this function in the wild, it would make no sense at all. Ok, I can understand, to a certain degree, encapsulation on a theoretical level, but if it overcomplicates the entire process, it's not actually helping, only hindering.

How is this in any way beneficial to the system? How is this easier to use than stripping it down to simple basics?
  Reply With Quote