Honestly though, I think the repeat function is good enough. Someone said that there should be a cap of String.repeat at 255, but I don't think that is a good idea, or else:
"*".repeat(256); will not work. I think it should only throw a range error if it's not NaN or a positive 32-bit integer. And then it should throw an implementation-defined internal memory error when the string is too long. On Sun, Jan 9, 2011 at 5:47 AM, Jeff Walden <[email protected]> wrote: > On 01/09/2011 06:02 AM, Jorge wrote: >> >> Or perhaps to overload * ? >> >> 'a' * 5 >> -> "aaaaa" >> >> ? > > Probably a bridge too far. Operator overloading this way results in all > those weird implicit conversion behaviors we all know and love (not), true. > But at this point there's the matter of compatibility: > > '3' * 5 > -> better produce 15 Unless we introduce the pragma: use python; =) _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

