Re: D and a bazillion of small objects

2010-06-02 Thread Yao G.
Yeah. I think I'll do that. I just hope that no temporary copy is created in other item access or manipulation. Thanks. On Wed, 02 Jun 2010 20:04:53 -0500, Simen kjaeraas wrote: Yao G. wrote: Thanks bearophile. With respect to passing structs as reference, I also have this problem.

I still don't understand the align attribute

2010-06-02 Thread Trass3r
http://digitalmars.com/d/2.0/attribute.html#align "align by itself sets it to the default, which matches the default member alignment of the companion C compiler." OK! "align(Integer): Integer specifies the alignment which matches the behavior of the companion C compiler when non-default al

Re: D and a bazillion of small objects

2010-06-02 Thread Simen kjaeraas
Yao G. wrote: Thanks bearophile. With respect to passing structs as reference, I also have this problem. In the widget, I have a opIndex method, that returns a ListViewItem given an index (like an array). When opIndex return the instance I'm looking for, and then I modify some property (

Re: D and a bazillion of small objects

2010-06-02 Thread Yao G.
Thanks bearophile. With respect to passing structs as reference, I also have this problem. In the widget, I have a opIndex method, that returns a ListViewItem given an index (like an array). When opIndex return the instance I'm looking for, and then I modify some property (a image index, fo

Re: D and a bazillion of small objects

2010-06-02 Thread bearophile
Yao G.: > Hello everybody. > > What's the best practice or more efficient way to deal, in D, with lots of > small objects? My problem is this: I have a small control, ListView. This > control can have hundreds (and theoretically thousands) of items > (ListViewItem instances, to be precise).

D and a bazillion of small objects

2010-06-02 Thread Yao G.
Hello everybody. What's the best practice or more efficient way to deal, in D, with lots of small objects? My problem is this: I have a small control, ListView. This control can have hundreds (and theoretically thousands) of items (ListViewItem instances, to be precise). And, in turn each o

Re: Newbie: Inheritance & slicing problem

2010-06-02 Thread Steven Schveighoffer
On Wed, 02 Jun 2010 13:47:35 -0400, Larry Luther wrote: I have verified the slicing problem within C++. The problem disappears (in accordance with your statements) if "bar" is declared such that it's argument is passed by reference. The bottom line is that C++ overcame this sufficiently to a

Re: Newbie: Inheritance & slicing problem

2010-06-02 Thread Larry Luther
"Steven Schveighoffer" wrote in message news:op.vddvhs17eav...@localhost.localdomain... | On Thu, 27 May 2010 17:04:35 -0400, Larry Luther | wrote: | | > "bearophile" wrote in message | > news:ht4krg$17l...@digitalmars.com... | > | On the base of your long experience do you like D so far? | >