From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: fyi, very interesting Ada paper OOP vs. Readability
Date: Wed, 9 May 2012 21:33:18 -0500
Date: 2012-05-09T21:33:18-05:00 [thread overview]
Message-ID: <jof9dq$c46$1@munin.nbi.dk> (raw)
In-Reply-To: jodq5f$j5f$1@speranza.aioe.org
"Nasser M. Abbasi" <nma@12000.org> wrote in message
news:jodq5f$j5f$1@speranza.aioe.org...
...
> There are always tradeoffs in language design. Ada's
> expressed design goal, of emphasizing ease of reading and
> understanding over ease of writing, means such tradeoffs
> should be decided in favor of ease of reading against ease
> of writing, This was clearly not done in the case of inheritance.
>
> The goals of inheritance and dispatching, and so of OOP,
> conflict with Ada's expressed design goals"
The problem with this conclusion, of course, is that inheritance in Ada long
predates OOP in Ada (Ada derived types have always had inheritance, even in
Ada 80). So clearly the most original of Ada's designers disagree with this
conclusion.
I suspect the problem is that the contention that inheritance reduces
readability is contentious. It's in the same category as use clauses and
generic instantiation, both of which are original Ada 83 features that make
declarations appear without appearing in the source code. You can make an
argument that all of these things harm readability, but it is obvious that
they all were considered important enough for the usability of the language
to go in anyway.
I can imagine a language that offered none of these things (inheritance, use
clauses, generic instantiation), but it's unclear that the result would be
particularly usable, and whether the extra declarations needed really would
help readability. (There is an argument that brevity also helps readability,
after all, and a language with more text is not necessarily more readable.)
I tend to lean toward the explicit side of the fence (I try to avoid use
clauses because of the maintenance headaches that they cause), but I do know
that code can be too explicit. People hate it when I write:
if Ada.Strings.Unbounded."="(My_String,
Ada.Strings.Unbounded.To_Unbounded_String ("open") then ...
because I refuse to use use clauses in almost all instances. I surely can
see why they might not find the above as readable as:
if My_String = "open" then ...
Randy.
next prev parent reply other threads:[~2012-05-10 2:33 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 13:06 fyi, very interesting Ada paper OOP vs. Readability Nasser M. Abbasi
2012-05-09 13:19 ` Nasser M. Abbasi
2012-05-09 13:36 ` Dmitry A. Kazakov
2012-05-09 13:39 ` Patrick
2012-05-09 13:55 ` Egil Høvik
2012-05-10 2:33 ` Randy Brukardt [this message]
2012-05-10 6:33 ` Simon Wright
2012-05-12 0:37 ` Randy Brukardt
2012-05-30 2:09 ` BrianG
2012-05-30 7:29 ` Niklas Holsti
2012-05-30 7:54 ` Yannick Duchêne (Hibou57)
2012-05-30 7:59 ` Dmitry A. Kazakov
2012-05-30 12:45 ` stefan-lucks
2012-05-30 13:12 ` Dmitry A. Kazakov
2012-05-30 19:11 ` Jeffrey Carter
2012-05-30 23:00 ` BrianG
2012-06-21 16:06 ` Randy Brukardt
2012-05-10 8:43 ` Maciej Sobczak
2012-05-15 6:16 ` Simon Wright
2012-05-10 11:46 ` Dmitry A. Kazakov
2012-05-10 14:23 ` Georg Bauhaus
2012-05-10 14:47 ` Nasser M. Abbasi
2012-05-10 15:11 ` Adam Beneschan
2012-05-10 16:06 ` Georg Bauhaus
2012-05-10 18:41 ` Niklas Holsti
2012-05-11 8:20 ` Georg Bauhaus
2012-05-10 20:11 ` Nasser M. Abbasi
2012-05-10 21:17 ` tmoran
2012-05-10 18:07 ` Jeffrey Carter
2012-05-11 7:32 ` Maciej Sobczak
2012-05-10 12:31 ` J-P. Rosen
2012-05-10 13:32 ` Yannick Duchêne (Hibou57)
2012-05-10 13:38 ` Nasser M. Abbasi
2012-05-10 23:42 ` Zhu Qun-Ying
2012-05-11 6:05 ` J-P. Rosen
2012-05-11 3:01 ` NatarovVI
2012-05-11 7:14 ` Dmitry A. Kazakov
2012-05-11 7:32 ` Nasser M. Abbasi
2012-05-11 7:58 ` Dmitry A. Kazakov
2012-05-13 3:11 ` NatarovVI
2012-05-13 10:03 ` Georg Bauhaus
2012-05-16 15:00 ` NatarovVI
2012-05-16 18:01 ` Georg Bauhaus
2012-05-21 16:35 ` NatarovVI
2012-05-21 17:56 ` Georg Bauhaus
2012-05-23 16:01 ` NatarovVI
2012-05-23 16:12 ` NatarovVI
2012-05-16 15:31 ` NatarovVI
2012-05-16 16:40 ` Dmitry A. Kazakov
2012-05-21 17:23 ` NatarovVI
2012-05-21 18:53 ` Dmitry A. Kazakov
2012-05-21 19:21 ` Nasser M. Abbasi
2012-05-23 17:59 ` NatarovVI
2012-05-23 18:45 ` Dmitry A. Kazakov
2012-05-23 17:39 ` NatarovVI
2012-05-23 18:39 ` Dmitry A. Kazakov
2012-05-11 3:09 ` NatarovVI
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox