Should I use Hungarian Notation when writing a win32 program in C?

BoQsc 1 Reputation point
2020-12-01T20:42:23.103+00:00

If you were to start a new project or when you are reading a source code do you prefer Hungarian Notation? As one of inexperienced developers, I find Hungarian Notation irritating, please help me feel better about it.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,675 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Darran Rowe 1,046 Reputation points
    2020-12-01T22:13:21.277+00:00

    As an experienced developer I find that kind of notation annoying.

    Unless you are working somewhere that has code style guidelines that state that you must use Hungarian notation, then you really shouldn't force yourself.

    One thing to remember about this notation is that it was conceived to allow you to know the type of the variable, but modern environments have seriously mitigated the need for this. Visual Studio, as an example, easily shows the types of variables meaning that you can avoid having to do this.

    1 person found this answer helpful.
    0 comments No comments

  2. Rita Han - MSFT 2,166 Reputation points
    2020-12-02T08:30:53.13+00:00

    Hello @BoQsc ,

    Many of the code examples on MSDN use Hungarian notation, understand Hungarian Notation to help you to read source code. But you don't need to memorize the prefixes to understand the code.

    As for whether using Hungarian notation in your code depends on yourself. Becasue Hungarian notation may be a contribution to good coding style but it is not the necessity.

    More references: "Coding Style Conventions" and "Windows Coding Conventions".

    Thank you!


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.