Re: Couple of questions about sequences

new topic     » goto parent     » topic index » view thread      » older message » newer message

For item 1, I would say that it's the programmer's responsibility to ensure that he passes a string sequence where a string sequence is expected.

If you really want to record type metadata, you could create a custom type where the first element is a type indicator (constant or enum) and a utility function to iterate over a sequence to verify whether or not it is a string.

You would then have to wrap your function calls to send just the string portion after verifying that it is the correct type.

In my experience, the main error in a sequence not being a string isn't that it contains atom or integer data instead of characters, but rather that it consists of subsequences instead of characters. The interpreter will often catch that as a runtime error.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu