Einzelnen Beitrag anzeigen

Benutzerbild von Uwe Raabe
Uwe Raabe

Registriert seit: 20. Jan 2006
Ort: Lübbecke
10.993 Beiträge
 
Delphi 12 Athens
 
#23

AW: Welche Art Notation wendet ihr an?

  Alt 20. Okt 2016, 23:51
Zu dem Thema gibt es einen etwas länglichen, aber interessanten Artikel von Joel Spolski: Making Wrong Code Look Wrong.
Für den eiligen Leser empfiehlt sich der direkte Sprung zu dem Abschnitt mit der Überschrift I’m Hungary. Die Kernaussage dort ist in etwa diese (zur Info: Charles Simonyi ist der Erfinder der Hungarian Notation):

Zitat:
In Simonyi’s version of Hungarian notation, every variable was prefixed with a lower case tag that indicated the kind of thing that the variable contained.
For example, if the variable name is rwCol, rw is the prefix.
I’m using the word kind on purpose, there, because Simonyi mistakenly used the word type in his paper, and generations of programmers misunderstood what he meant.
Zitat:
In Excel’s source code you see a lot of rw and col and when you see those you know that they refer to rows and columns. Yep, they’re both integers, but it never makes sense to assign between them. In Word, I'm told, you see a lot of xl and xw, where xl means “horizontal coordinates relative to the layout” and xw means “horizontal coordinates relative to the window.” Both ints. Not interchangeable.
Uwe Raabe
Certified Delphi Master Developer
Embarcadero MVP
Blog: The Art of Delphi Programming
  Mit Zitat antworten Zitat