I'd like to remove both - does anyone care?
Rich
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure Dev" group.
> To post to this group, send email to cloju...@googlegroups.com.
> To unsubscribe from this group, send email to clojure-dev...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/clojure-dev?hl=en
> .
>
> It wouldn't negatively impact any of the bit-twiddling code I have.
>
> How should this fit with "contagious bigints" policy? E.g., should
> (bit-shift-left 1N 1) return 2N or 2?
>
> Should all bit ops be limited to a 64-bit long?
>
Shift ops would be limited to primitives only. Default versions 64-
bit, but explicit shift-int versions for 32 bits.
Rich
> Regarding the negative shift support, removing it might have less
> desirable behaviour. Since only the bottom 5-bits of the shift
> distance are used, negative numbers behave oddly, e.g., 1 << -2 is
> processed as 1 << 30. Leaving it in, or erroring on negatives might
> be preferable.
>
The goal is to get rid of the conditional. People that are using
shifts as nature intended are doing so for the utmost performance, and
any conditional test kills it. I'm fine with following:
http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.19
People looking for mathematical purity should avoid bit ops, they are
mechanical.
> Also, do you want primitives-only for all bit operations, e.g., bit-
> and, test-bit.
>
I'd like primitive-only to be the default, but BigInteger has and/or
etc and there's no reason to hide them. Perhaps we need prime versions
for that?
Rich