> Try this too:
>
> __gshared int[1_000_000] array;
> void main() {}
Sorry, I meant:
__gshared int[1_000_000] array = void;
void main() {}
Bye,
bearophile
t. So it's not required to allocate everything on the
stack.
> Yes both are Turing complete :)
I meant to add "with similar efficiency of C++ code too" :-)
> Ok I understand it, but if some linkers fail, then isn't this the
> linkgers problem?
I don't know, b
> Generally what's possible in C++ is possible in D too, even if maybe in a
> different way. I think all you say here is doable in D too, with different
> means.
Yes both are Turing complete :) But after all I hope that D makes
things easier and helps me to spot errors of certain as
Don Clugston:
> Does the library solution actually work the same as the language solution?
Some time ago scoped worked worse than the built-in scope:
http://d.puremagic.com/issues/show_bug.cgi?id=5115
But I don't know how well scoped works now, I have never used it any more.
Bye,
bearophile
On 21/02/12 12:12, Timon Gehr wrote:
On 02/21/2012 11:27 AM, Daniel Murphy wrote:
scope/scoped isn't broken, they're just not safe. It's better to have an
unsafe library feature than an unsafe language feature.
scope is broken because it is not enforced by the means of
flow-analysis. As a re
On 02/21/2012 11:27 AM, Daniel Murphy wrote:
scope/scoped isn't broken, they're just not safe. It's better to have an
unsafe library feature than an unsafe language feature.
scope is broken because it is not enforced by the means of
flow-analysis. As a result, it is not safe. Copying it to
scope/scoped isn't broken, they're just not safe. It's better to have an
unsafe library feature than an unsafe language feature.
;s possible in C++ is possible in D too, even if maybe in a
different way. I think all you say here is doable in D too, with different
means.
> Another problem with my whole, everything on the stack idea, is that D
> limits my arrays to an internal limit (any paramter to change it?).
>
scope auto e1 = new EntryInt();
Foo = e1.toFoo();
You don't need auto there.
And scope is deprecated, use std.typecons' scoped
uot; class. Missing copy
construction one could probably solve manually, by just carefully
create an own core class library (or just juse memcpy).
struct Queue(T, int N) {
}
scope class MyClass {
}
Queue!(MyClass) m;
Another problem with my whole, everything on the stack idea, is that D
limit
10 matches
Mail list logo