Introdution
The essential question to develop software with RAD application( oriented objects) is usuallly, as known, by generating very "heavy" code:principal cause is, from my point of view, the creation of objects with countless variables and functions that in most software realization are used in minimum part. What is the difference betwen a code written by a programmer and an automatic code creation of a compiler? Well,the trial answer is that a programmer uses and creats intelligently only methods and variables that really occours.
On the other hand, the implementation of specific problems through generic classes is a "help" non only because it makes as right a shorter code for a determinated software solution but also it makes easier to idealise the solution forcing the vission of singolar problem as a sub-problem of a more extended class of solutions. this makes us take advantage in order to accelerate the implementation reducing the prodution cost.
For all of these reasons, I think that is important to invest for the improvement of RAD packages.
In this direction, the idea which about tell below, is an optimum way to solve the problem of "heavy" code.
My idea.
When a RAD compiler (oriented objects as for example "Borland c++ builder") creats the classes for graphic interfaces, for resourses management,..etc., allocates the memory area for countless variables and methods, much tens for each class that are hereditaged by child class.It allocates very other variables for generic subproblem until the leaf nodes(objects).
How many times my pc compiled more than 70000 lines just to make appear a window or less other things..!!
We suppose,for a moment, that we can add to a compiler riserved word essential as a class specificator.
When the compiler reads "essential class X", it must control that in the inner code of class X the label exist precede n>0 variables or methods to each one is associated a bit of mask boolean vector with size equals to n. This vector,then, is allocated in the memory near to object X. Checked the sintax, the compiler is able to allocate in the memory a specific essential class X that contains only the narrowly indispensable informations! Nont only. A essential class X can trasform itself into standard class through the label demask: "A demask X()" define a object without mask vector. The compiler must also check that the class X and those hereditaged by this don't recall methods o variables defined as false exist
Through this data structure, we will be able to creat objects with minimum size: it can image a compiler with a graphic panel where we select a "exist" variables and functions of class X!
It's only a idea...
by Cristian L.
For information cl.orion@tiscali.it.