Arc Forumnew | comments | leaders | submitlogin
2 points by rocketnia 3877 days ago | link | parent

Well, this behavior at least guarantees that any string readline returns will be at least one character long. You can [coerce _ 'cons] the result without worrying that you'll confuse the EOF nil with an empty line.

Maybe readline was designed under the idea that Arc strings would be indistinguishable from lists of characters?

1 point by aw 3877 days ago | link

Check for nil before coercing to cons.


1 point by rocketnia 3876 days ago | link

With the fix, I have to do that. Without the fix, I can keep my code brief. For what it's worth, I like the fix better, but then I don't expect to write (aif (coerce (readline) 'cons) ...) much either.