String is an object, right?  But a non-null String (i.e. length==0) can
evaluate as false... so it sounds like a contradiction.

Is there no way to make a custom class act like a String in the case of
length==0?

Feel free to tell me you think this is a bad idea and breaks convention too
much.

Marcelo


> ECMA is pretty clear that ToBoolean on an object is true. Why would
> you want to change this?
>
> --N
> _______________________________________________
> dev-tech-js-engine-rhino mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
>
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to