Skip to content
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

Inconsistent representation? #13

Open
trans opened this issue Mar 2, 2015 · 0 comments
Open

Inconsistent representation? #13

trans opened this issue Mar 2, 2015 · 0 comments

Comments

@trans
Copy link
Member

trans commented Mar 2, 2015

I'm wondering if the fact that:

  10.b(16) != "10".b(16)

represents an inconsistency in the design of Radix? FYI,

  10.b(16).to_i    => 10
  "10".b(16).to_i  => 16

The reason is at least understandable. 10 is already a base-10 representation, where as "10", being a string, has no implicit base.

I suppose there may be no other way to handle it, but it does seem like a source of confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant