Why Dynamic Typing? 
Author Message
 Why Dynamic Typing?

Why do you like dynamic typing?

                mike



Sun, 10 Dec 1995 05:28:57 GMT  
 Why Dynamic Typing?

   Why do you like dynamic typing?

It makes debugging much easier.

-- Harley Davis
--

------------------------------------------------------------------------------
nom: Harley Davis                       ILOG S.A.

tel: (33 1) 46 63 66 66                 94253 Gentilly Cedex, France



Sun, 10 Dec 1995 16:36:42 GMT  
 Why Dynamic Typing?

Quote:

>Why do you like dynamic typing?
>            mike

Because it adds to the expressive power of a language.
Any type constraint that depends on a run-time value
(for a *trivial* example consider an array bounds check)
cannot be expressed in a statically typed language, but
in a dynamically typed language its simple.

graham
--
Graham Matthews                   Go west, go west
Dept Comp Sci, Univ Edinburgh     Where there's work so I'm told



Sun, 10 Dec 1995 18:56:57 GMT  
 Why Dynamic Typing?

   Why do you like dynamic typing?

Dynamic typing--defined as the ability to distinguish, during program
execution, objects of one actual type from those of another actual
type but of the same declared type by some behavi{*filter*}means (e.g.,
different responses to a generic function invocation)--is the essence
of what we now call object-oriented programming.  Consider Bjarne
Stroustrup's "The C++ Programming Language," published in 1986, page
213:

"This is probably the single most important and useful aspect of
derived classes, and it is essential in the style of programming
presented in the following example.  That style of programming is
often called <object based> or <object oriented>; it relies on
operations applied in a uniform manner to objects on heterogeneous
lists.  The meaning of such operations depends on the actual type of
the objects on the list (known only at runtime), not on just the type
of the list elements (known to the compiler)."

        Lawrence G. Mayka
        AT&T Bell Laboratories

Standard disclaimer.

--
        Lawrence G. Mayka
        AT&T Bell Laboratories

Standard disclaimer.



Sun, 10 Dec 1995 22:54:55 GMT  
 Why Dynamic Typing?

Quote:

> Why do you like dynamic typing?

Lisp people can have a hard time defending this.

So you should ask the floating point people
and the computer manufacturers why they adopted
the ieee floating point standard, which defines
dynamic types of objects such as NaN (not a number).

Or maybe ask the VMS implementors why most library
and system service procedures take data via
descriptors with type, class, and length fields built-in.



Sun, 10 Dec 1995 20:09:05 GMT  
 Why Dynamic Typing?


          Why do you like dynamic typing?

   It makes debugging much easier.

Why?  Implementations of statically-typed languages can do type
reconstruction (at the cost of some run-time overhead).
Implementations of statically-typed languages can also support a
reasonable model of code modification.

                                        mike



Sun, 10 Dec 1995 17:43:54 GMT  
 Why Dynamic Typing?


   >Why do you like dynamic typing?
   >         mike

   Because it adds to the expressive power of a language.
   Any type constraint that depends on a run-time value
   (for a *trivial* example consider an array bounds check)
   cannot be expressed in a statically typed language, but
   in a dynamically typed language its simple.

I am happy to have my array bounds (and that I don't overflow, divide
by zero, etc.) checked at runtime.  This is, of course, not an
argument against static typing.  It is an argument for some sort of
run-time checking (I'm not sure I want to call it typing.)  At first
consideration, I see no reason that this could not be incorporated
into a statically-typed language.  It exists now if you're willing to
accept just implementing it as part of an ADT as an instance of this.
If not, would constaints as part of type declarations in an otherwise
statically-typed language be enough?  If not, why?

                                mike



Sun, 10 Dec 1995 17:58:45 GMT  
 Why Dynamic Typing?
Because it lets me stop worrying about how fast my program
will be, thus letting me concentrate on getting it done.
--

Lance Norskog

Data is not information is not knowledge is not wisdom.



Mon, 11 Dec 1995 03:01:51 GMT  
 Why Dynamic Typing?
Because with Dynamo Typing I get those wonderful zizzy sparks
when I type, whereas with Static Typing I just get that icky hissing.
--

Lance Norskog

Data is not information is not knowledge is not wisdom.



Mon, 11 Dec 1995 03:02:49 GMT  
 Why Dynamic Typing?

   Because it lets me stop worrying about how fast my program
   will be, thus letting me concentrate on getting it done.
   --

I never worry about fast my program will be when I program in Haskell
(actually Gofer).

                                mike            



Sun, 10 Dec 1995 21:25:15 GMT  
 Why Dynamic Typing?

   (Harley Davis) writes:

   (Michial Gunter) writes:

             Why do you like dynamic typing?

      It makes debugging much easier.

   Why?  Implementations of statically-typed languages can do type
   reconstruction (at the cost of some run-time overhead).
   Implementations of statically-typed languages can also support a
   reasonable model of code modification.

Type reconstruction tells me what type the computer thinks my objects
have based on auxiliary information.  Dynamic typing tells me what
they really are.  If there is a discrepency between these two, dynamic
typing lets me find the problem much more easily.

Static and dynamic typing together would be reasonable for most programs.

-- Harley Davis
--

------------------------------------------------------------------------------
nom: Harley Davis                       ILOG S.A.

tel: (33 1) 46 63 66 66                 94253 Gentilly Cedex, France



Mon, 11 Dec 1995 16:51:50 GMT  
 Why Dynamic Typing?

Quote:
>                                                  Consider Bjarne
>Stroustrup's "The C++ Programming Language," published in 1986, page
>213:
>"This is probably the single most important and useful aspect of
>derived classes, and it is essential in the style of programming
>presented in the following example.  That style of programming is
>often called <object based> or <object oriented>; it relies on
>operations applied in a uniform manner to objects on heterogeneous
>lists.  The meaning of such operations depends on the actual type of
>the objects on the list (known only at runtime), not on just the type
>of the list elements (known to the compiler)."

I don't see the nexus between OO programming and lists. I can see the
link between Scheme and lists, and Dylan and lists, but I really can't
see the connection between objects and heterogeneous lists. I mean,
objects are one way to handle heterogeneous lists, but I don't know
of anything that would force you to use heterogeneous lists every time
you crank up an OO language system. So, to say that OO programming
"relies on operations applied... to objects on heterogeneous lists."
seems absurd. (And I looked it up. He really does say that. Is it
still in the second edition?)

Sean Case
--

"Oh, why must it always be enjoyment for us? Can't we suffer--can't we go on
suffering, forever and ever? Maskull, until love crushes our spirit, finally
and without remedy, we don't begin to feel ourselves."--A Voyage to Arcturus



Mon, 11 Dec 1995 17:39:37 GMT  
 Why Dynamic Typing?

Quote:

>I don't see the nexus between OO programming and lists.

Perhaps what B.S. meant to say is: "Heterogeneous lists are important in
programming, period, and nobody will take seriously a programming language
that doesn't support them, so if you want to have a serious OOP language
it had better allow for heterogeneous lists of objects.  And therefore
the language has to be able to find out an object's type at runtime."


Mon, 11 Dec 1995 21:47:44 GMT  
 Why Dynamic Typing?

Quote:

>   >Why do you like dynamic typing?
>   >             mike

>   Because it adds to the expressive power of a language.
>   Any type constraint that depends on a run-time value
>   (for a *trivial* example consider an array bounds check)
>   cannot be expressed in a statically typed language, but
>   in a dynamically typed language its simple.

>I am happy to have my array bounds (and that I don't overflow, divide
>by zero, etc.) checked at runtime.  This is, of course, not an
>argument against static typing.  It is an argument for some sort of
>run-time checking (I'm not sure I want to call it typing.)  At first
>consideration, I see no reason that this could not be incorporated
>into a statically-typed language.  It exists now if you're willing to
>accept just implementing it as part of an ADT as an instance of this.
>If not, would constaints as part of type declarations in an otherwise
>statically-typed language be enough?  If not, why?

I knew this was going to be the comeback position :-)
Sure you could view array array bounds checking as a run-time check
and not as type checking - even I would agree that it falls somewhere
near the boundary between the two.

But now consider the following examples (do you plan to handle
them all using some form of run-time checking????) :-

a) a function takes two arguments, both of which are tuples of the
same length. How do you (type) check the lengths?

b) the matrix scalar multiplication function takes two arguments,
a matrix over some ring R, and an element e of R. How do you
check that e is an element of R?

c) any language which allows you to construct types or code at
run-time. Static type checking is a little tough here isn't it?

d) any language in which the type coercions you can do are not
statically determined - this is very useful when you get out of
the simple world of ints cast to reals, and into more serious
examples.

To me it seems the debate comes down to what you think a type is.
For me a type is a collection of attributes and properties gathered
together under a name (eg: any object of type 'list' will have
certain attributes like length, indexing etc). Most static typing
people think type has to do with data representation.

graham
--
Graham Matthews                   Go west, go west
Dept Comp Sci, Univ Edinburgh     Where there's work so I'm told



Mon, 11 Dec 1995 22:25:05 GMT  
 Why Dynamic Typing?

   Why do you like dynamic typing?

Why do you like templates?



Tue, 12 Dec 1995 02:01:03 GMT  
 
 [ 72 post ]  Go to page: [1] [2] [3] [4] [5]

 Relevant Pages 

1. Why Dynamic Typing?

2. Fw: Re: Why does Dynamic Typing really matter?!?

3. Why does Dynamic Typing really matter?!?

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

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

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

7. ML as Scheme: Dynamic typing in a strongly-typed language

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

9. Question about dynamic types of record types

10. ML as Scheme: Dynamic typing in a strongly-typed language

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

12. why why why oh why why baby

 

 
Powered by phpBB® Forum Software