Why no is_string()?

Vance Shipley vances@REDACTED
Wed Aug 27 15:19:59 CEST 2003


There is no guard test is_string().  Now I realize that strings
are not a unique data type in Erlang however they are respresented
as such in many ways.  In the external term format there is a
unique tag for strings.  In the documentation we have things with
type "string()". 

I'd like to have a is_string() guard which would tell the difference
between [foo, <<1,2,3>>, [a,b,c]] and "bar".

Would this require a time consuming test of each element of the list
or is the internal tagging already there?

	-Vance






More information about the erlang-questions mailing list