From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,db88d0444fafe8eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsmst01b.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr27.news.prodigy.net.POSTED!4988f22a!not-for-mail From: Newsgroups: comp.lang.ada References: <1125544603.561847.32140@g47g2000cwa.googlegroups.com> <14muavojz308w.1ouv7xin79rqu$.dlg@40tude.net> <87fyspgqrm.fsf@mid.deneb.enyo.de> <75KTe.5$1r.0@dfw-service2.ext.ray.com> Subject: Re: Surprise in array concatenation X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: NNTP-Posting-Host: 64.164.116.225 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr27.news.prodigy.net 1126282653 ST000 64.164.116.225 (Fri, 09 Sep 2005 12:17:33 EDT) NNTP-Posting-Date: Fri, 09 Sep 2005 12:17:33 EDT Organization: SBC http://yahoo.sbc.com X-UserInfo1: FKPO@MC@@S@QBTLYYZH@^SXBUSXB@DTMNHWB_EYLJZ]BGIELDVW[AKK[J\]^HVKHG^EWZHBLO^[\NH_AZFWGN^\DHNVMX_DHHX[FSQKBOTS@@BP^]C@RHS_AGDDC[AJM_T[GZNRNZAY]GNCPBDYKOLK^_CZFWPGHZIXW@C[AFKBBQS@E@DAZ]VDFUNTQQ]FN Date: Fri, 09 Sep 2005 16:17:33 GMT Xref: g2news1.google.com comp.lang.ada:4556 Date: 2005-09-09T16:17:33+00:00 List-Id: "Jeffrey Carter" wrote in message news:B2_Te.5$oo1.2@dfw-service2.ext.ray.com... > adaworks@sbcglobal.net wrote: > > > > Enumerated types, as presently designed, are not extensible. They > > do no encapsulate their operations, and new operations, though > > they can be added, do not bind in a way that conforms to conventional > > OO design principles. > > So? Ada types should not be a consideration during design. Once your > have your design, you decide how to implement it. If enumerated types > are not suitable, don't use them. > It is not a matter of suitable or not. Rather, it is a concern that enumerated types can compromise a design unless one thinks carefully about their long-term effects within that design. > Your compiler implements your design in machine code, which has no > extension mechanisms. Should that affect your design? > We typically do not extend instances. Extensibility is at a different level of abstraction. Even if Ada were compiled to an intermediate byte code, as is the case with Java, extensibility would stillbe at the source code level on classes, not instances. In reply to Dr. Rosen, you are correct in your observation that Ada does not force a design paradigm on its users. However, there is a difference between being required to use a particular paradigm and being able to use one's preferred paradigm. When enumerated types are extensible, one can choose OOP, or not. Java, for example, has a "final" option to make this choice feasible. I certainly do not suggest using Java instead of Ada. Java falls short of what we would want for reliable computing in large-scale software systems, but we can learn from other languages, even when those languages have inherent shortcomings. Richard Riehle