[Gambas-devel] Ideas4Gambas

Benoît Minisini gambas at ...1...
Mon Jun 28 15:36:57 CEST 2010


> Hi Benoit and all devs.
> 
> I found in my desk a file that I wrote some time ago, about some
> things I would like to see in Gambas. I'm surprised about that Gambas
> 3 has incorporated some.
> 
> Well, some ideas maybe are stupid or unrealizable, but I would like to
> know what you think about them. There are only two, to not be heavy:
> 
> IDEA: Gambas could provide an abbreviated way to declare members in a
> class. I'm sloth and I like avoid writing code as much as possible
> 
> Instead to write:
> 
> PRIVATE $sFirstName AS String
> PRIVATE $sSurName AS String
> PRIVATE $iAge AS Integer
> PRIVATE $iWeight AS Integer
> 

At the moment, you have to write one declaration by line because it is simpler 
to parse. But note that you can declare several local variables on the same 
line with the DIM keyword.

> Alternately, write that code in this way or something like that:
> 
> PRIVATE $sFirstName, $sSurName AS String

Implementing that syntax is possible, like for the DIM syntax.

> PRIVATE $iAge, $iWeight AS Integer = {21, 75}
> 
> Or much better:
> 
> PRIVATE
>   $sFirstName, $sSurName AS String
>   $iAge, $iWeight AS Integer = {21, 75}
> 
>   CONST
>     ACONST, OTHER, ANOTHER AS Byte = {0,1,2}
> 
> 
> I used "{}" because it's a common math symbol, used to define sets.
> 

But I won't do that one: "{" & "}" are reserved for defining identifiers that 
the compiler must not interpret as keywords.

> -----------
> 
> IDEA: Gambas could make writing and running unit tests
> 
> Building a framework to facilitate the construction, implementation
> and evaluation of unit tests. Maybe by adapting some of existing test
> frameworks.

Can you give more details?

-- 
Benoît Minisini




More information about the Devel mailing list