comp.lang.ada
 help / color / mirror / Atom feed
* GNAT newbie
@ 1995-03-27 18:27 Dale Pontius
  1995-03-29  0:00 ` Tucker Taft
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dale Pontius @ 1995-03-27 18:27 UTC (permalink / raw)



Hello,

I'm an old Modula-2 bigot, and not seeing much life continuing there,
so I'm looking into other ways to avoid the dread C/C++.

My job is not programming, but I find it handy to code up stuff from
time to time. These pieces of code generally get years of use by a
small group of people. I have Pascal and Modula-2 code that I've gone
back into as much as five years later and extended or adapted without
terrible problems. I value readability and self-documentation.

Times are kind of tight all over these days, and in the past few
years I've made the move to new platforms, AIX/6000 and OS/2 Warp.
I'm now in a catch-22 situation: since I'm not a programmer, I can't
readily go out and buy an expensive compiler, but I can easily get
an 'internal use' copy C++. If I were a programmer I might be able to
buy a compiler, but I would probably be 'encouraged' to buy C++ or
use the same 'internal use' compiler.

As things have it, I'm looking at Ada95, and GNAT in particular. I
don't like the size of the Ada language, but am preparing to try and
use a reasonable subset. I do have a few questions:

1: Is there some sort of library overview? I see a bunch of .ads
   files, and know that they're the equivalent of a .def file in
   Modula-2, but the names aren't that informative without a roadmap.

2: Does Ada normally use pass-by-value or pass-by-reference? I've
   looked at some of the examples and have seen parameters marked
   with 'in out', which obviously must be by-reference, but how
   about the normal case. I'm wondering about side effects and
   performance.

3: Is there some sort of more concise description than the 500 page
   non-annotated postscript document? I realize it may be more vague,
   but I plan to stick to a more concrete subset of the language, at
   least to start with.

4: Any other 'newbie advice'?

5: Anyone want any specific 'newbie perspectives'? You've already
   gotten some.

Please don't flame me because of my address. I'm a lowly DRAM designer,
and have nothing to do with the company I work for not backing Ada.

Thanks,
Dale Pontius
(NOT speaking for IBM)




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

* Re: GNAT newbie
  1995-03-27 18:27 GNAT newbie Dale Pontius
@ 1995-03-29  0:00 ` Tucker Taft
  1995-03-29  0:00 ` Theodore Dennison
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Tucker Taft @ 1995-03-29  0:00 UTC (permalink / raw)


Dale Pontius (pontius@twonky.btv.ibm.com) wrote:

: ...
: As things have it, I'm looking at Ada95, and GNAT in particular. I
: don't like the size of the Ada language, but am preparing to try and
: use a reasonable subset. I do have a few questions:

: 1: Is there some sort of library overview? I see a bunch of .ads
:    files, and know that they're the equivalent of a .def file in
:    Modula-2, but the names aren't that informative without a roadmap.

The Ada 95 rationale includes a section that gives an overview
of the library.  You might want to start there.
The rationale is available by anonymous FTP from sw-eng.falls-church.va.us
in subdirectory public/adaic/docs/standard/95lrm_rat/v6.0.

: 2: Does Ada normally use pass-by-value or pass-by-reference? I've
:    looked at some of the examples and have seen parameters marked
:    with 'in out', which obviously must be by-reference, but how
:    about the normal case. I'm wondering about side effects and
:    performance.

Ada requires pass-by-copy for "elementary" types (numeric, enumeration, 
and access types).

Ada 95 requires pass-by-reference for certain "composite" types 
(roughly the "limited" types and the "tagged" types -- 
limited or tagged records, tasks, and protected types).
For other composite types (nonlimited/nontagged record and array types) 
Ada 95 allows the compiler to choose between pass-by-reference and 
pass-by-copy.  Most compilers use pass-by-reference for all
composite type parameters, unless they are very small (e.g. one or two words)
or are not aligned on a byte boundary (e.g. an unaligned slice of
a bit array).  However, in a distributed program (see Annex E), pass by
copy is used for all remote subprogram calls (actually, pass
by "marshalling"/"unmarshalling," which can be user-defined).

Note that "in out" does not imply pass-by-reference.  Pass-by-copy
"in out" is implemented by copy-in followed by copy-out.

: 3: Is there some sort of more concise description than the 500 page
:    non-annotated postscript document? I realize it may be more vague,
:    but I plan to stick to a more concrete subset of the language, at
:    least to start with.

Yes.  The Ada 95 Rationale includes two overview chapters, one
summarizing the differences between Ada 83 and Ada 95, and one
giving an overview of Ada 95 in its entirety.

: 4: Any other 'newbie advice'?

Play with the GNAT examples and edit them to try out new things
incrementally.

: 5: Anyone want any specific 'newbie perspectives'? You've already
:    gotten some.

Sure.  Just post it to comp.lang.ada, and you will be heard...

: Please don't flame me because of my address. I'm a lowly DRAM designer,
: and have nothing to do with the company I work for not backing Ada.

: Thanks,
: Dale Pontius
: (NOT speaking for IBM)

-Tucker Taft  stt@inmet.com
Intermetrics, Inc.




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

* Re: GNAT newbie
  1995-03-27 18:27 GNAT newbie Dale Pontius
  1995-03-29  0:00 ` Tucker Taft
@ 1995-03-29  0:00 ` Theodore Dennison
  1995-03-29  0:00 ` Theodore Dennison
  1995-03-29  0:00 ` John Howard
  3 siblings, 0 replies; 5+ messages in thread
From: Theodore Dennison @ 1995-03-29  0:00 UTC (permalink / raw)
  To: p

Dale Pontius <pontius@twonky.btv.ibm.com> writes:
> I'm an old Modula-2 bigot, and not seeing much life continuing there,

Are you a "structured programming bigot" too? Can I call you brother?

:-))

Sorry; inside joke.

T.E.D.





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

* Re: GNAT newbie
  1995-03-27 18:27 GNAT newbie Dale Pontius
  1995-03-29  0:00 ` Tucker Taft
  1995-03-29  0:00 ` Theodore Dennison
@ 1995-03-29  0:00 ` Theodore Dennison
  1995-03-29  0:00 ` John Howard
  3 siblings, 0 replies; 5+ messages in thread
From: Theodore Dennison @ 1995-03-29  0:00 UTC (permalink / raw)


Dale Pontius <pontius@twonky.btv.ibm.com> writes:
> I'm an old Modula-2 bigot, and not seeing much life continuing there,

Are you a "structured programming bigot" too? Can I call you brother?

:-))

Sorry; inside joke.

T.E.D.





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

* Re: GNAT newbie
  1995-03-27 18:27 GNAT newbie Dale Pontius
                   ` (2 preceding siblings ...)
  1995-03-29  0:00 ` Theodore Dennison
@ 1995-03-29  0:00 ` John Howard
  3 siblings, 0 replies; 5+ messages in thread
From: John Howard @ 1995-03-29  0:00 UTC (permalink / raw)


-- 69 Ada95 keywords.
abort
abs
abstract
accept
access
aliased
all
and
array
at
begin
body
case
constant
declare
delay
delta
digits
do
else
elsif
end
entry
exception
exit
for
function
generic
goto
if
in
is
limited
loop
mod
new
not
null
of
or
others
out
package
pragma
private
procedure
protected
raise
range
record
rem
renames
requeue
return
reverse
select
separate
subtype
tagged
task
terminate
then
type
until
use
when
while
with
xor
-- 69 Ada95 keywords.

The Rationale documents are good reading for a programmer.  They are your 
answer for these three questions.  See sw-eng.falls-church.va.us:ftp/ 
public/AdaIC/docs/standard/9Xlrm_rat and the "John Barnes Introducing 
Ada95" in ftp/public/AdaIC/docs/9Xproject/intro  or the language study notes 
in ftp/public/ada-lsn


Meaning of filename extensions:
 .ads has the package specification.
 .adb has the package body.
 .ada has the package specification and body.

The library hierarchy has Standard as the root.  System, Interfaces, and 
Ada branch directly from Standard.

==John Howard==TeamAda==TeamOS/2


Dale Pontius (pontius@twonky.btv.ibm.com) wrote:

: As things have it, I'm looking at Ada95, and GNAT in particular. I
: don't like the size of the Ada language, but am preparing to try and
: use a reasonable subset. I do have a few questions:

: 1: Is there some sort of library overview? I see a bunch of .ads
:    files, and know that they're the equivalent of a .def file in
:    Modula-2, but the names aren't that informative without a roadmap.

: 2: Does Ada normally use pass-by-value or pass-by-reference? I've
:    looked at some of the examples and have seen parameters marked
:    with 'in out', which obviously must be by-reference, but how
:    about the normal case. I'm wondering about side effects and
:    performance.

: 3: Is there some sort of more concise description than the 500 page
:    non-annotated postscript document? I realize it may be more vague,
:    but I plan to stick to a more concrete subset of the language, at
:    least to start with.
[...DELETE...]
: Dale Pontius




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

end of thread, other threads:[~1995-03-29  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-03-27 18:27 GNAT newbie Dale Pontius
1995-03-29  0:00 ` Tucker Taft
1995-03-29  0:00 ` Theodore Dennison
1995-03-29  0:00 ` Theodore Dennison
1995-03-29  0:00 ` John Howard

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