On Tue, 20 Sep 2016, Allin Cottrell wrote:
At present we have three commands in this neighbourhood: print,
printf and eval. Some might say that's already too many (though actually I
wouldn't agree, for reasons I've tried to explain up-thread). However, surely
it ought to be enough! And in particular, I really don't want to introduce
into hansl a "competitor" to printf -- because, as I've already said, I
think
that printf is the better design for complex mixtures of text and numerics
(though of course everyone doesn't have to agree with me on that).
That said, I can see a case for making it easier to output very simple stuff
such as a string followed by a scalar on the same line.
In git there's an experiment to this effect; here's an example:
<hansl>
set echo off
set messages off
answer = 42
print "The number of roads a man must walk down is " -n
eval answer
</hansl>
The option -n (long form "--no-break") tells "print" not to add a
line-break;
therefore the "eval" output follows directly:
<output>
The number of roads a man must walk down is 42
</output>
I don't know if anyone will consider this worthwhile.
I, for one, do not. And by the way, someone may see it as a whimsical and
geekish Unix-ism :) (compare the -n option to the "echo" shell command).
After having heard several opinions (thanks to everybody who joined the
debate) I suggest to leave everything as is now. The recent improvements
in the documentation should also help.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------