naming functions

Started by
4 comments, last by xropi 21 years, 5 months ago
In hungarian notation we have prefixes in front of our variable identifiers. That''s good. But: what if I gave prefixed names to my functions? It may be useful while I always forget the virtual status of my functions... A little "v" prefix may fix this problem for me and perhaps for others too. There is no question, it''s just an idea. Ropi
I'm interested in full featured 3D system development.
Advertisement
I think the general attitude towards hungarianesque conventions on this board is "eww".
[size=2]
please, for the love of all that is good and holy, first read this article on Hungarian wartHogs: http://www.cuj.com/experts/1911/hyslop.htm

The article is a part of the incredibly useful Guru of the Week site: http://www.gotw.ca
quote:Original post by Anonymous Poster
please, for the love of all that is good and holy, first read this article on Hungarian wartHogs: http://www.cuj.com/experts/1911/hyslop.htm

The article is a part of the incredibly useful Guru of the Week site: http://www.gotw.ca


Ok, I''ve read that article. It was edifying, but what about reference variables for example? It''s quite not the same thing as a simple variable. If the name of that variable doesn''t descript this ''feature'' the programmer have to look for it''s declaration instead of knowing it from the name. The same goes for virtual functions too.
I can see that Hungarian notation has some trouble anyway.
I'm interested in full featured 3D system development.
I know some people use your idea about prefixing function names with what they return. I know one former MS employee who does this.
quote:Original post by Russell
I know some people use your idea about prefixing function names with what they return. I know one former MS employee who does this.

What, IntelliSense didn''t work for him either?

A modern IDE exist to eliminate a lot of this nonsense. Can''t remember what parameters a function takes, or what its return type is? Hover the mouse over the function and voila! Unfortunately, MSVS has struggled to provide this simple functionality consistently and reliably, so people still resort to all sorts of unsightly warts. (Yes, blatant misinformation and misdirection has been a contributing factor).

I''ve now found two productivity projects: updating C++''s build process and producing a dependable IDE (both to be implemented on existing code bases). Keep your eyes peeled.

This topic is closed to new replies.

Advertisement