comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <see.reply.to@maps.futureapps.de>
Subject: Re: rant (Re: Ada featured in Doctor Dobb's Journal )
Date: Sat, 17 May 2008 11:45:51 +0200
Date: 2008-05-17T11:45:53+02:00	[thread overview]
Message-ID: <482ea950$0$6774$9b4e6d93@newsspool2.arcor-online.net> (raw)
In-Reply-To: <ba91fec6-cfc1-4b48-ad96-fa2a233e66f4@u36g2000prf.googlegroups.com>

jhc0033@gmail.com wrote:

> But this guy uses Ada, because as we saw before, using
> different languages is OK, and the safety community uses it. He solved
> some discrete math problem he was trying to solve.

I think you've missed a piece that other newcomers to Ada have
reported, too, has helped them:
That the language almost automatically makes you think about how
to model objects as types even at the lowest possible level, i.e.
at the bits level; where you would be used to "machine types"
like int, float, double etc. you start using abstraction, i.e.
named numeric types, etc, without run-time overhead, but with
static type checks. Plus, you can build other types around different
named numeric types and get statically type checked operations at
a low level, e.g.

procedure News13 is

-- 4-space:

    type Enough_Precision is digits 11;  -- fpt for my algorithm
    type Index_Type is range 0 .. 3;  -- need 4-tuples
    type T4 is array(Index_Type) of Enough_Precision;
    pragma Convention(Fortran, T4);  -- can pass to Fortran

    type Count_Type is range 0 .. 1_000;  -- num of measurements
    type Fruit is (Banana, Apple, Pear);

    point_in_space: T4;
    c: Count_Type;
begin
    c := 4;
    point_in_space(c) := 1.0;  -- won't compile, c not in Index_Type
    point_in_space(4) := 1.0;  -- index constraint violation diagnosed
    point_in_space(Banana) := 1.0; -- error, Banana ∉ Index_Type

end News13;

> He could have
> solved it just as easily in any other language perhaps, but would we
> write an article about it? The end".

Perhaps, but then he says that his solution has been easier than
what he did before because he could do low level programming
yet write "wheels" abstractions.




  parent reply	other threads:[~2008-05-17  9:45 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 10:56 Ada featured in Doctor Dobb's Journal Ludovic Brenta
2008-05-16 12:28 ` Mike Silva
2008-05-16 13:04   ` Ludovic Brenta
2008-05-16 14:33     ` Mike Silva
2008-05-16 22:26       ` Randy Brukardt
2008-05-17  6:30   ` rant (Re: Ada featured in Doctor Dobb's Journal ) jhc0033
2008-05-17  8:28     ` Ludovic Brenta
2008-05-17  9:27       ` Dmitry A. Kazakov
2008-05-17  9:56         ` Georg Bauhaus
2008-05-17 12:05           ` Dmitry A. Kazakov
2008-05-17  9:38       ` jhc0033
2008-05-17 11:49         ` Ludovic Brenta
2008-05-17 17:53           ` jhc0033
2008-05-17 23:21             ` Ludovic Brenta
2008-05-18  0:28               ` jhc0033
2008-05-18  0:35               ` Dr. Adrian Wrigley
2008-05-18  8:04                 ` Prototyping with Ada (was: Ada featured in Doctor Dobb's Journal) Ludovic Brenta
2008-05-20 10:25                   ` John McCabe
2008-05-20 16:57                     ` Prototyping with Ada Jeffrey R. Carter
2008-05-20 17:23                       ` Mike Silva
2008-05-20 17:37                       ` Peter C. Chapin
2008-05-20 23:30                         ` Mike Silva
2008-05-21  0:40                         ` Jeffrey R. Carter
2008-05-21 12:53                         ` Martin Krischik
2008-05-22  8:43                     ` Stephen Leake
2008-05-28 11:32                       ` John McCabe
2008-05-28 12:12                         ` Ludovic Brenta
2008-05-29  3:27                           ` tmoran
2008-05-29  9:41                           ` John McCabe
2008-05-31  6:03                         ` Stephen Leake
2008-06-02 15:43                           ` Britt Snodgrass
2008-05-17  9:45     ` Georg Bauhaus [this message]
2008-05-17 10:57     ` rant (Re: Ada featured in Doctor Dobb's Journal ) Mike Silva
2008-05-17 16:49     ` tmoran
2008-05-16 22:56 ` Ada featured in Doctor Dobb's Journal Ivan Levashew
replies disabled

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