Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
March 12, 2010 [Issue 3936] New: Suggestions for some better alternative names | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3936 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 AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
March 25, 2010 [Issue 3936] Suggestions for some better alternative names | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=3936 --- Comment #1 from bearophile_hugs@eml.cc 2010-03-25 11:47:18 PDT --- "longchar" is a bad name, because it's not 64 bit long. char32 (or even "intchar") are better. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
March 26, 2010 [Issue 3936] Suggestions for some better alternative names | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=3936 --- Comment #2 from bearophile_hugs@eml.cc 2010-03-26 07:57:17 PDT --- Walter has refused the idea of changing wchar/dchar names. (The "byte" ==> "sbyte" idea is in game still.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
March 31, 2010 [Issue 3936] Suggestions for some better alternative names | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=3936 --- Comment #3 from bearophile_hugs@eml.cc 2010-03-31 07:58:46 PDT --- "auto ref" suggests a name as "auto const" instead of "inout". Or better "auto_ref" and "auto_const". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 29, 2010 [Issue 3936] Suggestions for some better alternative names | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=3936 --- Comment #4 from Sobirari Muhomori <dfj1esp02@sneakemail.com> 2010-09-29 12:13:51 PDT --- there's a common name for int8_t - tiny. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation