digitalmars.D - Re: We need to clarify if 'real' is the 'default floating point type' or not.
- renoX <renosky free.fr> Mar 04 2008
- "Ameer Armaly" <ameer.armaly furman.edu> Mar 04 2008
- JMNorris <nospam nospam.com> Mar 06 2008
- "Ameer Armaly" <ameer.armaly furman.edu> Mar 06 2008
Ameer Armaly Wrote:Maybe we just ought to make int whatever type is fastest, and call the current int something different, maybe dword?
So int would mean 8 bit integers? I'm joking but for some operation 8 bit int *are* 'fastest' than 32 bit int, because they use less cache, memory.. Anything else that intX, uintX is necessarily arbitrary (and even intX is not that simple: some DSP have 24bit integers..), so I'm not sure that it's quite useful to spend too much time on that topic. renoX
Mar 04 2008
"renoX" <renosky free.fr> wrote in message news:fqj8i1$1m01$1 digitalmars.com...Ameer Armaly Wrote:Maybe we just ought to make int whatever type is fastest, and call the current int something different, maybe dword?
So int would mean 8 bit integers? I'm joking but for some operation 8 bit int *are* 'fastest' than 32 bit int, because they use less cache, memory.. Anything else that intX, uintX is necessarily arbitrary (and even intX is not that simple: some DSP have 24bit integers..), so I'm not sure that it's quite useful to spend too much time on that topic.
int types, isn't that part of the rationale behind type inference?renoX
Mar 04 2008
"Ameer Armaly" <ameer.armaly furman.edu> wrote in news:fqjl0e$2mi4$1 digitalmars.com:I don't know why I didn't think of this earlier: auto. If you want optimal int types, isn't that part of the rationale behind type inference?
I assume you're proposing a change in the way auto works. Currently for: auto x = 5 < 7; x has type bool.
Mar 06 2008
"JMNorris" <nospam nospam.com> wrote in message news:fqonmv$25gh$1 digitalmars.com..."Ameer Armaly" <ameer.armaly furman.edu> wrote in news:fqjl0e$2mi4$1 digitalmars.com:I don't know why I didn't think of this earlier: auto. If you want optimal int types, isn't that part of the rationale behind type inference?
I assume you're proposing a change in the way auto works. Currently for: auto x = 5 < 7; x has type bool.
auto x = 5; should yield a long, where as on a 32-bit machine it should yield an int It's not perfect by any stretch, but it's easier given the current circumstances.
Mar 06 2008








"Ameer Armaly" <ameer.armaly furman.edu>