Use of 'l' or 'L' and 'u' or 'U' infront of the right data type.

  • Thread starter Thread starter dE_logics
  • Start date Start date
  • Tags Tags
    Data Type
Click For Summary

Discussion Overview

The discussion revolves around the use of prefixes such as 'l' or 'L' for long values and 'u' for unsigned values in programming, exploring the utility and implications of this notation in relation to readability and type identification.

Discussion Character

  • Debate/contested

Main Points Raised

  • Some participants propose that the prefixes serve to indicate the data type, enhancing readability.
  • Others argue that this practice resembles Hungarian notation, which has mixed opinions regarding its effectiveness.
  • A participant suggests that the primary utility of these prefixes is to make the program machine readable.
  • Another viewpoint emphasizes that the notation is intended for human readability, particularly in environments without IDE support.
  • There is a mention that Hungarian notation is less favored in contemporary programming practices, especially the variant used by Microsoft.

Areas of Agreement / Disagreement

Contextual Notes

dE_logics
Messages
742
Reaction score
0
We put a 'u' in front of an unsigned value or 'l' infront of a long value...etc...different for different datatypes, but what's the utility of this?
 
Technology news on Phys.org
Sounds like a form of Hungarian notation. It's supposed to remind you of the type of the data. I've read a good argument that Hungarian notation as it was originally intended ("Applications Hungarian") was a good idea, but Hungarian notation adapted to denote data types only ("Systems Hungarian") was not.
 
So it actually has no use apart from making the program machine readable.
 
It's for making the program HUMAN readable.

Hungarian notation is somewhat useful when you don't have an IDE to help you identify potential typing errors or remind you what the scope of a variable is.

It's somewhat frowned upon these days, especially the microsoft variety of m_intPosX.
 
Oh sorry, human readable :smile:
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
1
Views
2K
  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K