Cool. Thanks for the explanation. On Tuesday, February 19, 2013 12:47:05 PM UTC-5, Marko Topolnik wrote: > > Naturally, it's Object#equals. String's override of equals gets involved > without the checked downcast. > > On Tuesday, February 19, 2013 6:38:07 PM UTC+1, Geo wrote: >> >> What about the call to .equals? >> >> On Tuesday, February 19, 2013 12:20:28 PM UTC-5, Marko Topolnik wrote: >>> >>> The difference between String[] and Object[] is that a member of the >>> former doesn't need a checked cast to String, but the latter does need one. >>> In the code under consideration, however, nothing specific to String is >>> used, so even in the Java code you can freely replace String[] with >>> Object[] and everything still works. >>> >>> If, on the other hand, you needed to invoke say *substring*, you'd see >>> a small penalty due to the checked cast operation. >>> >>> >>>
-- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.