comp.lang.ada
 help / color / mirror / Atom feed
From: essoft@ix.netcom.com
Subject: Re: Fortran Myths & Disinformation Wanted
Date: 1999/02/11
Date: 1999-02-11T21:41:30-08:00	[thread overview]
Message-ID: <36C3BEA7.F96F80FC@ix.netcom.com> (raw)
In-Reply-To: 19990210201511.04389.00000245@ng-fx1.aol.com

Dan Tex1 wrote:

> >> Fortran can also be fairly terse, if you just use the f77 way:
> >>
> >>   function f(a, x)
> >>     g(x) = 1-a*x**2
> >>     f = sin(g(2*x)) - cos(g(x/2))
> >>   end
> >
> >That example is a little too simple to be interesting. Anyway,
> >here is the Ada 95 version:
> >
> >with Ada.Numerics.Elementary_Functions;
> >use  Ada.Numerics.Elementary_Functions;
> >
> >function F (A, X: Float) return Float is
> >
> >   function G (X: Float) return Float is
> >   begin
> >      return 1.0-A*X**2;
> >   end G;
> >begin
> >   return Sin(G(2.0*X))-Cos(G(X/2.0));
> >end F;
> >
>
> I've heard some good things about Ada.   However,  I've never seen any Ada code
> until now.   Looking at the example above though....  for simple mathematical
> manipulations at least...  I think I'll stick with Fortran.   I find the above
> Ada example to be a bit too verbose and "non-natural" to read.  Is the rest of
> the language like that?

It gets worse exponentially -- a few years back I saw a rotational dynamics problem
OOPed in ADA and in a "Fortran style**" ADA  -- thirty pages of code vs page and a
half, that would've shrunk further had it been in Fortran...  Just like a picture
is worth a thousand words, so are the little parallel code snippets that should
periodically be shipped to disciples elsewhere... after all, seeing is believing!?


**  Before giving in to the packaging urge and start hiding everything in sight in
where_in_hell_is _that damn_thing_package.  Oh yes, they love verbosity -- you're
lucky if you can find some actual code here and there...

--
Dr.B.Voh
-----------------------------------------------
Modeling * Simulation * Analysis
http://www.netcom.com/~essoft
-----------------------------------------------






       reply	other threads:[~1999-02-11  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <36B9B8FF.4E34BF22@mixcom.com>
     [not found] ` <36BA1282.41EA5CB3@earthlink.net>
     [not found]   ` <87679g96ye.fsf@bglbv.my-dejanews.com>
     [not found]     ` <36BC008F.6CF45630@earthlink.net>
     [not found]       ` <slrn7bo6bd.1e3.ggw@wolves.adsl.duke.edu>
     [not found]         ` <36BC2658.62C1E14C@erols.com>
     [not found]           ` <g54v2.4574$ob2.9184@news.flash.net>
     [not found]             ` <36BDAE80.FB135C81@erols.com>
     [not found]               ` <87emo0y8vi.fsf@bglbv.my-dejanews.com>
     [not found]                 ` <bergervo.918581933@iaehv.IAEhv.nl>
     [not found]                   ` <87g18d3lsv.fsf@bglbv.my-dejanews.com>
     [not found]                     ` <19990210201511.04389.00000245@ng-fx1.aol.com>
1999-02-11  0:00                       ` essoft [this message]
1999-02-11  0:00                         ` Fortran Myths & Disinformation Wanted Mike Silva
1999-02-12  0:00                         ` robert_dewar
1999-02-12  0:00                         ` Robert I. Eachus
1999-02-13  0:00                           ` bglbv
1999-02-13  0:00                           ` Nick Roberts
1999-02-14  0:00                             ` Randy MacDonald
     [not found]                     ` <36c5a2cc.3411225@news1.newscene.com>
1999-02-13  0:00                       ` bglbv
replies disabled

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