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

Change (u)int64 to string #214

Open
Rochet2 opened this issue Oct 18, 2016 · 0 comments
Open

Change (u)int64 to string #214

Rochet2 opened this issue Oct 18, 2016 · 0 comments
Labels

Comments

@Rochet2
Copy link
Member

Rochet2 commented Oct 18, 2016

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.

@Rochet2 Rochet2 added the todo label Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant