Re: length() of an atom

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...

I want to make coding simpler for people so returning 1 is much more user-friendly than -1.

Also, what is the unit-of-measure returned by length()? I'm suggesting it is 'elements'.

{x,y} has 2 elements involved 
{x}   has 1 element involved 
{}    has zero elements involved 
x     has 1 element involved 

Elements only exist in the context of a sequence. No sequence, no elements. That last 'x' is not an element.

Regardless, I don't think this change will hurt much, if at all. So have at it. :)

But I'm curious, how does returning 1 for length(atom) make coding simpler and more user-friendly? What case did you discover works better with length(atom) returning 1?

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

Search



Quick Links

User menu

Not signed in.

Misc Menu