<br><br><div class="gmail_quote">On Thu, Feb 2, 2012 at 3:49 PM, Juan Jose Garcia-Ripoll <span dir="ltr"><<a href="mailto:juanjose.garciaripoll@googlemail.com">juanjose.garciaripoll@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><div class="gmail_quote">On Fri, Feb 3, 2012 at 12:37 AM, Raymond Toy <span dir="ltr"><<a href="mailto:toy.raymond@gmail.com" target="_blank">toy.raymond@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

(I was surprised to see ecl choose the smallest string type to fit a literal string.)<br></blockquote></div><br></div>Why? I mean, an ordinary unicode string without utf-8 packing takes 4 times the room of a base string. Since ECL is using a string buffer to read objects, then why shouldn't it pack them to the smallest representation when possible?<br>
</blockquote><div><br>I was surprised for several reasons:<br><br>1. You have to check after reading the string to see what it contains.  (I guess a very small compile-time cost.)<br><br>2. Because I didn't think any lisp did that, but it's not illegal to do so.<br>
<br>3. It's a burden on the user if the type of a constant string depends on what's in it.  Being illiterate, I only know ASCII, so, perhaps this isn't a problem in practice.<br><br>(Getting crufty old f2cl code to convert declarations like (simple-array character (*)) to just string is a pain, but that's my problem, not yours.)<br>
<br>Ray<br><br></div></div>