Skip to content

Change (u)int64 to string #214

@Rochet2

Description

@Rochet2

int64 and uint64 support:
There has been some talk about this.
Originally strings were used instead of numbers, then lua 5.3 with int64 support was tested and then double was tested and then lua objects were tested.
The most flexible implementation is using normal strings.

  • Lua objects are a mess with overloading and other that just doesnt work as you want it to.
  • double and int64 had to cast uint64 numbers into int64 and it only supported lua 5.3. Also it was possible that data was lost when coding uint64 to double. Additionally when printed they would show incorrect values
  • Strings show correct when printed, they can be concatenated, etc.
    String vs object: string is simple and can be passed through web and message systems etc with no changes. It also is one of the base types ([string, number, boolean, nil]) that this spec suggests as possible to be used everywhere.

From personal specification document.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions