From: Aleksei Guzev Date: 2002-11-19T13:48:34+09:00 Subject: Re: ruby-dev summary 18711-18810 "Yukihiro Matsumoto" wrote in message news:1037661991.163626.9880.nullmailer@picachu.netlab.jp... > Hi, > > In message "Re: ruby-dev summary 18711-18810" > on 02/11/18, "Aleksei Guzev" writes: > > |> |If the longest sequence would be chosen, what value should receive the > |> |absent items? > |> > |> nil > | > |But this will raise TypeError in the case of incompatible type/length of the > |sequences. This would hide the error and violate "...* (on zip) We should > |not raise exceptions when the length of the components are differ..." > > I'm not sure if I get what you mean. How does it hide errors and > violate the assumption? nil does not always raise TypeError, if you > know the value may be nil. If "zip" itself raises exceptions, there's > no workaround. > > matz. > Hiding error means one would receive diagnostic message of TypeError while the error is not of that type. It's an index error. This will make locating bugs harder. Violation means that one calling "zip" will get an exception regardless of what method has raised it. It doesn't matter who raised an exception. Matters its nature and its origin in the user code(!), not library one.