comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP>
Subject: Re: is it possible to add multi-line raw strings (HERE-DOCUMENT) support to Ada?
Date: Fri, 10 Jul 2015 17:26:40 +0000 (UTC)
Date: 2015-07-10T17:26:40+00:00	[thread overview]
Message-ID: <mnov8f$ssc$1@dont-email.me> (raw)
In-Reply-To: mnoto0$4u5$1@speranza.aioe.org

On 2015-07-10, Nasser M. Abbasi <nma@12000.org> wrote:
> It is very useful to be able to have multi-line raw
> strings in the code, written as is, over many lines,
> as one raw string.
>
> Ada currently does not support this feature. This is called
> multi-line raw strings, and also called HERE-DOCUEMNT
>
> https://en.wikipedia.org/wiki/Here_document
>
> The rosseta entry is http://rosettacode.org/wiki/Here_document
>
> One can see the Ada entry there is not a true multi-line
> raw string as one needs to add &"" at each line. Compare
> that to the Python or Perl.
>

[snip]

I would strongly oppose this for Ada (given Ada's safety critical
design goals).

Ada syntax was choosen to try and reduce the chances that silly
mistakes made while typing in code would produce a program which
compiled but was wrong due to a silly typing error. (For example,
"==" versus "=" in C).

In your proposal, if the terminating sequence was slightly mistyped
then the following program code would be consumed as data until a
valid heredoc terminator was found.

This is also why there is no multiline comment construct in Ada
IIRC but only "--".

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world

  parent reply	other threads:[~2015-07-10 17:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 17:00 is it possible to add multi-line raw strings (HERE-DOCUMENT) support to Ada? Nasser M. Abbasi
2015-07-10 17:18 ` David Botton
2015-07-10 17:26 ` Simon Clubley [this message]
2015-07-10 17:41   ` David Botton
2015-07-10 21:04 ` Dmitry A. Kazakov
replies disabled

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