[Gambas-user] Suggestions 4 new keywords

Doriano Blengino doriano.blengino at ...1909...
Fri Sep 17 10:44:46 CEST 2010


Fabián Flores Vadell ha scritto:
> 2010/9/16 Doriano Blengino<doriano.blengino at ...1909...>:
>    
>> Ok, I will argue about it. From what I understand, the paradigm you
>> describe looks similar to pascal (and C++): an interface section
>> declares all the public symbols, which will be detailed (implemented)
>> later. So every method declaration must be written twice, in interface
>> and in implementation. And this alone is a lot of typing. When the
>> number of lines between interface and implementation grows to several
>> screens, you start to navigate up and down in the source. A good
>> editor/IDE can help, but the problem remains: why we have to write the
>> same things twice? Perhaps because a compiler born in the '70 could not
>> read the same source twice, especially if that source was punched on
>> cards... it is no surprise that a pascal compiler, on modern computers,
>> is so fast: the program is written in a way totally good for the compiler!
>>
>> So, I prefer the gambas way - you write things once, exactly where you
>> want, and the compiler does the rest.
>>      
> Ok. Now I can understand you.
>
> You mistakenly thought than I meant that "INTERFACE" and
> "IMPLEMENTATION" keywords should work as they do in Pascal. But I'm
> don't saying that. Nothing about that there's in the example I wrote.
>
> There's no need to double typing.
>    
Sorry for insisting, but as I am getting older and my brain too, it is a 
pleasure for me to discover that I was remembering right. This is an 
excerpt from your previous email, found in the waste bin:

>    'Same name is used in INTERFACE: this would possible because the
> scope is different
>    METHOD DoSomething()
>      . . .
>    END
"Same name used in INTERFACE"... isn't it a double typing?

Being in search, it's time for another doubt about my brain... you speak 
a lot of encapsulation. Well, while replying to you I was vaguely 
thinking that encapsulation does not mean exactly what you mean - but 
now I consulted the wikipedia. Encapsulation means to associate data to 
procedures meant to manage that data - and eventually hide something. 
The boundary is not so clear, but anyway I find that at least there is 
someone else that thinks like me: that visibility and encapsulation are, 
at least at some extent, different.

Sorry, I realize I look susceptible - but it is not the case. I don't 
want to beat you, I am only happy to discover that my brain still 
works... :-)

To reinforce, I must add that I went to see the message where you explain:

> DIM B AS SET = {Z; x > -3; x < 5}
>
> DIM C AS SET = {0..9}
>
> PRINT A.Intersec(C)
>
> ? 1 3 6 9
This time, I have no criticism - beatiful idea... I sadly think that it 
will not be appreciated, for one reason or another.
And... the result is wrong (sorry... can't resist... :-)).

Regards,
Doriano





More information about the User mailing list