Types, types: static vs. dynamic -- classification 
Author Message
 Types, types: static vs. dynamic -- classification


             Dynamically typed is often refered to poly-
             morphism.

And wrongly so.  SML, for example, is statically typed and uses a
polymorphic type system.   These two things are not the same.

--
-Matthias



Fri, 06 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification

I lost the trace of the thread of C++ static typing vs.
Smalltalk dynamic typing. The debate is interesting,
but we cannot have any conclusion if we focus on the
terminology only.

There are a number of different ways to define typing.
I cannot tell which one should be the standard. Each
langauge has its own definition. The difference is
especially remarkable between dynamic languages like
SmallTalk and static languages C++ and Eiffel. Therefore,
do not pay attention to the word itself, instead, focus
on the definition associated with the word.

The following list is helpful for you to identify
which kind of type system a language has:

1. Type vs. typeless

   * Does a language provide types?

     Prototype languages like Self do not have type at
     all. Objects are created by cloning exisiting
     objects.

   For languages have types, we have:

   1.1. Dynamic typing system vs. static typing system

        * Can type (subtype) be defined at run-time?
          or, is the class hierarchy dynamic?

        For dynamic typing system, we further have:

        1.1.1. Dynamic typing vs. static typing

               * Can we change the state of a type
                 at run-time? Or, can we add/delete
                 methods or instance variables to/from
                 an existing type dynamically?

                 Some dynamic typing system does not
                 allow the state change of a type once
                 the type is created.

2. Typed vs. untyped

   * Does a name declaration need the specification of
     its type?

     SmallTalk is an untyped language because variables
     are untyped.

   Further, for typed language, we have:

   2.1. Dynamically typed vs. statically typed

        * Can a declared name assumes different types
          in a given range at run-time?

          C++ is dynamically typed in terms of pointer
          declarations. Eiffel is dynamically typed in
          terms of non-primitive variable declaration.
          Dynamically typed is often refered to poly-
          morphism.

          Untyped lnaguage is an special case (extreme)
          of dynamically typed langauges.

3. Static type checking vs. dynamic type checking

   * Does a language needs dynamic type checking to ensure
     type safe?

4. Type safe vs. unsafe

   * Can a language ensure that all type errors should be
     detected?

   For type safe languages, we have:

   4.1. Static type safe vs. dynamic type safe

        * Can a language guarantee no run-time error
          (after comiplation)?

Two important notes:

(1) Languages that requires run-time type check can be
    statically safe;

(2) Dynamic typing system with static typing is the maximum
    benefit point  between statics and dynamics.

David



Fri, 06 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification

Quote:


L. Shang) writes:

>         Dynamically typed is often refered to poly-
>         morphism.

> And wrongly so.  SML, for example, is statically typed and uses a
> polymorphic type system.   These two things are not the same.

As I said, each type system or particular language has its
own definition. I am not going to argue with you what name
should be used for what definition.

The majority of static OO langauges including C++, Eiffel, Sather,
Beta, Modula-3, Ada95, etc, use polymorphism in the case which
I described as dynamically typed variables or parameters.

David



Mon, 09 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification

Quote:
(David L. Shang) writes:




Quote:
|> L. Shang) writes:

|> >
|> >           Dynamically typed is often refered to poly-
|> >           morphism.
|> >
|> > And wrongly so.  SML, for example, is statically typed and uses a
|> > polymorphic type system.   These two things are not the same.

|> As I said, each type system or particular language has its
|> own definition. I am not going to argue with you what name
|> should be used for what definition.

|> The majority of static OO langauges including C++, Eiffel, Sather,
|> Beta, Modula-3, Ada95, etc, use polymorphism in the case which
|> I described as dynamically typed variables or parameters.

Actually, C++ has both static and dynamic polymorphism.  The static
polymorphism is implemented using templates, and the dynamic using
virtual functions.  Thus, for example, the STL function ``sort'' is
polymorphic, although the polymorphism is resolved at compile time
(staticly).

On the other hand, it is true that in general, when a C++ program
speaks of polymorphism, or a polymorphic object, he is almost always
speaking of dynamic polymorphism.
--

GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils en informatique industrielle --
                              -- Beratung in industrieller Datenverarbeitung



Fri, 13 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification

Quote:

>As I said, each type system or particular language has its
>own definition. I am not going to argue with you what name
>should be used for what definition.

Huzzah!
Meaning is TYRANNY - distinction IS discrimination.
We will never KNOW true freedom until we EACH speak our
OWN TRUE LANGUAGE.   Burn all dictionaries NOW.


---|  Computer Systems Engineer          University of {*filter*}ia  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  Box 449 Health Science Center    C{*filter*}tesville,VA 22908  |---
 [ "The grass is always greener, except at t=0" - Stan Kelly-Bootle ]



Sat, 14 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification

Quote:
(Steven D. Majewski) writes:


> >As I said, each type system or particular language has its
> >own definition. I am not going to argue with you what name
> >should be used for what definition.

> Huzzah!
> Meaning is TYRANNY - distinction IS discrimination.
> We will never KNOW true freedom until we EACH speak our
> OWN TRUE LANGUAGE.   Burn all dictionaries NOW.

Steven,

If you can present a set of standard names that can please
everyone, please do so.

My inability to set up a standardized terminology in this
very particular area is not responsible for people who are
going to burn all dictionaries.

David



Tue, 17 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification

Quote:
(Steven D. Majewski) writes:


> >As I said, each type system or particular language has its
> >own definition. I am not going to argue with you what name
> >should be used for what definition.

> Huzzah!
> Meaning is TYRANNY - distinction IS discrimination.
> We will never KNOW true freedom until we EACH speak our
> OWN TRUE LANGUAGE.   Burn all dictionaries NOW.

Steven,

If you can present a set of standard names that can please
everyone, please do so.

My inability to set up a standardized terminology in this
very particular area is not responsible for people who are
going to burn all dictionaries.

David



Tue, 17 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification
Kanze US/ESC 60/3/141 #40763) said:

    James> Actually, C++ has both static and dynamic polymorphism.
    James> The static polymorphism is implemented using templates, and
    James> the dynamic using virtual functions.  Thus, for example,
    James> the STL function ``sort'' is polymorphic, although the
    James> polymorphism is resolved at compile time (staticly).

Isn't function overloading a form of static polymorphism?

--
Anil

___________________________________________________________________________
Anil K Vijendran                    USL Box 43007, Lafayette, LA 70504-3007



Fri, 20 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification


|> Kanze US/ESC 60/3/141 #40763) said:

|>     James> Actually, C++ has both static and dynamic polymorphism.
|>     James> The static polymorphism is implemented using templates, and
|>     James> the dynamic using virtual functions.  Thus, for example,
|>     James> the STL function ``sort'' is polymorphic, although the
|>     James> polymorphism is resolved at compile time (staticly).

|> Isn't function overloading a form of static polymorphism?

If you say so:-).  Polymorphism is one of those terms where everyone
seems to have their own definition.  I've always considered (C++'s)
function overloading as more a case of extended function names; the
parameter types are, in fact, considered as part of the name.  But
this is probably influenced by what I know about how compilers
actually implement function overloading (i.e.: name mangling).
--

GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils en informatique industrielle --
                              -- Beratung in industrieller Datenverarbeitung



Sun, 22 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification

[snip]
: |> Isn't function overloading a form of static polymorphism?
[snip]
: If you say so:-).  Polymorphism is one of those terms where everyone
: seems to have their own definition.

Does this mean that... "polymorphism" (the word) is polymorphic?
Which makes me think of Russel... and the Russel and Whitehead concept
of a symbol being "Typically Ambiguous"... one symbol having different
(but parallel) meanings when applied with different types....

--

Find out what's new at http://www.csci.csusb.edu/doc/www.sites.html
Disclaimer:`CSUSB may or may not agree with this message`.
Copyright(1995):Copy this freely but include the following link to the
<a href="http://www.csci.csusb.edu/dick/signature.html">author's signature</a>



Mon, 23 Mar 1998 03:00:00 GMT  
 Types, types: static vs. dynamic -- classification

Quote:

> >|> The majority of static OO langauges including C++, Eiffel, Sather,
> >|> Beta, Modula-3, Ada95, etc, use polymorphism in the case which
> >|> I described as dynamically typed variables or parameters.

> >Actually, C++ has both static and dynamic polymorphism.  The static
> >polymorphism is implemented using templates, and the dynamic using
> >virtual functions.  Thus, for example, the STL function ``sort'' is
> >polymorphic, although the polymorphism is resolved at compile time
> >(staticly).

This is correct, althought templates are really just modular, not polymorphic.


Sun, 05 Apr 1998 03:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. Types, types: static vs. dynamic -- classification

2. Types, types: static vs. dynamic -- classification

3. Types, types: static vs. dynamic --

4. Flying With Python (Strong versus Weak Typing) [actually, Static vs Dynamic typing]

5. Static vs Dynamic Typing: Effects on Productivity?

6. Dynamic vs. static type checking

7. Static vs Dynamic Typing: Effects on Productivity?

8. Static vs Dynamic Typing: Effects on Productivity?

9. Static vs Dynamic Typing: Effects on Productivity?

10. Dynamic vs static typing: impact on modelling capabilities

11. static vs dynamic/soft typing

12. static vs. dynamic typing (again, again)

 

 
Powered by phpBB® Forum Software