comp.lang.ada
 help / color / mirror / Atom feed
From: Lionel Draghi <lionel.draghi@gmail.com>
Subject: Re: [ANN] List_Image v0.2.0
Date: Fri, 2 Feb 2018 10:34:22 -0800 (PST)
Date: 2018-02-02T10:34:22-08:00	[thread overview]
Message-ID: <191ef0a8-865e-49be-baa6-6c5c2d0b55fc@googlegroups.com> (raw)
In-Reply-To: <p509pv$nv8$1@franka.jacob-sparre.dk>

Le vendredi 2 février 2018 01:02:08 UTC+1, Randy Brukardt a écrit :
> "Lionel Draghi"... wrote in message 
> ...
> >You missed my point, I don't want to limit vendors possibilities to Windows 
> >and Unix.
> >Defining a function, and let vendors specify what is returned on each 
> >platform would
> >be an acceptable choice (and almost as easy to implement than the useless 
> >System_Name).
> 
> What would such a function return on OpenVMS, which does not use a character 
> to mark New_Line??
> 
>                           Randy.

Randy, your're asking my compiler vendor opinion, I'll give it to you! :-) 

It's implementation defined! :-)
In the current version of my compiler on OpenVMS, the function returns "", and that it. 
But in the next version, I'll be smarter : I will return CRLF : if the goal is to scan a string where you have yourself inserted the sequence, and then call Put_Line when the sequence is met, it will works better :-). 
Obviously, users should be warned that string that already contains that sequence will be akwardly cut : i'll put it bold in the doc!
 
But seriously, that's an acceptable side effect, considering that most Ada users will never face it.  

----8<---- end of my compiler vendors carreer :-)

I am aware that there is no silver bullet at this level, because we are trying to manipulate multiple lines within a single String : "fatal conceptual constraint error will be raised here!".

The only good solution would be that my Image function returns, not a String, but a list of String, with no line terminator at all, and that generic parameters that are Strings also becomes list of String.

I have to check by trying to specify such an alternate generic, but I expect it will add a lot of complexity for a problem that rarely arise.
Interresting, never te less, and it smells good my favorite fragrance : "conceptual integrity" by Ada.

And what would be the type of that list, that should be simple, efficient and unbounded, sparkable, etc. Look's like we need a "Text" abstraction here (*).
And also another Signature package... 
Seem's to be a fun challenge, I'm on it! :-)

(*) After all, we have a Text_IO package since the origin of Ada, it's time to define what is a Text! 




 




  parent reply	other threads:[~2018-02-02 18:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31  0:44 [ANN] List_Image v0.2.0 Lionel Draghi
2018-01-31  7:27 ` briot.emmanuel
2018-01-31 21:11   ` Lionel Draghi
2018-02-01  8:05     ` briot.emmanuel
2018-02-01  9:48     ` J-P. Rosen
2018-02-01 15:48       ` Lionel Draghi
2018-02-01 17:20         ` bozovic.bojan
2018-02-01 18:31           ` Lionel Draghi
2018-02-01 18:45             ` bozovic.bojan
2018-02-01 20:26               ` Dennis Lee Bieber
2018-02-02  5:25                 ` J-P. Rosen
2018-02-02  0:02             ` Randy Brukardt
2018-02-02  0:31               ` Simon Clubley
2018-02-02 18:34               ` Lionel Draghi [this message]
2018-02-02 22:40                 ` Randy Brukardt
2018-02-11 23:27                   ` Lionel Draghi
2018-02-12  6:55                     ` J-P. Rosen
2018-02-12 20:44                       ` Lionel Draghi
2018-02-12 10:57                     ` Stefan.Lucks
2018-02-12 21:41                       ` Lionel Draghi
2018-03-07 10:17                     ` Semantic versioning (Was: [ANN] List_Image v0.2.0) Jacob Sparre Andersen
2018-02-01 20:11         ` [ANN] List_Image v0.2.0 J-P. Rosen
2018-02-01 21:08           ` Simon Wright
2018-02-01  0:27   ` Randy Brukardt
2018-02-01  7:55     ` briot.emmanuel
2018-02-01 23:56       ` Randy Brukardt
2018-02-02 15:48         ` Simon Wright
2018-02-02 22:54           ` Randy Brukardt
2018-02-01  8:08     ` Simon Wright
2018-02-01  8:24       ` 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