New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relax MAX_NUMBER restriction #56
Comments
I've also proposed this in another issue some time ago and if I remember correctly they planed a v2 which will include some breaking changes like this, but I implemented my own library including this feature. I've found no reason to limit a Java implementation only because the reference algorithm implementation is limited by the chosen language. |
The initial proposal was to be interoperable. See #55 |
Might be interesting that there is a new TC39 proposal that introduces |
@arcticicestudio I think we should follow hashids main project spec, to keep exact result in different languages. |
I was thinking about this issue, and I believe that the best path is to allow bigger numbers when the user explicitly allow incompatibility with the original spec. This way we can have a version that follows the original implementation and also allows users to loosen up the spec a bit. Something like "strict mode", which is compatible with the original spec, and a "relaxed mode" which is more javaish. |
Yep, and I’d suggest a PR or Fork for this.
On Thu, May 3, 2018 at 18:05 Tercio Gaudencio Filho < ***@***.***> wrote:
I was thinking about this issue, and I believe that the best path is to
allow bigger numbers when the user explicitly allow incompatibility with
the original spec. This way we can have a version that follows the original
implementation and also allows users to loosen up the spec a bit. Something
like *"strict mode"*, which is compatible with the original spec, and a *"relaxed
mode"* which is more *javaish*.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEAQ56RLW0_4Chyoq1pE12QGdB3HcYDks5tutZSgaJpZM4TltqP>
.
--
Sent from Gmail Mobile
|
I understand the desire to be completely compatible with the Javascript implementation/limitiations, as explained in #47 and in the docs, but is it possible to provide a toggle that disables this functionality?
This would ensure backward compatibility with Javascript's limitations, but would allow this library to make use of the full potential that the Java platform provides.
Other implementations (such as Scala and .Net) don't impose these restrictions and allow the library to be used with the native implementation of the number.
The text was updated successfully, but these errors were encountered: