Re: string_lower producing atoms

Peter Berry <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CAL1by8SDhynFMirTqz+-Pe5VHE8kEoVdQ45isiEEHtMKtiWqeQ@mail.gmail.com>
On 11 March 2014 13:53, Michael Hendricks <[email protected]> wrote:

>
> It looks like string_lower/2 is using a slightly more general definition
> of "string" which includes both string objects and atoms.  For example, you
> can also provide an atom as the first argument.
>
> Since we already have downcase_atom/2, I can't think of any reason why
> we'd want string_lower/2 to behave this way.
>

But it doesn't accept a list of codes, which could also be considered a
string.

If we did want a predicate "make this lowercase no matter what kind of
string it is", the correct behaviour would surely be to produce the same
kind of string as output.

-- 
Peter Berry <[email protected]>
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.