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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Ada platforms and pricing, was: Re: a new language, designed for safety ! Date: Thu, 26 Jun 2014 05:41:31 +0200 Organization: Ada @ Home Message-ID: References: <5ebe316d-cd84-40fb-a983-9f953f205fef@googlegroups.com> <2100734262424129975.133931laguest-archeia.com@nntp.aioe.org> <5156oy7vhg99.17wu6q2ef45ke.dlg@40tude.net> <18et97c0c22vc$.y98lxxfblijn.dlg@40tude.net> <08f83f70-ccb1-45ec-8a4c-46e3442745b8@googlegroups.com> <557db566-fa02-4978-8798-50a097aa5407@googlegroups.com> NNTP-Posting-Host: 0gipH8doFnFjPXlWycyiNg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:20608 Date: 2014-06-26T05:41:31+02:00 List-Id: Le Tue, 24 Jun 2014 13:25:38 +0200, Dan'l Miller a= = =C3=A9crit: > On Tuesday, June 24, 2014 5:24:03 AM UTC-5, Simon Wright wrote: >> Shark8 writes: >> > On 23-Jun-14 13:21, Dan'l Miller wrote: >> >> In the spirit of lambasting the lack of direct representation >> >> of finite-state machines (FSMs) in Ada: >> >> > Wtf, there's a direct representation for state-machines: > > No, Shark8, that is the epitome of *not* direct representation of = > state-machines as a first-class citizen in {Ada, C, C++, ...}, because= = > the compiler has absolutely no clue that all the enumerations & = > branching are representing an FSM. For example, (without an enormous = = > amount of temporal-logic analysis, program slicing, and term-rewriting= ) = > the compiler cannot directly observe: oh, the programmer wrote a Moor= e = > machine (see below), but I can optimize the whole FSM by transforming = it = > to a Mealy machine, or vice versa. As another example, (without an = > enormous amount of temporal-logic analysis, program slicing, and = > term-rewriting) the compiler cannot perform any graph-theoretic = > transforms on the FSM, because the FSM is contorted into = > excessively-sequential imperative code instead of declarative. Yes, that's what made me wonder if loop with cases switch is really that= = good for a state machine, as you get a three=E2=80=91steps=E2=80=91goto:= assign the sate = variable, continue the loop, select case of the state variable. But = goto=E2=80=91labels are so ugly with Ada=E2=80=A6 -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity