Thread overview
register (!keyword)
Nov 24, 2004
Sean Kelly
November 24, 2004
Currently, as far as I know, "register" is not a keyword in language D. My question is the following: should we encourage the use of it in the source files? Do you think in the future it will be a keyword?

-- 
Miguel Ferreira Simoes


November 24, 2004
Miguel Ferreira Simões wrote:

> Currently, as far as I know, "register" is not a keyword in language D.
> My question is the following: should we encourage the use of it in the source files? Do you think in the future it will be a keyword?

You should just delete any old "register" leftovers from C/C++.
Same goes for the "inline" designation of a function or method.

Says http://www.digitalmars.com/d/function.html:
> Inline Functions
> There is no inline keyword. The compiler makes the decision
> whether to inline a function or not, analogously to the register
> keyword no longer being relevant to a compiler's decisions on
> enregistering variables. (There is no register keyword either.)

So they will not be keywords (or valid), in any D source code.
The D compiler decides whether or not to enregister or inline.

You should not depend on it actually doing so...

--anders
November 24, 2004
In article <co1inu$pve$1@digitaldaemon.com>, Miguel Ferreira Simões says...
>
>
>Currently, as far as I know, "register" is not a keyword in language D. My question is the following: should we encourage the use of it in the source files? Do you think in the future it will be a keyword?

No.  The "register" keyword is often ignored in modern C/C++ compilers because the optimizer can do a better job at this sort of optimization than the programmer can.


Sean