Re: list of anything

2010-12-18 Thread bearophile
spir: > i understand this, but many elements are compile-time things and still > available at runtime: all consts, static, enum... and all funcs! Seems only > types vanish. Right. They traditionally "vanish" because most times you don't need them, so you save both some memory and computations

Re: list of anything

2010-12-18 Thread spir
On Sat, 18 Dec 2010 13:35:21 +0100 David Nadlinger wrote: > > But I could not find a way to do that, instead get weird error messages > > like eg 'int' is not a value (so, what else?). > It is a type, and as such a compile-time entity rather than a runtime > value. You might want to have a lo

Re: list of anything

2010-12-18 Thread David Nadlinger
On 12/18/10 1:16 PM, spir wrote: But I could not find a way to do that, instead get weird error messages like eg 'int' is not a value (so, what else?). It is a type, and as such a compile-time entity rather than a runtime value. You might want to have a look at »typeid()« though, which returns

Re: list of anything

2010-12-18 Thread Tomek Sowiński
spir napisał: > In Lisp-like languages, a list can hold anything: > (1 "a" (1 "a")) > I do not find it trivial to simulate this in D. Using a linked list or an > array: the issue is not with the kind of > collection but with elements. In either case, I guess, elements should > actually be