Skip to content

Minor Changes, most notably singleton types#149

Closed
bobbybob2131 wants to merge 7 commits into
dphfox:mainfrom
bobbybob2131:main
Closed

Minor Changes, most notably singleton types#149
bobbybob2131 wants to merge 7 commits into
dphfox:mainfrom
bobbybob2131:main

Conversation

@bobbybob2131

@bobbybob2131 bobbybob2131 commented Apr 4, 2022

Copy link
Copy Markdown

Singleton types were recently added (see https://devforum.roblox.com/t/luau-recap-march-2022/1738645 and https://github.com/Roblox/luau/blob/master/rfcs/syntax-singleton-types.md), this PR just updates Fusion to utilise them. All edits are based on existing comments. I also removed a completed (I think?) todo note.

Edit: Sorry for the close/reopen, I thought I needed to make a new PR to add the second commit but Github does it automatically.
Edit: Remove table.pack note

@bobbybob2131 bobbybob2131 reopened this Apr 6, 2022
{x} is ~1.5x faster than table.pack, which is a micro-optimisation but it is better to use as a standard across a whole library.
@bobbybob2131 bobbybob2131 changed the title Use singleton types in PubTypes.lua Minor Changes, most notably singleton types Apr 6, 2022
Comment thread src/Instances/onDestroy.lua Outdated
Comment thread src/Dependencies/captureDependencies.lua Outdated
@dphfox

dphfox commented Apr 22, 2022

Copy link
Copy Markdown
Owner

We use table.pack because it gives us a n field, which can later be used with table.unpack to ensure we don't miss out values returned after nils.

@dphfox dphfox added enhancement New feature or request ready to work on Enhancements/changes ready to be made area: internal labels Feb 1, 2023
@dphfox dphfox mentioned this pull request Feb 4, 2023
@dphfox

dphfox commented Feb 4, 2023

Copy link
Copy Markdown
Owner

Closing in favour of a newer PR #215

@dphfox dphfox closed this Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ready to work on Enhancements/changes ready to be made

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants