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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: is it possible to add multi-line raw strings (HERE-DOCUMENT) support to Ada? Date: Fri, 10 Jul 2015 12:00:52 -0500 Organization: Aioe.org NNTP Server Message-ID: Reply-To: nma@12000.org NNTP-Posting-Host: 8NUpq80EOZpQMEPcD5V8pw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:26744 Date: 2015-07-10T12:00:52-05:00 List-Id: 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. From the Ada entry: "Ada has neither heredocs nor multiline strings. A workaround is to use containers of strings: " C++-11 also added support for multi-line raw strings. Few examples in Ruby, Perl, Python and C++11 showing how this feature is used are http://12000.org/my_notes/here_document/index.htm It is these kinds of practical features that make computer Languages useful. How hard would it be to add support for this in Ada? Either at language level, or as a package? --Nasser