0

I was in class and they were emphasising on the importance of using prefixes to make your code more readable. As a lazy programmer, I've learnt that there's often a way to macro or automate something to reduce the typing needed. I'm a big fan of hotkeys etc. Now this got me to wonder , is it possible to create something like a macro (VS 2013 - macro's are deleted from the program) that would write prefixes in declarations for you?

I imagine just being able to write a list like this :

TextBox - txt

BitMap - bmp

Member variable - m_

...

And then next time you'd write a declaration, it would automaticly put in the prefix after you press the space.

Resharper in c# has something similar, where they would basicly update intelisense to do this, so I imagine c++ having something like this aswell? If not, what langauge should I look into to create this type of code? Intensive googling unfortunately did not yield the answer.

Boyen
  • 1,429
  • 2
  • 15
  • 22
  • Check this http://stackoverflow.com/questions/111933/why-shouldnt-i-use-hungarian-notation and be sure to read the linked article (http://www.joelonsoftware.com/articles/Wrong.html). Thou shall not use hungarian notation for indicating type. – AlexanderBrevig Oct 13 '14 at 14:03
  • Nothing has done more to destroy readability than prefixes. Do the lazy thing and avoid them. – molbdnilo Oct 13 '14 at 14:44
  • @molbdnilo Elaborate? – Boyen Oct 13 '14 at 15:00

0 Answers0