#What're the differences between a userdata returned by newproxy() and a table?
1 messages · Page 1 of 1 (latest)
There almost the same the main difference is there type
If you do
type()
One will return userdata
The other will return table
This has some knock on effects
For instance
If you do
table.insert(userdata) this will not work
But if you do
table.insert(table) this will work fine
Also by default if you did
userdata.key = value this will give an error where with a table it will not give a error
Thanks for the reply, I was wondering since I see them used all over the place in ModuleScripts, (e.g, your data store module)
So to make dot access work would I use a metatable with __index and __newindex?
Yes
Nicu
Quick question @native bobcat, in your DataStoreModule, does __shared actually do anything or is it just a stylistic decision to try and make it more clear that anything in __shared is passed by reference?