comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Carroll <mtbc@bcs.org>
Subject: Re: Ichbiah's Letter
Date: Sat, 25 Oct 2014 10:12:03 +0100
Date: 2014-10-25T10:12:03+01:00	[thread overview]
Message-ID: <87k33oecnw.fsf@ixod.org> (raw)
In-Reply-To: 558688c3-02b0-4e14-838b-2d94074030bd@googlegroups.com

vincent.diemunsch@gmail.com writes:

> On Friday, October 24, 2014 8:47:10 PM UTC+2, Jeffrey Carter wrote:
(snip)
>> https://duckduckgo.com/l/?kh=-1&uddg=http%3A%2F%2Fweb.elastic.org%2F~fche%2Fmirrors%2Fold-usenet%2Fada-with-null
(snip)
> Perfect ! Thank you very much, Jeff !

Of course, as an Ada novice, it raises the question for me of to what
extent the voiced concerns were actually borne out. I don't yet know
enough to be able to judge for myself so you'll have to forgive me a
little speculation and language comparison here.

For instance, back in the day, I quite liked Modula-3: when I wrote
code, I could be pretty sure of what it would actually do, and the
language definition was clear and succinct. If Ada aims to lend itself
to, say, high-reliability concurrent systems that need to work in
near-real-time, I can imagine that it helps a lot if the programmers can
do what they need by writing code such that any of them can look at it
and be pretty sure of its exact behavior in a running system. It's not
enough for code simply to be correct -- doing the right thing, as
quickly as one would expect -- but it has to be /obviously/ correct to
the reader (or, if not, it better be backed by a spectacular test suite,
which in concurrency becomes tricky when the scheduler's behavior is a
factor).

So, did Ada get all kinds of confusing extra interacting-features stuff
added? Despite any greater consequent complexity in the compiler or
run-time, is it easy for people needing to write really clear, certain
code to avoid those corners of the language and keep with a
solid-feeling subset, or is it all clear enough that there's no need to
hide from scary corners? (Is the extra complexity worth it, or does it
just make it harder to write compilers and textbooks?)

I run into awkward corners in other languages sometimes. For instance,
there's something I find unintuitive about bit-twiddling in Java
(perhaps some of the automatic casting, and not having unsigned ints, is
a factor) which means that I really need to test that kind of code
carefully before being satisfied it's right; I also try to use patterns
like PECS in littering code with "extends", "super", etc. as seems
appropriate but I still get surprises there, too, though at least those
are compile-time ones. In enterprise Java my guarantees are even fewer:
if the object instances I have in hand are proxy objects from Hibernate,
Spring, etc. then they might look simple but they may hide a lot of
auto-magic complexity. Or, in Haskell, while it feels a whole lot
clearer than Java and I can usually be pretty sure that my code /will/
do what I want, the lazy evaluation, advanced compiler optimization, and
techniques like software transactional memory, often leave me far less
confident about /how quickly/ it will do it: if what I imagined the
compiler could achieve is actually going to come to pass.

Basically, if I am learning about modern Ada, I wonder how soon I'll
reach high confidence about what my code that actually compiles will do
when I execute it, or to what extent I'll have to adopt certain
disciplines, or avoid certain things, to achieve that. For instance, I
would imagine that the contract-based programming offered in Ada 2012 is
actually a move toward greater reliability without making the actual
code that does stuff any harder to understand, and the way they seem to
be written in some logic-based language looks encouraging: plenty of
languages have some kind of "assert <Boolean>" statement, but writing
the predicates declaratively means that the "rephrasing" of at least
some aspect of what the code does might (a) make me think more clearly
and deeply about what it does and (b) being a rephrasing, not propagate
bugs in the code to become matching bugs in how I check that things are
as I thought.

-- Mark


  reply	other threads:[~2014-10-25  9:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24 18:20 Ichbiah's Letter vincent.diemunsch
2014-10-24 18:47 ` Jeffrey Carter
2014-10-24 19:39   ` David Botton
2014-10-24 20:50     ` David Botton
2014-10-25  8:05   ` vincent.diemunsch
2014-10-25  9:12     ` Mark Carroll [this message]
2014-10-25 10:04       ` Dmitry A. Kazakov
2014-10-25 11:25         ` Simon Wright
2014-10-26  5:33           ` Randy Brukardt
2014-10-26 16:28   ` Jacob Sparre Andersen
2014-10-26 17:46     ` Simon Clubley
2014-10-26 22:36       ` Jacob Sparre Andersen
2014-10-27  3:00       ` Shark8
2014-10-26 17:59     ` invalid
2014-10-27  0:35       ` Dennis Lee Bieber
2014-10-27  3:01     ` Shark8
2014-10-27 22:10     ` Randy Brukardt
2014-10-28  9:45       ` Georg Bauhaus
  -- strict thread matches above, loose matches on Subject: below --
1993-04-20 10:10 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!torn!
1993-04-16  9:24 pipex!uknet!warwick!zaphod.crihan.fr!univ-lyon1.fr!scsing.switch.ch!sicsu
1993-04-16  7:26 Hu Man
1993-04-15 19:34 David Emery
1993-04-15 18:01 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!usene
1993-04-15 17:04 Michael Feldman
1993-04-15 13:08 Wes Groleau X7574
1993-04-15 12:23 Dave Hawk
1993-04-15  3:24 Alex Blakemore
1993-04-14 23:24 usenet.ufl.edu!eng.ufl.edu!spool.mu.edu!sdd.hp.com!cs.utexas.edu!utnut!no
1993-04-14 21:08 news
1993-04-14 21:08 Alex Blakemore
1993-04-14 21:00 Alex Blakemore
1993-04-14 20:17 Michael Feldman
1993-04-14 19:08 Robert I. Eachus
1993-04-14 13:58 enterpoop.mit.edu!spool.mu.edu!howland.reston.ans.net!noc.near.net!inmet!
1993-04-14 13:16 Robert Firth
1993-04-14  0:12 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!news.aero.org!jordan
replies disabled

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