radix icon indicating copy to clipboard operation
radix copied to clipboard

Inconsistent representation?

Open trans opened this issue 10 years ago • 0 comments

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.

trans avatar Mar 02 '15 14:03 trans