4 ms·
Disappointing that Lua is going down the same broken road of having limited integer types. But, then again, Lua was always about a small, simple base than corr
by ctz 12y ago
Disappointing that Lua is going down the same broken road of having limited integer types. But, then again, Lua was always about a small, simple base than correctness at all costs.
- justincormack 12y agoI think you could replace the integer type with an unbounded one fairly easily. Lua is designed to have changes made and it already allows other sizes of integer and float to be used.
- SloopJon 12y agoI'd love to be proven wrong, but all Lua lets you do is typedef to another built-in type. Swapping in something like Python's long type would not be a simple matter.
- dottrap 12y agoI think you would probably want to do it as a userdata and not as a language mod. Roberto addressed the idea of a infinite number type, but it has a lot of downsides which are very un-Lua like, i.e. complicated, slow (no real hardware), and interoperability problems with the C API (which is very important to Lua). video: https://www.youtube.com/watch?v=bjqNK1jA77M https://www.youtube.com/watch?v=bjqNK1jA77M slides: http://www.inf.puc-rio.br/~roberto/talks/ws2014.pdf http://www.inf.puc-rio.br/~roberto/talks/ws2014.pdf
- justincormack 12y agoAh yes the C interface would be a problem.