comp.lang.ada
 help / color / mirror / Atom feed
* Help me to chose between ADA 95 and C++
@ 1999-11-26  0:00 Robert
  1999-11-26  0:00 ` Andreas Winckler
                   ` (3 more replies)
  0 siblings, 4 replies; 67+ messages in thread
From: Robert @ 1999-11-26  0:00 UTC (permalink / raw)


I work with ORACLE on AIX at my job and I want to learn one
serious object oriented language.I have some expirience with Java
,but this is not what I want.At my opinion Java is good, portable
,easy to learn and debug but as a language is just a C++ without
things that programing in C++ makes as art.So I am trying to chose
between ADA 95 and C++.I don't know anything about ADA 95
,but I hearded that is wey good object oriented language, wey safe.
Please send me your opinion and answers to my questions:

1)Is enough good a combination Oracle + ADA 95 as a
  combination ORACLE + C++ or Java ?
2)Does exist any tool and library for GUI design with ADA 95
   on Windows 95/NT or X-Windows, comercial or free ?
3)How are things with finding jobs on Europe for ORACLE + ADA 95 ?
4)Is learning ADA 95 and profesional programing, debuging
  easiest than do this in C++ ?


                                          Thanks !
                                          Robert Bralic
                                          robert.bralic@si.tel.hr




^ permalink raw reply	[flat|nested] 67+ messages in thread
* RE: Help me to chose between ADA 95 and C++
@ 1999-12-14  0:00 Robert C. Leif, Ph.D.
  1999-12-15  0:00 ` Richard D Riehle
  0 siblings, 1 reply; 67+ messages in thread
From: Robert C. Leif, Ph.D. @ 1999-12-14  0:00 UTC (permalink / raw)
  To: comp.lang.ada

From: Bob Leif
To: Richard Riehle et al.
How do you set an instantiation equal to a universal integer or
universal_real? I tried to do this with a 32 bit data type and had to define
a non_private type for simple operations like
Data_32 : Data_32_Type := 7;
I then converted from the non_private to the private (Ugly).

-----Original Message-----
From: Richard D Riehle [mailto:laoXhai@ix.netcom.com]
Sent: Tuesday, December 14, 1999 10:55 AM
To: comp.lang.ada@ada.eu.org
Subject: Re: Help me to chose between ADA 95 and C++


In article <38566835.B4A2D48@rdel.co.uk>,
	Chris Powell <chris.powell@rrds.co.uk> wrote:

>Good type design (especially in an OO system) would define types with
>appropriate functions acting on those types, possibly returning other
>types effectively defining allowed conversions. This is no different
>from defining C++ classes with appropriate methods which are effectively
>type safe through data hiding and a well defined public interface.

I am going to respond to only one of your points.  Your response to
my other arguments was intelligent and thoughtful.  In the case of
this response, you are right on the mark!

I have long felt that we often expose too much of some numeric types
in our packages and ought to take more care to hide some of the
details.  This would lead to better maintenance as well as more
options for "design by contract."

The following example will be short, and that is always a problem since
code fragments never fully represent the range of possibilities.

package Real_Number is
  type Real is private;
  function "+" (L, R : Real) return Real;
  -- same for all other operators
  Divide_By_Zero : exception;
  -- more exceptions
private
  type Real is digits 9;
end Real_Number;

The corresponding package body can have additional checks within
each operation to ensure conformity to the application constraints.
It turns out, though, that implementing this, in Ada, is somewhat
tedious because of the need to avoid recursive calls within each
function in the package body.  It can be done.

More interesting is,

generic
   type Number is private;
   with function "+" (L, R : Number) return Number is <>;
   -- all other operators similarly declared as generic parameters
package Generic_Operators is end Generic_Operators;

with Generic_Operators;
generic
  with package Operators is new Generic_Operators (<>);
package Statistics is
   ...
end Statistics;

which allows instantiation with any numeric type.  Also, there is a
way to instantiate this with a non-numeric type that I published in
an Ada Letters a couple of years ago.

So, on this point, Chris, I am pretty much in agreement with you.

Richard Riehle

      P.S.  I apologize if my earlier reply was a bit to harsh.










^ permalink raw reply	[flat|nested] 67+ messages in thread
* RE: Help me to chose between ADA 95 and C++
@ 1999-12-15  0:00 Robert C. Leif, Ph.D.
  1999-12-16  0:00 ` Richard D Riehle
  0 siblings, 1 reply; 67+ messages in thread
From: Robert C. Leif, Ph.D. @ 1999-12-15  0:00 UTC (permalink / raw)
  To: comp.lang.ada

Richard
I was remarking on a standard private type in the specification of a generic
or any other package. If your numeric types are declared in the private part
of a package, you can not set them equal to the literal value of a number,
like 7. Perhaps your solution of using generics would eliminate this
problem. I can not write a subprogram specification to put into a package
specification using ":=" as a function where the formal parameter would be a
universal type. This makes be question how you could create an instantiation
of a generic function to do this.

Yours,
Bob

-----Original Message-----
From: Richard D Riehle [mailto:laoXhai@ix.netcom.com]
Sent: Tuesday, December 14, 1999 7:09 PM
To: comp.lang.ada@ada.eu.org
Subject: RE: Help me to chose between ADA 95 and C++


In article <NBBBJNOMKDIAJALCEFIJOELFDGAA.rleif@rleif.com>,
	"Robert C. Leif, Ph.D." <rleif@rleif.com> wrote:

>From: Bob Leif
>To: Richard Riehle et al.
>How do you set an instantiation equal to a universal integer or
>universal_real? I tried to do this with a 32 bit data type and had to
define
>a non_private type for simple operations like
>Data_32 : Data_32_Type := 7;
>I then converted from the non_private to the private (Ugly).

Robert,

A universal integer is not a defined type.  You would want to
declare a type to accomplish instantiation using my generic
example.  It cannot be instantiated with a universal integer
or a universal float since it is a private type formal parameter.

I am not sure whether I actually answered your question.  Perhaps
someone else will have a different reading of it.

Regards,

Richard

-- =========== Code from my earlier post follows =================

>generic
>   type Number is private;
>   with function "+" (L, R : Number) return Number is <>;
>   -- all other operators similarly declared as generic parameters
>package Generic_Operators is end Generic_Operators;
>
>with Generic_Operators;
>generic
>  with package Operators is new Generic_Operators (<>);
>package Statistics is
>   ...
>end Statistics;
>
>which allows instantiation with any numeric type.  Also, there is a
>way to instantiate this with a non-numeric type that I published in
>an Ada Letters a couple of years ago.
>
>So, on this point, Chris, I am pretty much in agreement with you.
>
>Richard Riehle
>
>      P.S.  I apologize if my earlier reply was a bit to harsh.
>
>
>
>
>
>










^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: Help me to chose between ADA 95 and C++ (
@ 1999-12-22  0:00 Ehud Lamm
  0 siblings, 0 replies; 67+ messages in thread
From: Ehud Lamm @ 1999-12-22  0:00 UTC (permalink / raw)


On Tue, 14 Dec 1999, Chris Powell wrote:

|Brian Rogoff wrote:
|
|> Of course, none of this is really OO, but I think OO is way overrated anyways.
|> Since you mention STL in the same paragraph as OO, I suppose I should ask
|> you what you mean by OO. Most people wouldn't consider the STL OO,
|> including its authors.
|
|Its true that the STL is not implemented using OO constructs, but it is
|conceptually OO, with the concept of a container base class defining
|methods for manipulating elements, which are overriden to work
|differently for specific container types and the abstraction of
|iterators which can work on any type of container... 


I hope you are saying this after reading Stepanov's view of OO. You can
find it in the interviews linked from my site. Makes for interesting
reading.

Ehud Lamm mslamm@mscc.huji.ac.il
http://purl.oclc.org/NET/ehudlamm <== My home on the web 
Check it out and subscribe to the E-List- for interesting essays and more!









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

end of thread, other threads:[~2000-01-12  0:00 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-26  0:00 Help me to chose between ADA 95 and C++ Robert
1999-11-26  0:00 ` Andreas Winckler
1999-11-26  0:00 ` Harald Schmidt
1999-11-26  0:00   ` Andreas Winckler
1999-11-26  0:00     ` Florian Weimer
1999-12-04  0:00   ` Richard D Riehle
     [not found]     ` <01bf3e32$0b9dc880$022a6282@dieppe>
1999-12-10  0:00       ` Chris Powell
1999-12-13  0:00         ` Marin D. Condic
1999-12-13  0:00         ` Richard D Riehle
1999-12-14  0:00           ` Chris Powell
1999-12-14  0:00             ` Richard D Riehle
1999-12-14  0:00               ` Matthew Heaney
1999-12-14  0:00             ` Larry Kilgallen
1999-12-15  0:00               ` Robert A Duff
2000-01-12  0:00                 ` Richard Pinkall-Pollei
1999-12-14  0:00             ` Ray Blaak
1999-12-14  0:00             ` Simon Wright
1999-12-15  0:00               ` Chris Powell
1999-12-15  0:00                 ` Robert A Duff
1999-12-15  0:00             ` Ted Dennison
1999-12-20  0:00               ` Stefan Skoglund
1999-12-16  0:00             ` Pascal Obry
1999-12-16  0:00               ` Rakesh Malhotra
1999-12-21  0:00                 ` Geoff Bull
1999-12-16  0:00               ` Aidan Skinner
1999-12-16  0:00               ` Lutz Donnerhacke
1999-12-21  0:00             ` Robert Dewar
1999-12-21  0:00               ` Ted Dennison
1999-12-21  0:00                 ` Robert Dewar
1999-12-21  0:00               ` Chris Powell
1999-12-13  0:00         ` Brian Rogoff
1999-12-14  0:00           ` Chris Powell
1999-12-14  0:00             ` Brian Rogoff
1999-12-14  0:00             ` Preben Randhol
1999-12-14  0:00               ` Stephen Leake
1999-12-14  0:00                 ` Tucker Taft
1999-12-15  0:00                   ` Stephen Leake
1999-12-15  0:00                 ` Preben Randhol
1999-12-15  0:00           ` Richard Pinkall-Pollei
1999-12-15  0:00             ` Richard Pinkall-Pollei
1999-12-21  0:00             ` Geoff Bull
1999-12-21  0:00               ` Tucker Taft
1999-12-22  0:00                 ` Ted Dennison
1999-12-13  0:00         ` DuckE
1999-12-14  0:00           ` Matthew Heaney
1999-12-14  0:00         ` Matthew Heaney
1999-12-14  0:00           ` Chris Powell
1999-12-14  0:00             ` Stephen Leake
1999-12-23  0:00               ` Chris Powell
1999-12-14  0:00             ` Tucker Taft
1999-12-14  0:00               ` Matthew Heaney
1999-12-23  0:00               ` Chris Powell
1999-12-27  0:00                 ` Robert A Duff
1999-12-14  0:00             ` Matthew Heaney
1999-12-15  0:00               ` Hyman Rosen
1999-11-26  0:00 ` Preben Randhol
1999-11-26  0:00   ` Preben Randhol
1999-11-27  0:00 ` Lionel Draghi
  -- strict thread matches above, loose matches on Subject: below --
1999-12-14  0:00 Robert C. Leif, Ph.D.
1999-12-15  0:00 ` Richard D Riehle
1999-12-15  0:00 Robert C. Leif, Ph.D.
1999-12-16  0:00 ` Richard D Riehle
1999-12-16  0:00   ` Matthew Heaney
1999-12-17  0:00     ` Richard D Riehle
1999-12-18  0:00       ` Matthew Heaney
1999-12-20  0:00         ` Richard D Riehle
1999-12-22  0:00 Help me to chose between ADA 95 and C++ ( Ehud Lamm

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