Hungarian notation: This is why MS wanted it...

Started by
38 comments, last by PlayGGY 20 years, 2 months ago
quote:Original post by Trienco
in a windows header. so: what on earth would that be good for? didnt they like lower case type names? did they feel the need to pollute the global namespace a little more than they already did with all the unicode function defines?

There are/have been at least three variations of the Windows API: Win16, Win32 and Win64.

Think about that for a while.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Advertisement
quote:Original post by Arild Fines
There are/have been at least three variations of the Windows API: Win16, Win32 and Win64.

Think about that for a while.


if i do that i end up thinking "namespace" or at least "prefix". opengl does something like that but at least they had the decency to call them GL_. if you already have to pollute the global namespace it wouldnt hurt to at least use names that are unlikely to be used by someone else. but maybe thats just me ,-)

f@dzhttp://festini.device-zero.de
quote:Original post by Arild Fines
quote:Original post by Trienco
in a windows header. so: what on earth would that be good for? didnt they like lower case type names? did they feel the need to pollute the global namespace a little more than they already did with all the unicode function defines?

There are/have been at least three variations of the Windows API: Win16, Win32 and Win64.

Think about that for a while.


I''m thinking, and I''m thinking the win16 api functions should have been prefixed with win_, the win32 with w32_ and the win64 with w64_.

Anyway, SHORT may be a short on your compiler, but not on everyone else''s. It''s an unpleasant solution to an unpleasant problem.

CoV
CoV
quote:Original post by Mayrel
quote:Original post by Arild Fines
quote:Original post by Trienco
in a windows header. so: what on earth would that be good for? didnt they like lower case type names? did they feel the need to pollute the global namespace a little more than they already did with all the unicode function defines?

There are/have been at least three variations of the Windows API: Win16, Win32 and Win64.

Think about that for a while.


I''m thinking, and I''m thinking the win16 api functions should have been prefixed with win_, the win32 with w32_ and the win64 with w64_.

Anyway, SHORT may be a short on your compiler, but not on everyone else''s. It''s an unpleasant solution to an unpleasant problem.

CoV



Think about porting your app/game from win32 to win64. You change a setting in project properties and hit recompile.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

quote:Original post by Endurion
I''m thinking, and I''m thinking the win16 api functions should have been prefixed with win_, the win32 with w32_ and the win64 with w64_.

Think about porting your app/game from win32 to win64. You change a setting in project properties and hit recompile.

So? If Win64 provides the Win32 interfaces, they''d have w32_ prefixes as they did in Win32. The new Win64 interfaces should be prefixed with w64_. That way, Microsoft are free to fix those parts of the interface that are known to be stupid and provide a better interface to native Win64 programs, whilst still supporting Win32 programs.

CoV
CoV
quote:Original post by Mayrel
So? If Win64 provides the Win32 interfaces, they''d have w32_ prefixes as they did in Win32. The new Win64 interfaces should be prefixed with w64_. That way, Microsoft are free to fix those parts of the interface that are known to be stupid and provide a better interface to native Win64 programs, whilst still supporting Win32 programs.

There aren''t really any new "interfaces". Well written Win32 code will generally compile as is under Win64. If you''d started messing about with prefixes for this and that, you''d have to rewrite your app for Win64.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
quote:Original post by DJSnow
certainly not - for the compiler the variable names are nothing else than addresses; the "character-based names" are only for us dumb humans...


Not quite. Take a look at the symbol table of a DLL near you.
Good Ol'' Overloading...

Although there is always the risk of ambiguity..

_________________Politics is the ability to foretell what is going to happen tomorrow, next week, next month and next year. And to have the ability afterwards to explain why it didn't happen. -- Winston ChurchillGDNet-0.2 - rate users the easy way with this nifty Firefox extension. Updated with new features.
quote:Original post by Drevay
Good Ol'' Overloading...

Although there is always the risk of ambiguity..



The Win32 API doesn''t use overloading because C doesn''t support it.
And the rockets' red glare, the bombs bursting in air,gave proof through the fight that our flag was still there.Oh say, does that star-spangled banner yet waveover the land of the free and the home of the brave?
quote:Original post by Arild Fines
quote:Original post by Mayrel
So? If Win64 provides the Win32 interfaces, they''d have w32_ prefixes as they did in Win32. The new Win64 interfaces should be prefixed with w64_. That way, Microsoft are free to fix those parts of the interface that are known to be stupid and provide a better interface to native Win64 programs, whilst still supporting Win32 programs.

There aren''t really any new "interfaces". Well written Win32 code will generally compile as is under Win64. If you''d started messing about with prefixes for this and that, you''d have to rewrite your app for Win64.


...plus even if MS wanted they can''t simply change the names for all the existing code. Backwards compatibility comes to mind.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

This topic is closed to new replies.

Advertisement