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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: why Ada type casting is different from other languages? newType(value) vs. (newType)value Date: Mon, 14 Jul 2014 19:41:58 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <53c40435$0$6612$9b4e6d93@newsspool4.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Mon, 14 Jul 2014 19:41:58 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="6a11973eeb5096b7267dc5a529e05945"; logging-data="24749"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190+MFvOYowAtGTLTjSmNij9Oc30O9a+Pw=" User-Agent: slrn/0.9.9p1 (Linux) Cancel-Lock: sha1:54Ai2t4rkEcjrsaRLJmfXSV7iuw= Xref: number.nntp.dca.giganews.com comp.lang.ada:187586 Date: 2014-07-14T19:41:58+00:00 List-Id: On 2014-07-14, G.B. wrote: > > It appears that in some situations style alone is not a permissible > language design guide. WRT syntax, McIver and Conway explain, with > novice programmers in mind, that there needs to be a good signal > to noise ratio and that this may mean just enough syntax, but also > enough syntax. In particular, they address "homonyms", > as in "type(expression)" vs "something-else(expression)". > > "Alternatively, it may be better to increase the complex- > ity of the syntax in order to reduce homonyms which blur > the signal. For example, the meaning of the various compo- > nents of the Turing expression^7: > > > f(C(p).A(I))(N) > > "might be better conveyed with the syntax: > > f(C::p->A_{I})[N] > To be honest, that suggestion by the authors sounds a bit bogus to me. By the time a newcomer is far enough along to understand the concepts behind that syntax, does that person really still need that special syntax ? The above is not what you would teach a student new to programming in their first week of class. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world