From: Dmitry A. Kazakov on
On Wed, 09 Jun 2010 16:31:24 +0200, Yannick Duch�ne (Hibou57) wrote:

> Le Wed, 09 Jun 2010 11:24:16 +0200, Dmitry A. Kazakov
> <mailbox(a)dmitry-kazakov.de> a �crit:
>> There are different opinions on whether OO is limited to dynamic
>> polymorphism.
> So what else ? You meant static polymorphism ?

It is usually pointed out that an OO program can be written in Assembler.
Then there is OO analysis and modeling.

I, personally, prefer to talk about ADTs and generic programming (in wide
sense), leaving OO to zealots.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Yannick Duchêne (Hibou57) on
Le Wed, 09 Jun 2010 17:57:58 +0200, Dmitry A. Kazakov
<mailbox(a)dmitry-kazakov.de> a écrit:
> It is usually pointed out that an OO program can be written in Assembler.
> Then there is OO analysis and modeling.
>
> I, personally, prefer to talk about ADTs and generic programming (in wide
> sense), leaving OO to zealots.
OO is a modal (and there may be multiple modal providing abilities to
express a given architecture)


--
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
-- i.e. forget about previous premises which leads to conclusion
-- and start with new conclusion as premise.
From: Yannick Duchêne (Hibou57) on
Le Wed, 09 Jun 2010 17:53:44 +0200, Dmitry A. Kazakov
<mailbox(a)dmitry-kazakov.de> a écrit:
>> Maybe with the exception of generic formal packages?
>> (With other problems popping up elsewhere.)
>
> Close, but it is about compilation units, the abstraction of the contents
> remains outside the language.
So this should not be a compilation unit and this should be expressed in
the language. Do you think about something at the level of types ? I guess
this should be able to express a kind of structure, so: Canvas ? Patterns ?


--
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
-- i.e. forget about previous premises which leads to conclusion
-- and start with new conclusion as premise.
From: Dmitry A. Kazakov on
On Wed, 09 Jun 2010 20:00:07 +0200, Yannick Duch�ne (Hibou57) wrote:

> Le Wed, 09 Jun 2010 17:53:44 +0200, Dmitry A. Kazakov
> <mailbox(a)dmitry-kazakov.de> a �crit:
>>> Maybe with the exception of generic formal packages?
>>> (With other problems popping up elsewhere.)
>>
>> Close, but it is about compilation units, the abstraction of the contents
>> remains outside the language.
> So this should not be a compilation unit and this should be expressed in
> the language. Do you think about something at the level of types ?

Depends on the intentions. If you render it as a type, then it must be a
class-wide one. This is the reason why I believe that generics are
superfluous and could be gradually replaced by classes. This is also why I
want more static analysis, because that would allow to remove any overhead
in comparable [=static] cases.

> I guess
> this should be able to express a kind of structure, so: Canvas ? Patterns ?

Depends on the meaning of these. Normally this stuff comes with dynamic
typing, types inference, things I don't like to see in a language like Ada.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Yannick Duchêne (Hibou57) on
Le Wed, 09 Jun 2010 21:10:06 +0200, Dmitry A. Kazakov
<mailbox(a)dmitry-kazakov.de> a écrit:
>> So this should not be a compilation unit and this should be expressed in
>> the language. Do you think about something at the level of types ?
>
> Depends on the intentions. If you render it as a type, then it must be a
> class-wide one. This is the reason why I believe that generics are
> superfluous and could be gradually replaced by classes.

What would become formal parameters, like type parameters ? Overloading
functions returning type derived from that of the ancestor one ? OK. So,
this will require an original bas type in the root definition which could
be wide enough to reach actual capabilities of generics. An “ANY” type
(like in QBasic) ? An abstract base type ? OK. So, now, we will need to be
able to declare abstract base type, that is, abstract discrete types, etc.
Is that what's in your mind ?


>> I guess
>> this should be able to express a kind of structure, so: Canvas ?
>> Patterns ?
>
> [...] Normally this stuff comes with dynamic
> typing, types inference, things I don't like to see in a language like
> Ada.

No, this is not required (while this oftenly the case, yes)


> Depends on the meaning of these.

Just means “pattern” ;) well... pie dish, cake tin, waffle iron, and so on
(btw, none of these latter requires dynamic typing)


--
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
-- i.e. forget about previous premises which leads to conclusion
-- and start with new conclusion as premise.