bearophile wrote:
Yes, in my opinion it needs to be fixed. Using unsigned integers
in D is a hazard, so if you use them where they are not necessary
(and representing positive-only values is often not one of such
cases) then you are doing something wrong,
If it's logical and the program wor
BLS:
> I don't understand (in this context) . Can you please elaborate a bit more ?
I have not shown you code because I don't understand your context. But you can
put inside static this() {...} code that can't be run statically, like the
initialization of a run-time thing.
Bye,
bearophile
Stewart Gordon:
> That code needs to be "fixed"? My point was that being forced to use
> signed types for values that cannot possibly be negative doesn't to me
> constitute fixing anything.
Yes, in my opinion it needs to be fixed. Using unsigned integers in D is a
hazard, so if you use them wh
On 02/07/2010 00:26, bearophile wrote:
Steven Schveighoffer:
I think a member initializer has to be a constant expression, like int i =
1. Anything else has to be done in the constructor.
There are the static constructors too, for modules, structs, classes.
Bye,
bearophile
Hi bearophile,
I
Steven Schveighoffer:
> I think a member initializer has to be a constant expression, like int i =
> 1. Anything else has to be done in the constructor.
There are the static constructors too, for modules, structs, classes.
Bye,
bearophile
On 01/07/2010 22:59, Steven Schveighoffer wrote:
On Thu, 01 Jul 2010 15:36:53 -0400, BLS wrote:
Hi, I have a problem with a mixin template. More exact with an
Arraylist!T within a mixin template.
Given.
void main() {
auto p = new Person("Hans", 32);
p ~= new Person("Steve", 40);
p ~= new Perso
On Thu, 01 Jul 2010 15:36:53 -0400, BLS wrote:
Hi, I have a problem with a mixin template. More exact with an
Arraylist!T within a mixin template.
Given.
void main() {
auto p = new Person("Hans", 32);
p ~= new Person("Steve", 40);
p ~= new Person("Bjoern", 101);
}
Hi, I have a problem with a mixin template. More exact with an
Arraylist!T within a mixin template.
Given.
void main() {
auto p = new Person("Hans", 32);
p ~= new Person("Steve", 40);
p ~= new Person("Bjoern", 101);
}
class Person {
private string _name;