Thanks andy! On Monday, October 26, 2015 at 1:25:42 AM UTC-5, Andy Fingerhut wrote: > > While waiting to see what becomes of that ticket, if someone felt > energetic enough to document the gotchas with the unchecked functions, and > recommend how to get the desired results, e.g. either ^long type hints, or > if (long x) type conversions on the arguments work (I haven't checked), > Reid McKenzie's Grimoire updates can be made via pull request here: > > https://github.com/clojure-grimoire/datastore > > Or wiki edits can be made to ClojureDocs.org here: > > http://clojuredocs.org/clojure.core/unchecked-multiply > http://clojuredocs.org/clojure.core/unchecked-add > http://clojuredocs.org/clojure.core/unchecked-subtract > > Describing the odd behavior in only one of those entries, and then > cross-referencing it explicitly in the examples of the others to the > 'detailed one', can save redundancy in writing. > > Andy > > > On Sun, Oct 25, 2015 at 11:17 PM, Andy Fingerhut <andy.fi...@gmail.com > <javascript:>> wrote: > >> I created this ticket: http://dev.clojure.org/jira/browse/CLJ-1832 >> >> I don't know what will become of it, e.g. perhaps a change in behavior to >> the unchecked functions, perhaps a clarification to the documentation, >> perhaps nothing. I wouldn't be surprised if the Clojure core team judged >> the existing documentation strings to be explicit enough because they use >> little-L 'long', and it doesn't promise any behavior of any kind for >> arguments that are not 'long'. >> >> Feel free to add comments or edit the description if I've left anything >> out, vote on it, etc. >> >> Andy >> >> On Sun, Oct 25, 2015 at 5:50 PM, Gary Fredericks <frederi...@gmail.com >> <javascript:>> wrote: >> >>> Half of the time that I use the unchecked functions it's for the math, >>> not the speed, so getting the wrong behavior when I don't care enough about >>> perf to do the work for primitives is pretty annoying. >>> >>> >>> On Sunday, October 25, 2015 at 7:49:47 PM UTC-5, Gary Fredericks wrote: >>>> >>>> Maybe even not warn unless that one var where you can get >>>> boxed-math-warnings is set appropriately. >>>> >>>> On Sunday, October 25, 2015 at 2:04:36 PM UTC-5, Fluid Dynamics wrote: >>>>> >>>>> On Saturday, October 24, 2015 at 8:01:05 PM UTC-4, Gary Fredericks >>>>> wrote: >>>>>> >>>>>> I've always thought this is bad behavior, since it's blatantly doing >>>>>> the opposite of what the name advertises. I think either the boxed >>>>>> versions >>>>>> should return the same result as the unboxed version, or (if the whole >>>>>> point is to give good performance and so we don't want want users to be >>>>>> able to accidentally use the unboxed versions) it should throw at >>>>>> compile-time for boxed args. >>>>>> >>>>> >>>>> Or it could emit just a warning at compile-time, and give the same >>>>> result at run-time as the unboxed version. Then you don't have to stop >>>>> everything else you're doing and fix the boxed math first, when you might >>>>> have higher priorities. The warnings will remind you to fix it >>>>> eventually. >>>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to clo...@googlegroups.com >>> <javascript:> >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> clojure+u...@googlegroups.com <javascript:> >>> 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+u...@googlegroups.com <javascript:>. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >
-- 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/d/optout.