[Gambas-user] Suggestions 4 new keywords

Fabián Flores Vadell fabianfloresvadell at ...626...
Fri Sep 17 16:02:09 CEST 2010


2010/9/17 Doriano Blengino <doriano.blengino at ...1909...>:

>> 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?

Not, because methods in "Interface" are differents from those with the
same name in "Implementation". There's not the case in Pascal.

> 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.

I understand encapsulation in reference to OOP in this way:

Encapsulation mean hide state "and" behavior. That implies existence
of an interface and an implementation separates. But not in reference
to procedures or functions, but to classes.

> 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... :-)).

In that example, ... I don't know how to say this in english... the
sets enclosing its limits:

DIM A AS SET = {1,3,6,9, 14,17}
DIM C AS SET = {0..9}

PRINT A.Intersec(C)

[A] intersecction [C] = [1,3,6,9,14,17] intersecction [0,1,2,3,4,5,6,7,8,9]

? 1 3 6 9

Where is the error?

I think that your brain works fine, but you sometimes read hurriedly.


-- 
Fabián Flores Vadell
www.speedbooksargentina.blogspot.com




More information about the User mailing list