Re: [Vala] Difference between Gee.List and ArrayList



On Mon, April 21, 2008 22:11, Jaap A. Haitsma wrote:
On Mon, Apr 21, 2008 at 8:17 AM, Jürg Billeter <j bitron ch> wrote:
On Mon, 2008-04-21 at 07:43 +0200, Jaap A. Haitsma wrote:
 > However when I change "Gee.List list = new ArrayList<string> ();" to
 > "var list = new ArrayList<string> ();" it doesn't

 That was a bug, it's fixed now in SVN.

Thanks for fixing this :-)

In the vala compiler code there are quite "Gee.List list = new
ArrayList<someclass> ()" statements. Should these be changed
"ArrayList list ....", to "var list ...." or should we keep it as is?

The reason we use Gee.List instead of ArrayList in fields and method
return values is that we don't want to unnecessarily expose implementation
details. However, these doesn't really hold for local variables, so using
`var' usually makes sense there. It's not really necessary to change the
existing code, though.

Juerg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]