Skip to content

Inconsistent representation? #13

Description

@trans

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions