Re: CT usage only in executable

2010-07-17 Thread strtr
== Quote from torhu (n...@spam.invalid)'s article > On 15.07.2010 02:29, strtr wrote: > > Not that the memory is really significant compared to the rest of my > > program, > > but I have a few fairly large arrays I use only in compile time and I was > > wondering why dmd still includes those in th

Re: CT usage only in executable

2010-07-17 Thread torhu
On 15.07.2010 02:29, strtr wrote: Not that the memory is really significant compared to the rest of my program, but I have a few fairly large arrays I use only in compile time and I was wondering why dmd still includes those in the executable (simple text search dug them up). As a workaround yo

Re: CT usage only in executable

2010-07-16 Thread Simen kjaeraas
Daniel Murphy wrote: Sorry, I don't have D1 installed. Can you use enum to declare manifest constants in D1 or is it a D2 thing? It's a D2 thing. I believe the D1 way to do it is with static const. If the string is left in the executable from const char[] CT_STRING = "blah blah"; void mai

Re: CT usage only in executable

2010-07-16 Thread Daniel Murphy
"strtr" wrote in message news:i1ql53$306...@digitalmars.com... > == Quote from Daniel Murphy (yebbl...@nospamgmail.com)'s article >> I think if you use enum instead of const/immutable the compiler is not >> meant >> to put them in the executable (it might anyway in some/all cases). >> eg. >> mod

Re: CT usage only in executable

2010-07-16 Thread strtr
== Quote from Daniel Murphy (yebbl...@nospamgmail.com)'s article > I think if you use enum instead of const/immutable the compiler is not meant > to put them in the executable (it might anyway in some/all cases). > eg. > module main; > enum CT_STRING = "int i=0;"; > void main(){ > mixin( CT_STRING

Re: CT usage only in executable

2010-07-16 Thread Daniel Murphy
"strtr" wrote in message news:i1lro6$307...@digitalmars.com... > == Quote from bearophile (bearophileh...@lycos.com)'s article >> strtr: >> > Not that the memory is really significant compared to the rest of my >> > program, >> > but I have a few fairly large arrays I use only in compile time and

Re: CT usage only in executable

2010-07-15 Thread bearophile
strtr: > Too busy reading TDPL? ;) I have not answered because my answer is not useful: I am sure that constant is present in the binary, you probably need LDC with Link-Time Optimization activated to remove them. > btw. how long until runtime mixins? :D D compiler contains an interpreter. It

Re: CT usage only in executable

2010-07-15 Thread strtr
== Quote from strtr (st...@sp.am)'s article > == Quote from bearophile (bearophileh...@lycos.com)'s article > > strtr: > > > Not that the memory is really significant compared to the rest of my > > > program, > > > but I have a few fairly large arrays I use only in compile time and I was > > > won

Re: CT usage only in executable

2010-07-14 Thread strtr
== Quote from bearophile (bearophileh...@lycos.com)'s article > strtr: > > Not that the memory is really significant compared to the rest of my > > program, > > but I have a few fairly large arrays I use only in compile time and I was > > wondering why dmd still includes those in the executable (s

Re: CT usage only in executable

2010-07-14 Thread bearophile
strtr: > Not that the memory is really significant compared to the rest of my program, > but I have a few fairly large arrays I use only in compile time and I was > wondering why dmd still includes those in the executable (simple text search > dug them up). Are you able to create a smallish test c

CT usage only in executable

2010-07-14 Thread strtr
Not that the memory is really significant compared to the rest of my program, but I have a few fairly large arrays I use only in compile time and I was wondering why dmd still includes those in the executable (simple text search dug them up).