digitalmars.D - register (!keyword)
- Miguel Ferreira Simões (5/5) Nov 24 2004 Currently, as far as I know, "register" is not a keyword in language D.
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (8/16) Nov 24 2004 You should just delete any old "register" leftovers from C/C++.
- Sean Kelly (5/8) Nov 24 2004 No. The "register" keyword is often ignored in modern C/C++ compilers b...
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
Nov 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
Nov 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
Nov 24 2004