Don’t worry, voice chat will have a lot of programmability in the long run, when there’s a stable public API available for the more complex parts of Voice Chat there will be announcement posts + full DevHub documentation for it as usual. There’s just been some unfortunate confusion thanks to some still unstable experimental voice chat APIs being temporarily publicly accessible when they shouldn’t have been, sorry about that.
If you’re ever in doubt about an API: Look it up on the DevHub, if there’s no documentation for it it’s probably not officially released yet and you should avoid using it unless you’ve seen an explicit mention from a Staff member that it is ready to be used.
Frozen tables are useful for maintaining your invariants. For example, you if you use a frozen table, and write this:
function myObject:getListOfThings()
return self._myListOfThings
end
You have a hard guarantee that whoever called the function didn’t accidentally modify the list of things you returned messing up the internal state of your object. Currently the only way to guarantee that is to make a new copy of the table when you return it, which may be prohibitively expensive.
Do you have any details on how table.freeze is implemented? Does it return a new table that has a metatable whose __index metamethod points to the original table and __newindex that throws an error?
I’m actually quite interested in this for this reason, and for the reason that, as mentioned in the RFC linked by zeuxcg, there’s no “thawing.”
However, I’m a little disappointed that I can’t freeze a table with a locked metatable, this interferes with a lot of my potential use cases for a feature like this with rawset and rawget in mind, because it means I can’t have ““sensitive”” metatable content hidden behind a __metatable metamethod and still be able to lock the table.
The reason that there’s no thawing according to the RFC is that Roblox uses it internally for sandboxing. This is, in fact, excellent for exactly that, sandboxing. It’ll work excellently within code sandboxes like my own.
So, I’m excited for this for a different reason than it was intended for, but, still excited
You can lock the metatable after freezing the table, if you want. Of course this may be awkward if you want to keep producing frozen objects with the same metatable…
FWIW the reason why we [right now] disallow freezing on tables with locked metatables is precaution: if we don’t do that, this means that existing code that uses protected metatables may have the consumer of that code freeze the table, which could confuse the code in question. If you aren’t protecting your metatable this must mean you’re already open to anyone changing your table arbitrarily.
This is something we could relax in the future, but it’s a safer default.
I guess it also occurs to me that in the future we could add an optional metatable argument to table.freeze so that it acts as a freeze + setmetatable atomically. I’d like to see real dev feedback for freezing before committing to that though, but it’s a possibility.
I don’t think that so, the clouds are part of the decoration and they’re planning to improve the terrain decoration, but adding an expandable menu with the Decoration name would be useless for now because there are only grass & clouds to decorate the world
There’s a problem with the Size of particles, now the NumberSequence goes from 0 to 1 while before it went from 0 to 10 and now its almost impossible test some particles that goes outward.