Re: distinguish between classes and structures

2008-12-16 Thread Weed
Kagamin пишет: Weed Wrote: it is impossible to create the struct of the object which will be arbitrary size (raised by a user) + to be able to set compile-time + should work with the structures of its type. this is mathematical matrix, for example Matix? Easy. class Matrix //can inherit f

Re: distinguish between classes and structures

2008-12-16 Thread Kagamin
Weed Wrote: > it is impossible to create the struct of the object which will be > arbitrary size (raised by a user) + to be able to set compile-time + > should work with the structures of its type. > > this is mathematical matrix, for example Matix? Easy. class Matrix //can inherit from some

Re: distinguish between classes and structures

2008-12-16 Thread Weed
Bill Baxter пишет: 2008/12/16 Weed : Frits van Bommel пишет: Weed wrote: In C++, we had the problem - "slicing" objects. In D this problem is solved inability to inherit from structs. Without inheritance of structs many things are not possible, compared with C++. Why, instead of the complete i

Re: distinguish between classes and structures

2008-12-15 Thread Weed
Bill Baxter пишет: 2008/12/16 Weed : Frits van Bommel пишет: Weed wrote: In C++, we had the problem - "slicing" objects. In D this problem is solved inability to inherit from structs. Without inheritance of structs many things are not possible, compared with C++. Why, instead of the complete i

Re: distinguish between classes and structures

2008-12-15 Thread Weed
Bill Baxter пишет: 2008/12/16 Weed : Frits van Bommel пишет: Weed wrote: In C++, we had the problem - "slicing" objects. In D this problem is solved inability to inherit from structs. Without inheritance of structs many things are not possible, compared with C++. Why, instead of the complete i

Re: distinguish between classes and structures

2008-12-15 Thread Bill Baxter
2008/12/16 Weed : > Frits van Bommel пишет: >> >> Weed wrote: >>> >>> In C++, we had the problem - "slicing" objects. >>> In D this problem is solved inability to inherit from structs. >>> Without inheritance of structs many things are not possible, compared >>> with C++. >>> Why, instead of the co

Re: distinguish between classes and structures

2008-12-15 Thread Weed
Frits van Bommel пишет: Weed wrote: In C++, we had the problem - "slicing" objects. In D this problem is solved inability to inherit from structs. Without inheritance of structs many things are not possible, compared with C++. Why, instead of the complete inability to inherit, just do not make

Re: distinguish between classes and structures

2008-12-15 Thread Weed
Kagamin пишет: Weed Wrote: Without inheritance of structs many things are not possible, compared with C++. for example? it is impossible to create the struct of the object which will be arbitrary size (raised by a user) + to be able to set compile-time + should work with the struc

Re: distinguish between classes and structures

2008-12-15 Thread Weed
Frits van Bommel пишет: Weed wrote: In C++, we had the problem - "slicing" objects. In D this problem is solved inability to inherit from structs. Without inheritance of structs many things are not possible, compared with C++. Why, instead of the complete inability to inherit, just do not make

Re: distinguish between classes and structures

2008-12-15 Thread Frits van Bommel
Weed wrote: In C++, we had the problem - "slicing" objects. In D this problem is solved inability to inherit from structs. Without inheritance of structs many things are not possible, compared with C++. Why, instead of the complete inability to inherit, just do not make impossible to up casting

Re: distinguish between classes and structures

2008-12-15 Thread Kagamin
Weed Wrote: > Without inheritance of structs many things are not possible, compared > with C++. for example?

Re: distinguish between classes and structures

2008-12-15 Thread Weed
Weed пишет: Why, instead of the complete inability to inherit, just do not make impossible to up casting struct type by value. It's a question: Why, instead of the complete inability to inherit, just do not make impossible to up casting struct type by value?

Re: distinguish between classes and structures

2008-12-15 Thread Weed
Bill Baxter пишет: 2008/12/15 Weed : Bill Baxter пишет: On Mon, Dec 15, 2008 at 3:35 PM, Weed wrote: Who can provide a link to an explanation about why in D has taken to distinguish between classes and structures? (Sorry for my bad English) The main justification is eliminating the slicing

Re: distinguish between classes and structures

2008-12-15 Thread Bill Baxter
2008/12/15 Weed : > Weed пишет: >> >> Bill Baxter пишет: >>> >>> On Mon, Dec 15, 2008 at 3:35 PM, Weed wrote: Who can provide a link to an explanation about why in D has taken to distinguish between classes and structures? (Sorry for my bad English) >>> >>> The main j

Re: distinguish between classes and structures

2008-12-15 Thread Bill Baxter
2008/12/15 Weed : > Bill Baxter пишет: >> >> On Mon, Dec 15, 2008 at 3:35 PM, Weed wrote: >>> >>> Who can provide a link to an explanation about why in D has taken to >>> distinguish between classes and structures? >>> >>> (Sorry for my bad English) >>> >> >> The main justification is eliminating

Re: distinguish between classes and structures

2008-12-15 Thread Weed
Weed пишет: Bill Baxter пишет: On Mon, Dec 15, 2008 at 3:35 PM, Weed wrote: Who can provide a link to an explanation about why in D has taken to distinguish between classes and structures? (Sorry for my bad English) The main justification is eliminating the slicing problem. http://cplusplu

Re: distinguish between classes and structures

2008-12-14 Thread Weed
Bill Baxter пишет: On Mon, Dec 15, 2008 at 3:35 PM, Weed wrote: Who can provide a link to an explanation about why in D has taken to distinguish between classes and structures? (Sorry for my bad English) The main justification is eliminating the slicing problem. http://cplusplusgems.blogspo

Re: distinguish between classes and structures

2008-12-14 Thread Bill Baxter
On Mon, Dec 15, 2008 at 3:35 PM, Weed wrote: > Who can provide a link to an explanation about why in D has taken to > distinguish between classes and structures? > > (Sorry for my bad English) > The main justification is eliminating the slicing problem. http://cplusplusgems.blogspot.com/2005/10/w