Skip to main content
7 events
when toggle format what by license comment
May 23, 2017 at 12:40 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Jun 28, 2012 at 17:31 comment added anthonyvd @user827992, I'm sorry, but Tire inherits from Car? In what world do you live where a "Tire is a kind of Car"? Because that's what inheritance implies. Also, this is indeed not Hungarian Notation at all.
Jun 28, 2012 at 16:58 comment added JBRWilkinson Using single letters for parameters/variables is not Hungarian notation.
Jun 28, 2012 at 16:39 comment added user827992 writing CarTyre.getPressure() is wrong because you are not taking advantages of the OO design and you can simply have a class Tyre that inherits from the class Car. If you read the post that i have linked you will find that this behaviour can only generate noise and is just useless and wrong.
Jun 28, 2012 at 16:36 comment added user827992 what do you mean with "descriptive"? appending type names is also descriptive but is wrong, in general creating this bind between labels and descriptions leads to a lot of useless noise in the communication, also remember that this kind of work ( naming ) should be "atomic", as short as possible and with all the meaning in a single word. Something like Tyre.getPressure(), it's abstract enough and you get all the info that you need, it's abstract because you are not binding the concept of the Tyre with a Car or a Bus, continues
Jun 28, 2012 at 16:23 comment added P.Brian.Mackey Yes and no. To me, Hungarian Notation implies appending type information to variable names, which is not what I am suggesting at all. I simply mean to say variable names should be descriptive. Regarding underscores, the underscores make sense for private variables. Still, I prefer using casing over appending underscores. This avoids breaking intellisense-like features which sort alphabetically.
Jun 28, 2012 at 16:08 history answered user827992 CC BY-SA 3.0