[Gambas-user] Unix Date conversion
Benoit Minisini
gambas at ...1...
Fri Jul 28 18:02:38 CEST 2006
On Wednesday 26 July 2006 07:48, Timothy Marshal-Nichols wrote:
>
> 1. You may have a constructor and destructor in the object and want to
> control when they are executed. Or even if the are executed - say if the
> object was just used on one form that is a dialog. This is even more true
> if your object calls on resources outside of Gambas.
In Gambas, a class has an initializer function named "_init", and its contrary
named "_exit".
If you really need "singletons", i.e. class that you instanciate only once,
the keyword "CREATE" tells Gambas that the class can create an hidden
instance when the class name is used like an object reference.
>
> 2. Good programming languages 'encourage good programming practice' rather
> than force the ideas the language developer on the language user. There
> should be no penalty for using the language in a way not intended by the
> language developer.
There is no penalty in making a useless dynamic class just for using dynamic
methods instead of static ones, except the memory taken by the single
instance needed to call the methods.
> This is why C and C++ have always been more popular
> then Pascal. Both the C and Pascal languages were developed by people who
> were influenced by the ideas of structured programming that were around at
> the time. Both wanted to get away from the GOTO style of programming of
> languages like COBOL. C took the first approach. C rewarded you for good
> programming practice - Pascal forced you. This is one reason why you use
> C/C++ to develop Gambas and not Pascal!
>
I use C/C++ because they are the language to use when developing interpreters
and using libraries on Linux.
And the big problem with Pascal is that you have to type many boring keywords
and ';' to do simple things :-)
Regards,
--
Benoit Minisini
More information about the User
mailing list