any news on const/invariant?

Bruce Adams tortoise_74 at yeah.who.co.uk
Thu Nov 29 17:08:38 PST 2007


On Thu, 29 Nov 2007 20:31:09 -0000, Bill Baxter  
<dnewsgroup at billbaxter.com> wrote:

> I agree the meaning of "readonly" is perfect, (and how on earth could it  
> mean "put this data in ROM"? It's physically impossible unless D was  
> some kind of EPROM burning software).  BUT those three extra letters  
> over "const" do bother me.  Because in function signatures it can often  
> be repeated  5 or more times.  So though probably in the minority, I'd  
> rather have it become "ro" if it's going to change.  There is some other  
> language that uses that.  I can't remember which one.
>
compilers are used to write firmware which gets downloaded into EEPROMs and
the like. Object module formats like ELF allow allow for separate memory  
regions
with attributes meaning "put me in rom". Embedded C/C++ compilers sometimes
have extensions for this or #pragma's or special purpose linker languages.
This is where readonly, ro, rodata and other terms spring up. D is I  
believe
intended as a systems language than can replace C and C++ even in contexts
like these. Because it is broad in scope like C & C++ you have the same  
high-level
versus low-level conflicts. Ultimately its what it says in the manual that  
counts
however bad the fit with the dictionary word.

Regards,

Bruce.



More information about the Digitalmars-d mailing list