Re: length() of an atom

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

What if you had length() return -1 if it was given an atom?

I guess doing abs(length(x)) would be a compromise, but it'd be a pain to have to include std/math.e for what should be a builtin operation...

If you really needed old code to crash, you could always do this:

function length(object x) 
	if not sequence(x) then 
		crash("TODO: add eu-lint") 
	end if 
	return eu:length(x) 
end function 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu