Is there a specific name for the prefix notation used in Delphi often?

Possible duplicate:
Does my naming convention have a name?

The designation in question is described below:

  • T for t ype
  • P for p ointer
  • F for f ield
  • A for a rgument
  • L for l ocal

et cetera, at least S is not in the list, but I'm not sure which line it stands for.

The first 3 prefices were with Delphi from the very beginning, the last 2 I noticed relatively recently. I would like to know the name of the notation (if there is one) and read the normative technical document (and then accept it).

+6
source share
3 answers

Zarko Gajic has a pretty good list for Delphi: http://delphi.about.com/od/standards/l/bldnc.htm

Personally, I find conventions like this useful. I still remember my first FORTRAN language, where the agreement for integers was to start any letter from I to N with them, and it was easy to remember, because these are the first two letters of INteger.

Charles Calvert's Object Pascal Style Guide, Section 3.3, Naming Fields provides a brief but good guide on when to use Hungarian notation, and that identifier names for a single character are appropriate. My FORTRAN background (8 max symbol names) also made me use "N" as the number of elements and led to code, for example:

  DO 10 I = 1, N DO 20 J = I, N ... 20 CONTINUE 10 CONTINUE 

Oh! The memory hurts.

+5
source

My personal favorite of all these standards is to obey the standards already set in the code in which you are located and not try to impose another standard 50% of the way and prevent religious discussions. p>

But if you put a lot of pressure on me, I admit that I prefer the Charlie Calvert standards used by the JVCL devs , the same as the section 3.3 "from LKessler above.

+1
source

Hungarian notation.

With modern IDEs (including Delphi), many people (including me) feel that this is no longer necessary.

EDIT: Technically, this is not so Hungarian notation, because sometimes the prefix indicates the scope, not the type.

0
source

Source: https://habr.com/ru/post/890378/


All Articles