-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add a discrepancies page to the documentation #129
Comments
I'd love to get this written up and documented. What are the specific discrepancies that need to be documented? |
I'm not familiar with all the discrepancies; you'd have to ask @osyrisrblx.
|
Planned documentation:
|
Maybe something about circular requires? (Node)JS handles them by filling in the export objects dynamically, but Roblox Luau requires that imports are returned all at once. Also one for the list: Array and string lengths with |
This one's niche, but maybe iteration order? JS defines it as property definition order, but Luau has random order with |
If there's a difference it should be documented, it's seemingly a coin flip whether roblox-ts goes with the Lua behaviour or ECMAScript behaviour so I didn't comment on that. |
Roblox-ts doesn't support for-in loops, so any object iteration goes through |
There are a few behavioural discrepancies that need to be clarified due to the differences between how ECMAScript and Lua define their respective behaviours. These discrepancies could cause developers to encounter difficult-to-diagnose bugs in their code. Adding a page that lists differences in behaviour between roblox-ts and ECMAScript and roblox-ts and Lua would alleviate this issue by making any "quirks" known. Methods to get "expected" behaviour, if any, could be mentioned in addition to listing the differences, improving the developer experience.
Edit: Lua is used as shorthand for Lua 5.1 and, by extension, Luau, as Luau keeps near-perfect compatibility with the former.
The text was updated successfully, but these errors were encountered: