comp.lang.ada
 help / color / mirror / Atom feed
From: Jere <jhb.chat@gmail.com>
Subject: Re: Ada: A beginners experience
Date: Sat, 14 Jul 2018 08:13:38 -0700 (PDT)
Date: 2018-07-14T08:13:38-07:00	[thread overview]
Message-ID: <6febe5d6-0339-4da5-afe5-9af4e2255597@googlegroups.com> (raw)
In-Reply-To: <87fu0m7ak0.fsf@nightsong.com>

On Friday, July 13, 2018 at 11:36:51 PM UTC-4, Paul Rubin wrote:
> This won't be a popular viewpoint here but IMHO Ada isn't a great choice
> as a first language.  It's designed to help deal with the problems of
> writing and maintaining very large code bases.  But there is a lot of
> overhead in the features it supplies for that.
> 
I know you probably know all this (you have a lot of experience), but
for the benefit of new folks, I wanted to get a bit more specific on
this.  Languages like Ada and C++ can have a lot of overhead if
used like one is writing a desktop application.  However, Ada (and C++) 
has a lot of those features at either no cost or almost no cost.  I've
spent a lot of time writing Ada (and C++) code for a chip with 64k flash, 
so I've definitely spent time deciphering what causes overhead.  

The type system (the big draw for me to Ada) is actually very streamlined.
I've extensively used generics as well and have found almost no extra
cost at all (verifying the generated assembly).  Mind you, not only is
this compiler specific, but it also requires you to consider how you
are defining your types, variables, and functions.  If the compiler
can make things at compile time, that's when the cost goes drastically
down.  Creating things based on runtime inputs is where it can start
to skyrocket if not monitored.  However, there are definitely things
in Ada that are costly.  Tasks and Protected objects are a big one.  
Full exception handling capability is another.  I haven't been able
to get Finalization working (haven't tried hard honestly), so I cannot
comment on that one.  As a side note, even some runtime components
can actually be better than compile time.  In every practical case
of my C++ projects, using dynamic dispatching was faster and smaller
code size than trying to use case statements.  It's not always the
case, but again, that is something a developer has to keep tabs on.

None of this is beginner friendly though obviously.

  parent reply	other threads:[~2018-07-14 15:13 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-14  2:36 Ada: A beginners experience blakemichael073
2018-07-14  2:53 ` Dan'l Miller
2018-07-14  3:53   ` blakemichael073
2018-07-14 11:26     ` Brian Drummond
2018-07-14 12:11       ` blakemichael073
2018-07-14 13:27     ` Dan'l Miller
2018-07-14 14:57     ` Jere
2018-07-16 21:38       ` Maciej Sobczak
2018-07-20 12:00         ` Jere
2018-07-20 21:05           ` Maciej Sobczak
2018-07-21  8:25             ` Simon Wright
2018-07-14  3:36 ` Paul Rubin
2018-07-14  4:08   ` blakemichael073
2018-07-14  6:21     ` Paul Rubin
2018-07-14  8:30       ` Rene
2018-07-14 15:10         ` Paul Rubin
2018-07-14 15:13   ` Jere [this message]
2018-07-14 15:42     ` Paul Rubin
2018-07-14 16:01       ` Dmitry A. Kazakov
2018-07-14 19:05         ` Dennis Lee Bieber
2018-07-15  0:31         ` Paul Rubin
2018-07-14 15:55     ` Simon Wright
2018-07-15 22:44     ` Bill Findlay
2018-07-16  1:17       ` Jere
2018-07-16  1:41         ` Paul Rubin
2018-07-16  2:01         ` Bill Findlay
2018-07-16  2:46       ` Dan'l Miller
2018-07-16 15:54         ` Bill Findlay
2018-07-14  8:01 ` Dmitry A. Kazakov
2018-07-14 12:20   ` blakemichael073
2018-07-14 13:15     ` Dmitry A. Kazakov
2018-07-14 14:15       ` blakemichael073
2018-07-14  8:19 ` Jeffrey R. Carter
2018-07-16  9:25 ` fabien.chouteau
2018-07-17  1:18   ` blakemichael073
2018-07-17  1:44     ` Dennis Lee Bieber
2018-07-17 12:59     ` fabien.chouteau
2018-07-20  1:08     ` Philip Munts
2018-07-23  4:04       ` blakemichael073
2018-07-23 13:15         ` Dennis Lee Bieber
2018-07-26 10:20   ` fabien.chouteau
2018-07-16 17:36 ` G. B.
2018-07-16 18:43   ` Simon Wright
2018-07-16 19:08     ` Paul Rubin
replies disabled

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