ClojureScript allows fns to be called with too many arguments
ClojureScript doesn't complain when you supply too many arguments to a function, silently dropping the superfluous args. Is this a bug or feature? I'm not sure if I should replicate this behaviour in clojure-scheme, as it differs from Clojure. P.S. is there a separate group for ClojureScript bug discussions? -- 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
Re: ClojureScript allows fns to be called with too many arguments
On Wed, Apr 4, 2012 at 10:39 AM, Nathan Sorenson n...@sfu.ca wrote: ClojureScript doesn't complain when you supply too many arguments to a function, silently dropping the superfluous args. Is this a bug or feature? IIRC it's a bug of the Javascript language itself. I wouldn't expect it to be carried over to runtimes that can perform arity checks without incurring performance overhead. -Phil -- 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
Re: ClojureScript allows fns to be called with too many arguments
I would probably say that in questions like this, it's best to do it the way Clojure on the JVM does it. ClojureScript is still pretty immature, so using it as a reference standard is going to be troublesome. This is the approach clojure-py is taking. Consider Clojure-jvm to be the reference spec, everything else that doesn't make sense is a bug. Timothy -- 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
Re: ClojureScript allows fns to be called with too many arguments
It could emit a warning but it will probably not be a hard error. clojure-dev is good for these discussions. David On Wednesday, April 4, 2012, Nathan Sorenson wrote: ClojureScript doesn't complain when you supply too many arguments to a function, silently dropping the superfluous args. Is this a bug or feature? I'm not sure if I should replicate this behaviour in clojure-scheme, as it differs from Clojure. P.S. is there a separate group for ClojureScript bug discussions? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.comjavascript:_e({}, 'cvml', '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 javascript:_e({}, 'cvml', 'clojure%2bunsubscr...@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 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