comp.lang.ada
 help / color / mirror / Atom feed
* Re: Difference between Ada and Small talk - Object Oriented
  1997-10-30  0:00 Difference between Ada and Small talk - Object Oriented David Brown
@ 1997-10-30  0:00 ` Al Christians
  1997-11-02  0:00   ` James O'Connor
  1997-11-01  0:00 ` Matthew Heaney
  1 sibling, 1 reply; 5+ messages in thread
From: Al Christians @ 1997-10-30  0:00 UTC (permalink / raw)



David Brown wrote:
> Can any one help me, I have to write an essay on the differences between
> Ada and Smalltalk focusing on there object oriented features.

Main difference is when the error messages come out.  ST gives the "Does
Not Understand" message at run time when the program sends a message
that is not defined for the class of the receiving object.  Ada bends
every effort to make sure you figure this all out before it happens. 
The similar error in Ada won't and can't compile, so you have to fix it
sooner.  Smalltalk programmers say that this doesn't happen very much
and it's no big deal.  Ada programmers like to not worry that it might
happen.  

If you can understand and explain all the implications of that one
difference, you've probably got a good paper.  

Al




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Difference between Ada and Small talk - Object Oriented
@ 1997-10-30  0:00 David Brown
  1997-10-30  0:00 ` Al Christians
  1997-11-01  0:00 ` Matthew Heaney
  0 siblings, 2 replies; 5+ messages in thread
From: David Brown @ 1997-10-30  0:00 UTC (permalink / raw)



Can any one help me, I have to write an essay on the differences between
Ada and Smalltalk focusing on there object oriented features.

Cheers,

	David.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Difference between Ada and Small talk - Object Oriented
  1997-10-30  0:00 Difference between Ada and Small talk - Object Oriented David Brown
  1997-10-30  0:00 ` Al Christians
@ 1997-11-01  0:00 ` Matthew Heaney
  1997-11-02  0:00   ` James O'Connor
  1 sibling, 1 reply; 5+ messages in thread
From: Matthew Heaney @ 1997-11-01  0:00 UTC (permalink / raw)



In article <34592A6B.665@ednet.co.uk>, David Brown <davidbrown@ednet.co.uk>
wrote:

>Can any one help me, I have to write an essay on the differences between
>Ada and Smalltalk focusing on there object oriented features.

I'm not a SmallTalk programmer, but I do know Ada 95.  Here's a couple
things to read:

o the section of the Ada 95 Rationale about the tagged types - you'll get
lots of insight into the model.

o the paper (go to the AdaIC or to the Ada Home) comparing Ada 95 to C++.

Let me know if you need more info.

Matt

--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Difference between Ada and Small talk - Object Oriented
  1997-11-01  0:00 ` Matthew Heaney
@ 1997-11-02  0:00   ` James O'Connor
  0 siblings, 0 replies; 5+ messages in thread
From: James O'Connor @ 1997-11-02  0:00 UTC (permalink / raw)



On Sat, 01 Nov 1997 14:16:58 -0800, mheaney@ni.net (Matthew Heaney)
wrote:

>In article <34592A6B.665@ednet.co.uk>, David Brown <davidbrown@ednet.co.uk>
>wrote:
>
>>Can any one help me, I have to write an essay on the differences between
>>Ada and Smalltalk focusing on there object oriented features.
>
>I'm not a SmallTalk programmer, but I do know Ada 95.  Here's a couple
>things to read:

>
>o the paper (go to the AdaIC or to the Ada Home) comparing Ada 95 to C++.

If you are  referring to the comparison at
http://sw-eng.falls-church.va.us/AdaIC/docs/flyers/95cplus.shtml, I'm
not sure what good this would do in an OO comparsion between Ada and
Smalltalk.  If your are trying to extrapolate or draw a comparison
from C++ to Smalltalk, it's not vaild because C++ is not very similar
to Smalltalk.  Especially in regards to many of the comparison made in
the document.  C++ and Ada are completely separate languages, but they
have more in common with each other than Smalltalk does with either.

>
>Let me know if you need more info.
>
>Matt
>
>--------------------------------------------------------------------
>Matthew Heaney
>Software Development Consultant
><mailto:matthew_heaney@acm.org>
>(818) 985-1271

Take care,
Jay O'Connor

joconnor@jmpstart.com
http://www.jmpstart.com

31 Hertz




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Difference between Ada and Small talk - Object Oriented
  1997-10-30  0:00 ` Al Christians
@ 1997-11-02  0:00   ` James O'Connor
  0 siblings, 0 replies; 5+ messages in thread
From: James O'Connor @ 1997-11-02  0:00 UTC (permalink / raw)



On Thu, 30 Oct 1997 09:30:02 -0800, Al Christians
<achrist@easystreet.com> wrote:

>David Brown wrote:
>> Can any one help me, I have to write an essay on the differences between
>> Ada and Smalltalk focusing on there object oriented features.
>
>Main difference is when the error messages come out.  ST gives the "Does
>Not Understand" message at run time when the program sends a message
>that is not defined for the class of the receiving object.  Ada bends
>every effort to make sure you figure this all out before it happens. 
>The similar error in Ada won't and can't compile, so you have to fix it
>sooner.  Smalltalk programmers say that this doesn't happen very much
>and it's no big deal.  Ada programmers like to not worry that it might
>happen.  
>
>If you can understand and explain all the implications of that one
>difference, you've probably got a good paper.  
>
>Al

There are more fundamental issues between Ada and Smalltalk then this
While this difference is important, it is more symptomatic of other
differences between the languages.

Probably the most fundamental differences would be:

Typing:
Smalltalk types variables at run time, Ada enforces types at compile
time.

"OO"- ness:
Smalltalk is pure OO which can be both good and bad, depending on your
point of view.  In Smalltalk, everything is an object (including
classes, metaclasses, messages, etc...).  All functionailty must be
implemented in terms of sending messages to objects.  Ada is more
"package" based that allows OO programming, but also allows other
styles as well.

Syntax:
Smalltalk has a very simple, consitant syntax.  Smalltalk has no real
keywords and only a few reserved object names (nil, true, false,
thisContext).  Ada has a lagre syntax with many reserved words.
Smalltalk implements basic operations in terms of messages to objects,
not syntax.  Boolean conditions, looping, exception handling,
mutithreading, etc.. are all implemented using the same "send a
message to an object".  Ada has distinct syntax rules and keywords for
different situations.

Method Dispatching:
Smalltalk bases a message dispatch on the object receiving the
message, not the class membership of the object.  This is a subtle
difference.  At runtime, the Smalltalk VM will determine if the object
to recieve the message implements the proper method.  Ada will
determine at compile time if the operation to be performed on the
object is legitmate based on the type of the object.  This is because
the Smalltalk compiler does not know the type of the receiving object
at compile time.  A few side effects of this in Smalltalk include the
ability to do multiple-inheriitance of interface and the ability to
build messages on-the-fly at runtime.

Information Hiding:
In Smalltalk, all instance variables are "protected", all methods are
"public".  Ada allows access control by the separation of package
specification from package body and the ability to provide for a
"private" section of the package specification.

Class Hierarchy
Smalltalk "normally"has a single-rooted class hiearchy, with Object
being the parent class of all classes as a default.  However you can
make subclasses of nil instead of Object if you do not wish to inherit
from Object.  Ada does not use a single root class hiearchy.
Smalltalk allows extension of existing classes.

Standardization:
Ada is a standardized language with a Language Reference Manual that
all tools must conform to if they wish to wear the name Ada.
Smalltalk is fractured between several major vendors.  While the
"syntax" of Smalltalk is consitant across implementations, the class
hiearchies can be quite different.

Ada snd Smalltalk are quite dissimilar languages.  They are different
in there philosophies and intentions.  However, reflecting on how both
langauges apporach various issues and solve problems can be valuable,
regardless of which you choose to use.


A note on "Does Not Understand".  Since Smalltalk allows modification
to existing classes, The method #doesNotUnderstand: as implemented in
Object can be overloaded to trap and handle illegal message sends at
runtime.

Thank you, take care,

Jay O'Connor

joconnr@ibm.net
http://www.jmpstart.com
http://bassace.dyn.ml.org

31 Hertz




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-11-02  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-30  0:00 Difference between Ada and Small talk - Object Oriented David Brown
1997-10-30  0:00 ` Al Christians
1997-11-02  0:00   ` James O'Connor
1997-11-01  0:00 ` Matthew Heaney
1997-11-02  0:00   ` James O'Connor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox