This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Configuring the repl to display strings with quotes


Ethan Herdrick wrote:
Hi folks -

Is there a way to make the repl show strings with quotes around them?
In other words, instead of this:
(abc def gef)

I want this:
("abc" "def" "gef")

$ kawa --output-format readable-scheme #|kawa:1|# '("abc" "def" "gef") ("abc" "def" "gef")

Of course that list could have been this instead:
("abc" "defgef")
>>
or one of several other things, which is why I don't like the default behavior.

A rationale for the default: A functional language shouldn't need explicit display/write calls. Instead, a program should be an expression that returns a result. In the Unix tradition, a program by default prints its output on standard output. But if a function returns a formatted string, you don't want extra quotes printed.

But I agree in exploratory read-eval-print context having the quotes
might be useful.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]