Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is meant by "Delphi is created in California, so we discourage the use of notation"?

Tags:

delphi

I have learned "Object Pascal Style Guide" in the following site. http://edn.embarcadero.com/article/10280

I cannot understand the following sentence.

"Delphi is created in California, so we discourage the use of notation, except where required in header translations:"

What does this mean?

like image 470
Kanata Tanaka Avatar asked Sep 03 '13 03:09

Kanata Tanaka


1 Answers

If you look a little bit lower down in the article, it clarifies that it's referring to Hungarian notation. Not sure what California has to do with it, but it means that it's considered poor style to use Hungarian notation (prefixing variable names with abbreviations that describe the variable's type) in Delphi code. Like the example it gives:

CORRECT 
  FMyString: string;

INCORRECT
  lpstrMyString: string;

Big, unwieldy prefixes like lpstr (Long Pointer to STRing) are common in Windows API code. The point being made here is that Delphi tries to avoid this convention as a way to make the code easier to read.

like image 99
Mason Wheeler Avatar answered Oct 01 '22 19:10

Mason Wheeler