Eiffel vs SmallTalk: Please contrast and compare 
Author Message
 Eiffel vs SmallTalk: Please contrast and compare

If the following questions are covered in a FAQ, please so advise me, and
sorry to waste your time.

Would those familiar with both Eiffel and Smalltalk please contrast (show
differences) and compare (show similarities) between the two.

It was my impression that there is a move afoot to make SmallTalk more
strongly typed.  Is this true.

Also, it's been said that about 10% of coding difficulties are due to
typing issues.  Isn't this statistic a bit low, and from sources are
such metrics derived.

Thank you.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CEC Services, 2080 Kipling St, Lakewood, CO  80215-1502   U S A
303.231.9437  Voice;  303.231.9438  Facsimile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sat, 25 Oct 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare

   ... It was my impression that there is a move afoot to make SmallTalk more
   strongly typed.  Is this true. ...

Perhaps you could share your definition of "strongly typed" since IMHO
Smalltalk already is strongly typed.  Perhaps you meant something like
"statically typed"?

   Also, it's been said that about 10% of coding difficulties are due to
   typing issues.  Isn't this statistic a bit low, and from sources are
   such metrics derived.

I performed -one- experiment using Scheme and arrived at the figure of ~30%.
I arrived at the figure by counting -every- error I made when writing
a 3K SLOC program and then classifying the errors.  Unfortunately I've
not found the time to repeat the experiment to gather more datapoints
so I have no idea whether 30% is typical or is an extreme value.



Sun, 26 Oct 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare

this with possible deletions.
Quote:



(Colin James III (The Rt Rev'd)) writes:

Quote:
>   ... It was my impression that there is a move afoot to make SmallTalk
more
>   strongly typed.  Is this true. ...

>Perhaps you could share your definition of "strongly typed" since IMHO
>Smalltalk already is strongly typed.  Perhaps you meant something like
>"statically typed"?


not understand the question.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CEC Services, 2080 Kipling St, Lakewood, CO  80215-1502   U S A
303.231.9437  Voice;  303.231.9438  Facsimile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sun, 26 Oct 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare

: Forgive my ignorance, but I had always benn under the impression that
: Smalltalk
: was weakly (or un-) typed.

Smalltalk is strongly typed because you cannot do anything to an object
that its class (type) is not defined to allow it to do.

It is dynamically typed because all type checking is at run-time.

OTOH Eiffel is also strongly typed, but it is also statically typed
because most type checking is at compile-time.

Variables are typed in Eiffel. They are not in Smalltalk.



Mon, 27 Oct 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare


   this with possible deletions.
   >

   (Colin James III (The Rt Rev'd)) writes:
   >   ... It was my impression that there is a move afoot to make SmallTalk
   more
   >   strongly typed.  Is this true. ...
   >
   >Perhaps you could share your definition of "strongly typed" since IMHO
   >Smalltalk already is strongly typed.  Perhaps you meant something like
   >"statically typed"?


   not understand the question.

Perhaps you could bother to read a posting before you respond to it.
Stephen asked for your definition of "strongly typed", since by common
definitions of "strongly typed", Smalltalk is already strongly typed
(although as he also correctly points out, it is not statically typed).

Cheers,

Geoff
--



Mon, 27 Oct 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare

First, my apologies for the long quote, but it sets the stage...




|>    this with possible deletions.
|>    >

|>    (Colin James III (The Rt Rev'd)) writes:
|>    >   ... It was my impression that there is a move afoot to make SmallTalk
|>    more
|>    >   strongly typed.  Is this true. ...
|>    >
|>    >Perhaps you could share your definition of "strongly typed" since IMHO
|>    >Smalltalk already is strongly typed.  Perhaps you meant something like
|>    >"statically typed"?
|>

|>    not understand the question.
|>
|> Perhaps you could bother to read a posting before you respond to it.
|> Stephen asked for your definition of "strongly typed", since by common
|> definitions of "strongly typed", Smalltalk is already strongly typed
|> (although as he also correctly points out, it is not statically typed).
|>
|> Cheers,
|>
|> Geoff
|> --

Gentlemen?

Forgive my ignorance, but I had always benn under the impression that Smalltalk
was weakly (or un-) typed.  The definition of strongly typed that I am familiar with
requires that parameters of a method call must match the class (or a subclass) of the
expected arguments, such as in C++.  E.g., if you tell a printer to print(x) where x
is a foo and it is expecting a bar, it either won't compile or will blow up at
runtime.  This would be as opposed to Smalltalk, where an argument of any type would
be accepted (though perhaps with unexpected results).  

Is the preceeding concept more correctly expressed as 'statically typed'?  It seems
not, at least acording to Geoff's last paragraph above.

Is Smalltalk considered strongly typed because all classes derive from Object?  Please
enlighten me on this one.
--


contracted to BNR-RTP, speaking only for myself



Mon, 27 Oct 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare

Quote:

>If the following questions are covered in a FAQ, please so advise me, and
>sorry to waste your time.

>Would those familiar with both Eiffel and SmallTalk please contrast (show
>differences) and compare (show similarities) between the two.

Caveat: I am not an expert on Smalltalk. Those of you who are, please
corret me where I'm wrong or unclear.

Differences:

1. Static vs dynamic typing, see below.

2. Eiffel supports assertions and programming by contract, Smalltalk
 does not.

3. Eiffel supports designers of class interfaces. That is, it is up to
 the designer which features of a class are public and which are not.
 In Smalltalk, methods are public, attributes are private.

4. Eiffel supports multiple inheritance, Smalltalk does not.

Similarities:

1. Both are pure (i.e. designed from conception as) OO languages.

2. Both support automatic garbage collection.

3. Both languages are relative small. Eiffel is bigger than Smalltalk
 largely because of the support for the extra features descrbed above.

4. Because of (3) both require a certain amount of library support to
 accomplish anything useful.

Quote:

>It was my impression that there is a move afoot to make SmallTalk more
>strongly typed.  Is this true.

I agree with some others that have responded here. That is, I think
of smalltalk as strongly typed because it will find and identify
typing errors for you. However, I also think of it as dynamically
typed sincde the type checking occurs at run-time. Don't know of
any plans to add static type checking to Smalltalk.

OTOH Eiffel is strongly and statically typed.

Quote:

>Also, it's been said that about 10% of coding difficulties are due to
>typing issues.  Isn't this statistic a bit low, and from sources are
>such metrics derived.

>Thank you.

>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>CEC Services, 2080 Kipling St, Lakewood, CO  80215-1502   U S A
>303.231.9437  Voice;  303.231.9438  Facsimile
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hope this helps,
-- Jim
--

*------------------------------------------------------------------------------*
Jim McKim  (203)-548-2458     Co-editor of Eiffel Outlook



Fri, 31 Oct 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare

Quote:

>   Is the preceeding concept [ which I've deleted -bevan ] more
>   correctly expressed as 'statically typed'?

>IMHO yes.  However, even this is categorization is too coarse, IMHO you
>need more than the usual "weak/strong" and "static/dynamic" categories
>to adequately classify languages.

I agree that you need more than the usual side by side comparisions to
adequately classify languages.  To better understand the strategic implications
of a language, one must look at the underlining structure of a language as
Richard Wiener did in his book 'Software Development Using Eiffel'.  In order
to gain some insight about the fundamental strenghts and weaknesses of
Eiffel and Smalltalk, Richard went back to see what the originators had to
say about the purpose of their language and wrote...

Adele Goldberg and David Robson in their book, 'Smalltalk-80 -- The Language
and its Implementation,' state; "As suggested by the personal computing vision,
Smalltalk is designed so that every component in the system that is
accessible to the user can be presented in a meaningful way for observation and
manipulation... . The Smalltalk-80 system provides a rich environment for
prototyping new applications and refining old ones... . In the early 1970s, the
Xerox Palo Alto Research Center Learning Research Group began work on a vision
of the ways different people might effectively and joyfully use computing
power."  It is clear from the above statements that Smalltalk was designed to
support personal computing (as opposed to large-scale multi-programmer projects)
experimentation and prototyping.

In Bertrand Meyer's book 'Object Oriented Software Construction', he states:
"We study the object-oriented approach as a set of principles, methods and tools
which can be instrumental in building 'production' software of higher quality
than is the norm today."  In the Preface to 'Eiffel: The Language', by Meyer,
and referenced above, it is stated, "Eiffel embodies a 'certain idea' of
software construction: the belief that it is possible to treat this task as a
serious engineering enterprise, whose goal is to yield quality software
through the careful production and continuous enhancement of parameterizable,
scientifically specified reusable components, communicating on the basis of
clearly defined contracts and organized in systematic multi-criteria
classifications."  It is clear that Eiffel's stated purpose is to provide
support for the engineering of high quality, reliable software systems and
components.

I hope this helps,

Madison Cloutier



Sat, 01 Nov 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare


   this with possible deletions.

   (Colin James III (The Rt Rev'd)) writes:
   >   ... It was my impression that there is a move afoot to make SmallTalk
   more
   >   strongly typed.  Is this true. ...
   >
   >Perhaps you could share your definition of "strongly typed" since IMHO
   >Smalltalk already is strongly typed.  Perhaps you meant something like
   >"statically typed"?


   not understand the question.

I understood and answered the question -- IMHO Smalltalk already is
strongly typed but it is not statically typed.  If you disagree with
this characterization then we need to agree on terms which is why I
asked you what your definition of "strongly typed" is.



Sun, 02 Nov 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare

Quote:

>>If the following questions are covered in a FAQ, please so advise me, and
>>sorry to waste your time.

>>Would those familiar with both Eiffel and SmallTalk please contrast (show
>>differences) and compare (show similarities) between the two.
>Caveat: I am not an expert on Smalltalk. Those of you who are, please
>corret me where I'm wrong or unclear.
>Differences:
>1. Static vs dynamic typing, see below.
>2. Eiffel supports assertions and programming by contract, Smalltalk
> does not.
>3. Eiffel supports designers of class interfaces. That is, it is up to
> the designer which features of a class are public and which are not.
> In Smalltalk, methods are public, attributes are private.
>4. Eiffel supports multiple inheritance, Smalltalk does not.
>Similarities:
>1. Both are pure (i.e. designed from conception as) OO languages.
>2. Both support automatic garbage collection.
>3. Both languages are relative small. Eiffel is bigger than Smalltalk
> largely because of the support for the extra features descrbed above.
>4. Because of (3) both require a certain amount of library support to
> accomplish anything useful.

>>It was my impression that there is a move afoot to make SmallTalk more
>>strongly typed.  Is this true.
>I agree with some others that have responded here. That is, I think
>of smalltalk as strongly typed because it will find and identify
>typing errors for you. However, I also think of it as dynamically
>typed sincde the type checking occurs at run-time. Don't know of
>any plans to add static type checking to Smalltalk.
>OTOH Eiffel is strongly and statically typed.

>>Also, it's been said that about 10% of coding difficulties are due to
>>typing issues.  Isn't this statistic a bit low, and from sources are
>>such metrics derived.

It is true that some errors do occure due to typing, but in reallity
you do not make a lot of mistakes compared to C++ ie, don't know
about Eiffel, but comprehensive testing finds them out very quickly.
Unlike other programs where memory leaks or NULL pointers cause
crashes during testing all you get is warning that a certain
messages was not understood and you can continue to test without
using the faulty functionality.
Less dramatic I admit, but I am a programmer not a theatre director.

Quote:
>>Thank you.

>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>>CEC Services, 2080 Kipling St, Lakewood, CO  80215-1502   U S A
>>303.231.9437  Voice;  303.231.9438  Facsimile
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>Hope this helps,
>-- Jim
>--
>*------------------------------------------------------------------------------*
>Jim McKim  (203)-548-2458     Co-editor of Eiffel Outlook


Ralf

PS Looking forward to get to know Eiffel, sounds great so far.
--
Ralf Rutherford            The Preston Group Pty. Ltd.
System Architect           488 Victoria Street
                           Richmond Vic 3121

FAX +61-3-427 1969         Ph. +61-3-428 8899



Sun, 02 Nov 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare


Quote:


>   this with possible deletions.

>   (Colin James III (The Rt Rev'd)) writes:
>   >   ... It was my impression that there is a move afoot to make SmallTalk
>   more
>   >   strongly typed.  Is this true. ...

>   >Perhaps you could share your definition of "strongly typed" since IMHO
>   >Smalltalk already is strongly typed.  Perhaps you meant something like
>   >"statically typed"?


>   not understand the question.

>I understood and answered the question -- IMHO Smalltalk already is
>strongly typed but it is not statically typed.  If you disagree with
>this characterization then we need to agree on terms which is why I
>asked you what your definition of "strongly typed" is.

The one definition I know concerning `strongly' and `statically' typed
languages is taken from a paper by Luca Cardelli & Peter Wegner ("On
Understanding Types, Data Abstraction, and Polymorphism"):

"[...] Programming languages in which the type of every expression can be
determined by static program analysis are said to be `statically typed'. [...]
Languages in which all expressions are type consistent are called `strongly
typed'. If a language is strongly typed, its compiler can guarantee that the
program it accepts will execute without type errors[...]"

I'm not a Smalltalk expert, but I do not think that ST can be called
a strongly typed language according to this definition. I understand that
(original, not OO extensions of) Pascal is statically typed, C++ &
Eiffel (given system validity checks are performed at compile time)
are strongly typed, and ST is none of these because objects may respond with
"message not understood" (or something similar) at runtime.

Of course, there may be other definitions of `strongly typed' ...

Wolfgang
+---------------------------------------------------------------------+
|  Wolfgang Reddig                |  e-mail:                          |

|  Roemerstrasse 164              |                                   |
|  53117 Bonn                     |  Tel.: (49) 228 / 550-260         |
|  Germany                        |  Fax:  (49) 228 / 550-382         |
+---------------------------------------------------------------------+



Sun, 02 Nov 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare

: "[...] Programming languages in which the type of every expression can be
: determined by static program analysis are said to be `statically typed'. [...]
: Languages in which all expressions are type consistent are called `strongly
: typed'. If a language is strongly typed, its compiler can guarantee that the
: program it accepts will execute without type errors[...]"

: I'm not a Smalltalk expert, but I do not think that ST can be called
: a strongly typed language according to this definition.

: Of course, there may be other definitions of `strongly typed' ...

From what I remember of my formal education, there is another definition
that is similar to the above, but does not require the compiler to
guarantee at compile time the type of the expression.

By that definition, Smalltalk *is* strongly typed because at run-time
the expression is fully type checked.



Mon, 03 Nov 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare
   The one definition I know concerning `strongly' and `statically' typed
   languages is taken from a paper by Luca Cardelli & Peter Wegner ("On
   Understanding Types, Data Abstraction, and Polymorphism"):

   "[...] Programming languages in which the type of every expression can be
   determined by static program analysis are said to be `statically typed'. [...]
   Languages in which all expressions are type consistent are called `strongly
   typed'. If a language is strongly typed, its compiler can guarantee that the
   program it accepts will execute without type errors[...]"

   I'm not a Smalltalk expert, but I do not think that ST can be called
   a strongly typed language according to this definition.

I agree it cannot.  However, I'm not keen on Cardelli&Wegner's
definition of `strongly typed' since under these definitions isn't clear
to me what languages are `strongly typed' that aren't also `statically
typed' i.e. the latter seems to imply the former.



Sun, 16 Nov 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare

Quote:
(Stephen J Bevan) writes:

> Reddig) writes:
>   "[...] Programming languages in which the type of every expression can be
>   determined by static program analysis are said to be `statically typed'.
>   [...]
>   Languages in which all expressions are type consistent are called `strongly
>   typed'. If a language is strongly typed, its compiler can guarantee that
>   the program it accepts will execute without type errors[...]"

> I agree it cannot.  However, I'm not keen on Cardelli&Wegner's
> definition of `strongly typed' since under these definitions isn't clear
> to me what languages are `strongly typed' that aren't also `statically
> typed' i.e. the latter seems to imply the former.

Cardelli & Wegner's definition of `strongly typed' is the only one that
I agree with. The latter does not imply the former. Consider the following:

        function foo (input: T); // a typed interface

        var obj;        // an untyped variable

        obj := GetAnObjectFromAnHeterogeousDatabase();
                        // obj get an value whose type is statcally unknown

        when (typeof(obj) is T) foo(obj);
                        // type assertion is used to ensure the correct
                        // usage of the foo.

The above codes is not statically typed, but strongly typed, because
compiler can guarantee that it will execute without type errors.

If the type assurance statement is not used, the compiler will reject
the code.

A strongly typed language is not necessarily statically typed; However,
a statically typed language is always strongly typed.

SmallTalk is not strongly typed by this definition, because run-time
type errors are reported.

To be strict, Effel is not strongly typed either due to its
improper covariant redefinition. For an open world, when the link-time
validation fails, the type error detection will be delayed to
run-time.

Any typed OO language that supports polymorphism will not be
statically typed for open world assumption. Among them, some
are strongly typed, some not. Those languages support explicit
run-time type check by type assuarance or type switch statements
and enforce programmers to use them when the type is unknown will
be strongly typed. Those languages inserting implicit run-time
type checks and reporting a type error if the check fails (e.g.
Eiffel, Beta, and C++) are not strongly typed.

David Shang



Sun, 16 Nov 1997 03:00:00 GMT  
 Eiffel vs SmallTalk: Please contrast and compare


Quote:

>   The one definition I know concerning `strongly' and `statically' typed
>   languages is taken from a paper by Luca Cardelli & Peter Wegner ("On
>   Understanding Types, Data Abstraction, and Polymorphism"):

>   "[...] Programming languages in which the type of every expression can be
>   determined by static program analysis are said to be `statically typed'. [...]
>   Languages in which all expressions are type consistent are called `strongly
>   typed'. If a language is strongly typed, its compiler can guarantee that the
>   program it accepts will execute without type errors[...]"

>   I'm not a Smalltalk expert, but I do not think that ST can be called
>   a strongly typed language according to this definition.

>I agree it cannot.  However, I'm not keen on Cardelli&Wegner's
>definition of `strongly typed' since under these definitions isn't clear
>to me what languages are `strongly typed' that aren't also `statically
>typed' i.e. the latter seems to imply the former.

In statically typed languages, the *exact* type of an expression is known
at compile-time; examples are C (if you forget about type casts), (non oo)
Pascal, Modula2, etc. In strongly typed languages, the compiler can only
check if an expression is of a type conforming to the type declared, e.g.
a subtype. However, it cannot determine the exact type of the expression -
otherwise, dynamic binding would be superfluous.

Optimizers might try to determine the exact type as often as possible in
order to allow inlining etc., but in general there is no way to achieve
this for arbitrary expressions in strongly but not statically typed
languages.

BTW, another poster answered that - according to the definition he knows -
Smalltalk is strongly typed because all type errors are reported (at runtime).
Apart from the fact that usually not *all* type errors are catched unless
you do exhaustive testing, I am interested in the definition of typed
but not strongly typed languages in this context. Are "typed" languages only
catching some, but not all type errors (at runtime)? Or is the word "strong"
redundant, i.e. there is no language that is typed but not strongly typed?
Are there any more classifications I am missing here?

Regards,
Wolfgang

+---------------------------------------------------------------------+
|  Wolfgang Reddig                |  e-mail:                          |

|  Roemerstrasse 164              |                                   |
|  53117 Bonn                     |  Tel.: (49) 228 / 550-260         |
|  Germany                        |  Fax:  (49) 228 / 550-382         |
+---------------------------------------------------------------------+



Sun, 16 Nov 1997 03:00:00 GMT  
 
 [ 22 post ]  Go to page: [1] [2]

 Relevant Pages 

1. mawk and gawk: Comparing and Contrasting 2 fine programs

2. Comparing and Contrasting Common Lisp, Scheme, and Dylan tutorial

3. Comparing and Contrasting Common Lisp, Scheme, and Dylan tutorial

4. VHDL & Verilog Compared and Contrasted

5. Synthesis tools: Compare & Contrast

6. VHDL & Verilog Compared and Contrasted

7. Comparing and Contrasting ADA and Pascal ?

8. Comparing and Contrasting Common Lisp, Scheme, and Dylan tutorial

9. C++ vs Eiffel vs Smalltalk (warning--long language war)

10. Eiffel vs. C++ (vs Smalltalk)

11. C++ vs Eiffel vs Smalltalk (warning--long language war)

12. Eiffel vs C ++ ?? Compare and Contrast....

 

 
Powered by phpBB® Forum Software