February 18, 2006 Re: Get rid of byte? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > "Bruno Medeiros" <daiphoenixNO@SPAMlycos.com> wrote in message news:dt705s$1vkh$1@digitaldaemon.com... >> Still, it might be nice to have those types in the language, as aliases. It could be a good name alternative, in some situations, to using the new names(like real or cent) for every new size that has come up. > > import std.stdint; > > Hum, interesting, didn't remember about that. Nice, but should also: not have the "_t" idiom; have similar aliases for floating point types (float32, float64, float80, etc.) -- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural." |
February 18, 2006 Re: Get rid of byte? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote:
> You could just change it altogether, since it's easy to globally search and replace for intxx_t. Besides, how many C programs have you seen that _actually use the stdints_? It seems every open-source project out there has its own set of defines or typedefs to rename the types whatever they want, be it int8, byte, i8 or something else altogether.
Well here is one example: qemu. No doubt a bazillion C programs don't use stdint.h, but that is probably due to the fact it only appeared in C99.
Marco
|
February 18, 2006 Re: Get rid of byte? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sat, 18 Feb 2006 14:59:42 -0500, Walter Bright <newshound@digitalmars.com> wrote:
>
> "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message
> news:dt7q7f$2kfm$1@digitaldaemon.com...
>> "Walter Bright" <newshound@digitalmars.com> wrote in message
>> news:dt7mur$2hvs$2@digitaldaemon.com...
>>>
>>> "Bruno Medeiros" <daiphoenixNO@SPAMlycos.com> wrote in message
>>> news:dt705s$1vkh$1@digitaldaemon.com...
>>>> Still, it might be nice to have those types in the language, as aliases.
>>>> It could be a good name alternative, in some situations, to using the
>>>> new names(like real or cent) for every new size that has come up.
>>>
>>> import std.stdint;
>>
>> Could the _t suffix at least be taken off those aliases (alii?) ? int8_t
>> has got to be one of the ugliest things I've seen since CLK_TCK.
>
> I agree it's ugly, but the names were taken from C's <stdint>. That makes it
> convenient for porting from C, and for those who like the C stuff. Having
> yet a third set of names would be a bit too redundant.
Could deprecate them, and/or have them in std.c.stdint, and add ones without _t to std.stdint.
|
February 19, 2006 Re: Get rid of byte? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote:
> Could the _t suffix at least be taken off those aliases (alii?) ? int8_t has got to be one of the ugliest things I've seen since CLK_TCK.
It also appears on "size_t", the type of the array .length attribute...
(that is similar to "uint" for 32-bit code and "ulong" for 64-bit code)
So it's in D already :-)
--anders
PS.
I liked the "std.stdutf" idea too, but it seems noone else did.
alias char utf8_t;
alias wchar utf16_t;
alias dchar utf32_t;
|
February 19, 2006 Re: Get rid of byte? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:dt7vhe$2phg$1@digitaldaemon.com... > Of course, this is never going to change, so I'm not sure why I even bother. If it was changed, there'd inevitably be someone who thought it would be a great idea to use the stdint.h names and who'd think ill of me for not making that change. There's no solution possible. At some point, it's time to just leave it be and move on to more interesting things. |
February 20, 2006 Re: Get rid of byte? [OT] alii | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote: > "Walter Bright" <newshound@digitalmars.com> wrote in message news:dt7mur$2hvs$2@digitaldaemon.com... > >>"Bruno Medeiros" <daiphoenixNO@SPAMlycos.com> wrote in message news:dt705s$1vkh$1@digitaldaemon.com... >> >>>Still, it might be nice to have those types in the language, as aliases. It could be a good name alternative, in some situations, to using the new names(like real or cent) for every new size that has come up. >> >>import std.stdint; > > > Could the _t suffix at least be taken off those aliases (alii?) ? int8_t has got to be one of the ugliest things I've seen since CLK_TCK. > > FYI, the -i plural suffix only applies to words that end in 'us', not 'as' or other variants. cactus -> cacti genius -> genii hippopotamus -> hippopotami Apparently, 'bus' is the exception to the rule. "Hey look at all those bi!" An interesting read: http://www.csse.monash.edu.au/~damian/papers/extabs/Plurals.html -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O M--@ V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e h>--->++ r+++ y+++ ------END GEEK CODE BLOCK------ James Dunne |
February 20, 2006 Re: Get rid of byte? [OT] alii | ||||
---|---|---|---|---|
| ||||
Posted in reply to James Dunne | "James Dunne" <james.jdunne@gmail.com> wrote in message news:dtdehf$2pu7$1@digitaldaemon.com... > Jarrett Billingsley wrote: >> "Walter Bright" <newshound@digitalmars.com> wrote in message news:dt7mur$2hvs$2@digitaldaemon.com... >> >>>"Bruno Medeiros" <daiphoenixNO@SPAMlycos.com> wrote in message news:dt705s$1vkh$1@digitaldaemon.com... >>> >>>>Still, it might be nice to have those types in the language, as aliases. It could be a good name alternative, in some situations, to using the new names(like real or cent) for every new size that has come up. >>> >>>import std.stdint; >> >> >> Could the _t suffix at least be taken off those aliases (alii?) ? int8_t has got to be one of the ugliest things I've seen since CLK_TCK. > > FYI, the -i plural suffix only applies to words that end in 'us', not 'as' or other variants. > > cactus -> cacti > genius -> genii > hippopotamus -> hippopotami > > Apparently, 'bus' is the exception to the rule. "Hey look at all those bi!" Call me a pedant (it wouldn't be the first time), but 'bus' is just one of many exceptions. corpus corpora viscus viscera platypus platypuses opus opera virus viruses (although see "Use of the virii form" at http://en.wikipedia.org/wiki/Viruses) Bus, of course, is short for omnibus, which in Latin was a plural anyway. > > An interesting read: http://www.csse.monash.edu.au/~damian/papers/extabs/Plurals.html > > -- > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O > M--@ V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e h>--->++ > r+++ y+++ > ------END GEEK CODE BLOCK------ > > James Dunne |
February 21, 2006 Re: Get rid of byte? [OT] alii | ||||
---|---|---|---|---|
| ||||
Posted in reply to James Dunne | "James Dunne" <james.jdunne@gmail.com> wrote in message news:dtdehf$2pu7$1@digitaldaemon.com... >> FYI, the -i plural suffix only applies to words that end in 'us', not 'as' or other variants. Ah! >> Apparently, 'bus' is the exception to the rule. "Hey look at all those bi!" Lol, of course that phrase could come up in certain situations ;) |
February 21, 2006 Re: Get rid of byte? [OT] alii | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | John C wrote: > "James Dunne" <james.jdunne@gmail.com> wrote in message news:dtdehf$2pu7$1@digitaldaemon.com... > >>Jarrett Billingsley wrote: >> >>>"Walter Bright" <newshound@digitalmars.com> wrote in message news:dt7mur$2hvs$2@digitaldaemon.com... >>> >>> >>>>"Bruno Medeiros" <daiphoenixNO@SPAMlycos.com> wrote in message news:dt705s$1vkh$1@digitaldaemon.com... >>>> >>>> >>>>>Still, it might be nice to have those types in the language, as aliases. It could be a good name alternative, in some situations, to using the new names(like real or cent) for every new size that has come up. >>>> >>>>import std.stdint; >>> >>> >>>Could the _t suffix at least be taken off those aliases (alii?) ? int8_t has got to be one of the ugliest things I've seen since CLK_TCK. >> >>FYI, the -i plural suffix only applies to words that end in 'us', not 'as' or other variants. >> >>cactus -> cacti >>genius -> genii >>hippopotamus -> hippopotami >> >>Apparently, 'bus' is the exception to the rule. "Hey look at all those bi!" > > > Call me a pedant (it wouldn't be the first time), but 'bus' is just one of many exceptions. > > corpus corpora > viscus viscera > platypus platypuses > opus opera > virus viruses (although see "Use of the virii form" at http://en.wikipedia.org/wiki/Viruses) > > Bus, of course, is short for omnibus, which in Latin was a plural anyway. > > >>An interesting read: http://www.csse.monash.edu.au/~damian/papers/extabs/Plurals.html >> >>-- >>-----BEGIN GEEK CODE BLOCK----- >>Version: 3.1 >>GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O M--@ V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e h>--->++ r+++ y+++ >>------END GEEK CODE BLOCK------ >> >>James Dunne > > > Learn something new everyday. I did know 'bus' was short for something, but I didn't know that. I'm not a fan of the -uses plural suffix. I prefer the -i plural. Platypus = platypi. It just sounds more natural to me. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O M--@ V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e h>--->++ r+++ y+++ ------END GEEK CODE BLOCK------ James Dunne |
February 23, 2006 Re: Get rid of byte? [OT] alii | ||||
---|---|---|---|---|
| ||||
Posted in reply to James Dunne | James Dunne wrote:
> John C wrote:
>
>> "James Dunne" <james.jdunne@gmail.com> wrote in message news:dtdehf$2pu7$1@digitaldaemon.com...
>>
>>> Jarrett Billingsley wrote:
>>>
>>>> "Walter Bright" <newshound@digitalmars.com> wrote in message news:dt7mur$2hvs$2@digitaldaemon.com...
>>>>
>>>>
>>>>> "Bruno Medeiros" <daiphoenixNO@SPAMlycos.com> wrote in message news:dt705s$1vkh$1@digitaldaemon.com...
>>>>>
>>>>>
>>>>>> Still, it might be nice to have those types in the language, as aliases. It could be a good name alternative, in some situations, to using the new names(like real or cent) for every new size that has come up.
>>>>>
>>>>>
>>>>> import std.stdint;
>>>>
>>>>
>>>>
>>>> Could the _t suffix at least be taken off those aliases (alii?) ? int8_t has got to be one of the ugliest things I've seen since CLK_TCK.
>>>
>>>
>>> FYI, the -i plural suffix only applies to words that end in 'us', not 'as' or other variants.
>>>
>>> cactus -> cacti
>>> genius -> genii
>>> hippopotamus -> hippopotami
>>>
>>> Apparently, 'bus' is the exception to the rule. "Hey look at all those bi!"
>>
>>
>>
>> Call me a pedant (it wouldn't be the first time), but 'bus' is just one of many exceptions.
>>
>> corpus corpora
>> viscus viscera
>> platypus platypuses
>> opus opera
>> virus viruses (although see "Use of the virii form" at http://en.wikipedia.org/wiki/Viruses)
>>
>> Bus, of course, is short for omnibus, which in Latin was a plural anyway.
>>
>>
>>> An interesting read: http://www.csse.monash.edu.au/~damian/papers/extabs/Plurals.html
>>>
>>> --
>>> -----BEGIN GEEK CODE BLOCK-----
>>> Version: 3.1
>>> GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O M--@ V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e h>--->++ r+++ y+++
>>> ------END GEEK CODE BLOCK------
>
> Learn something new everyday. I did know 'bus' was short for something, but I didn't know that.
>
> I'm not a fan of the -uses plural suffix. I prefer the -i plural. Platypus = platypi. It just sounds more natural to me.
So be it. Then you probably know the pluralis of 'sauna'.
|
Copyright © 1999-2021 by the D Language Foundation