Jean-Yves F. Barbier ha scritto: > Fabien Bodard a écrit : > >> the same but with a collection to share the result >> > > the access is also *very* easy: > > >>> o = Storage(a=1) > >>> o.a > 1 > >>> o['a'] > 1 > >>> o.a = 2 > >>> o['a'] > 2 > >>> del o.a > >>> o.a > None > > > You can do the same in gambas, using Object[] or Collection, and creating a class for every kind of record. Unfortunately I don't know them enough to explain to you. But I can spend two words about python and ruby, and in general these "agile" languages. They are very handy, but also two problems arise. The first is that, in your example, if you write "o.a", where "o" and "a" are two identifiers (because they are not surrounded by apices or quotes), they don't resolve to two fixed address in memory - so they are no more identifiers. This wastes a lot of CPU cycles, because the interpreter must scan all pool of objects to find them. In other words, python is *slow*. Good to explain concepts, but in practical, heavy applications it is a pain. We can compare two programming IDEs: gambas and some other written in python (Boa? or others I can't remember...). On my machine, they simply suck - when gambas is quick and responsive. And think that an IDE is not a particulary heavy application.
The second problem is that, I think, they don't check enough at compile time (because they can't). For me, coming from pascal, this is a big issue. Most of the time the compiler (pascal, or C) catches all my typing errors, and the rest is ok. But if the compiler does not catch errors, you are never sure that your code is ok. I am already critic with some constructs that gambas does not check enough (for me) - so I really can't stand with less rigid languages. Just a simple opinion. I think that if you investigate well your needs, you will find a clean and effective way to solve with gambas. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user