Summary: Suggestions for some better alternative names
           Product: D
           Version: 2.041
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-03-12 06:23:03 PST ---
In my mind (and in the mind of other programmers I know) a "byte" is an
unsigned value. This has caused some bugs in my programs. So A better naming
scheme can be "byte" and "sbyte" for the unsigned and signed bytes. But this is
a exception to naming scheme of D types, and it can cause other bugs. So as
compromise I think "ubyte" can be kept, but "byte" can be removed and replaced
by "sbyte".


In future D programs immutability will probably become quite common. Annotating
all not varying values in the code as "immutable" probably helps avoid some
bugs too, it looks like a good programming practice. The term "immutable" is
correct and readable, but it can be a little too much long. So it can be
replaced by "val" (short for "value", as present in the Scala language).


I find not easy to remember the size of the "wchar" and "dchar" types: is
something 'wide' wider than 'double'? But I don't have very good names to
replace them. For example they can be renamed as "shortchar" (or "char16") for
the 16 bits long, and "longchar" (or "char32") for the 32 bits long. The prefix
short/long makes the length easy to remember. But they are long names.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to