4 ms·
Ah, so 'codes' is the setting for that flag that erlang's behaviour matches. Which in an old-school prolog makes complete sense, but if you can encode the 'char
by mst 4y ago
Ah, so 'codes' is the setting for that flag that erlang's behaviour matches. Which in an old-school prolog makes complete sense, but if you can encode the 'chars' variant efficiently then that works out fine.
For those not that prolog literate (like me): https://stackoverflow.com/questions/8264699/what-is-the-difference-between-and-in-prolog/8269897#8269897 https://stackoverflow.com/questions/8264699/what-is-the-diff... seems to help.
- triska 4y agoYes, that's correct! Interestingly, Erlang does encode lists of codes efficiently internally! The advantage of chars is that in this way, we obtain much more readable answers to queries! The very first Prolog system, Prolog 0, already used lists of characters for strings. Later systems tended to interpret them as lists of codes, and we now see several new Prolog systems that (again) interpret them as characters.