Bug in string.erl

Thomas Arts thomas.arts@REDACTED
Wed Nov 5 08:46:54 CET 2003

Hi Joe

>  But is was an atom ... did I get an exit - No for
>  > string:substr(aa, 1, 20).
>  []
>  Wow (Static type systems 1, Joe 0)

>  IMHO all the functions in string should exit when the "string" argument
> is not a list - I'm not asking that you "deep check" the list but a little
> help might be nice

Well... IMHO you are responsible to give the right arguments to well
typed functions, like the substr one.
The whole idea with type systems is that they guarantee that the
function works well IF you provide the right types. Therefore, you
do not have to check the type and that is far more efficient at


Dr Thomas Arts
     Program Manager
     Software Engineering and Management
IT-university in Gothenburg
Box 8718, 402 75 Gothenburg, Sweden

Tel +46 31 772 6031
Fax +46 31 772 4899

More information about the erlang-questions mailing list