comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <nobody@noplace.com>
Subject: Re: GNAT parameter passing, C-style?
Date: Thu, 01 Jan 2004 14:17:27 GMT
Date: 2004-01-01T14:17:27+00:00	[thread overview]
Message-ID: <3FF42BE4.6080607@noplace.com> (raw)
In-Reply-To: pan.2004.01.01.05.28.26.596584@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk

It may very well be the common way it is done on most - or even all - 
implementations of C and Pascal. But that is saying something very 
different from a claim that it is part of the language. And if it is not 
a defined part of the language, it means an implementation is free to do 
it any way they want. Hence it cannot be counted on as *always* being 
true of a conforming implementation - and programmers are often mislead 
by that sort of misunderstanding.

I remember many years ago discussing Ada and portability with another 
programmer. She said that she was going to recommend to her boss that 
the next development be done in C because Ada's I/O wasn't portable. I 
wanted to know why she thought that was true and she showed me the code 
they were working on. Their project was making use of Digital Equipment 
Corporation's "Starlet" package for I/O and she was concluding from this 
fact that Ada didn't have portable I/O. I hauled out the RM and showed 
her Text_IO, etc., and found the C interface to Starlet and tried to 
explain that Ada *did* have portable I/O - just that her project wasn't 
making use of it and it was no different for C. I think she understood 
at that point, but she looked a little unconvinced.

Lots of programmers travel on bad or misleading information about 
programming languages. Most of them are not exactly Rocket Scientists 
(I'll be glad to help them in that respect! :-) and all they know is 
what they see in their day-to-day work with one specific implementation 
of a language. (Experiment: Pick some feature of the MFC that is not 
part of C++ and is unique to MFC. Ask a dozen programmers who use MSVC++ 
"Does C++ have feature X?" Bet money most will say "Yes") It is exactly 
this sort of misunderstanding that leads your garden variety programmer 
to conclude "Ada is inherently slow because all implementations I've 
seen are slow..." or "Ada isn't able to do civilian programming since it 
was built for the military" That's why I get overly cautious with claims 
like "C passes parameters this way..." when there isn't any such 
requirement in the C standard.

MDC



Luke A. Guest wrote:
> 
> So, as far as I am concerned there is still a C & PASCAL convention, it's
> just a matter of how the compiler works I suppose.
> 
> Luke.
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Face it ladies, its not the dress that makes you look fat.
     Its the FAT that makes you look fat."

         --  Al Bundy

======================================================================




  reply	other threads:[~2004-01-01 14:17 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-26 10:37 GNAT parameter passing, C-style? Luke A. Guest
2003-12-26 14:20 ` Marin David Condic
2003-12-26 14:51   ` Hyman Rosen
2003-12-26 15:07     ` Marin David Condic
2003-12-26 15:39       ` Luke A. Guest
2003-12-26 17:03         ` Hyman Rosen
2003-12-26 17:08           ` Luke A. Guest
2003-12-26 17:27             ` Luke A. Guest
2003-12-26 18:21               ` Frank J. Lhota
2003-12-26 19:06                 ` Frank J. Lhota
2003-12-31 10:23                 ` Keith Thompson
2003-12-31 14:45                   ` Frank J. Lhota
2003-12-31 15:05                     ` Hyman Rosen
2003-12-31 16:30                       ` Frank J. Lhota
2003-12-31 17:24                         ` Hyman Rosen
2003-12-31 19:05                           ` Frank J. Lhota
2003-12-31 19:38                             ` Hyman Rosen
2003-12-31 20:47                               ` Frank J. Lhota
2003-12-31 21:35                                 ` Hyman Rosen
2004-01-01  2:50                                   ` Frank J. Lhota
2004-01-01  5:20                                     ` Luke A. Guest
2004-01-01 16:06                                       ` Hyman Rosen
2004-01-01 16:32                                         ` Frank J. Lhota
2004-01-01 16:43                                           ` Hyman Rosen
2004-01-02  0:24                                             ` Frank J. Lhota
2004-01-02  4:09                                               ` Hyman Rosen
2004-01-02 13:29                                                 ` Frank J. Lhota
2004-01-01  5:17                                   ` Luke A. Guest
2004-01-01  5:09                                 ` Luke A. Guest
2004-01-02  1:17                                   ` tmoran
2004-01-01 17:18                                 ` Jano
2004-01-02  0:25                                   ` Frank J. Lhota
2004-01-07  6:37                         ` Dave Thompson
2004-01-01  3:38                       ` Marin David Condic
2004-01-01  5:28                         ` Luke A. Guest
2004-01-01 14:17                           ` Marin David Condic [this message]
2004-01-01 16:20                             ` Jeff C,
2004-01-02 13:47                               ` Marin David Condic
2004-01-05 21:06                     ` Keith Thompson
2004-01-06  3:42                       ` Robert I. Eachus
2004-01-06 20:54                         ` Keith Thompson
2004-01-06 23:45                           ` Robert I. Eachus
2004-01-06 13:46                       ` Frank J. Lhota
2003-12-27 14:22             ` Marin David Condic
2003-12-26 17:10         ` Martin Krischik
2003-12-26 19:04           ` Frank J. Lhota
2003-12-26 18:01   ` Georg Bauhaus
replies disabled

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