1.) Don’t know what you mean by “Deep Data”.
Nested tables and dictionaries, mainly. Deep data is a data structure that is more than one “layer” deep (mainly nested tables/dictionaries in Lua); in other words, tables that can’t be fully copied with table.copy()
.
local deepTable = {
["Hello"] = {
["World"] = "This is a",
["ROBLOX"] = "deep table!",
["1000"] = "It is a dictionary nested within a dictionary."
}
}
Such data structures are fairly challenging (but not impossible) to replicate using ValueObjects
and can lead to poor design choices that promote lag and instability.
2.) Many games—if not the majority on roblox—don’t need astronomically high numbers stored for players, with the exception of simulators, but even then, many simulators use regular leaderstats, and I’ve personally never seen any glitches or errors with it.
This is true. Again, like any other data structure that involves communicating across the client and the server, good development practices make leaderstats
safe. For the games that demand larger values, ValueObjects
simply won’t cut it in terms of data storage.
3.) Using values is not “poor data storage”, values were literally designed so that, if convenient, developers wouldn’t need to use dictionaries. On top of that, they’re instances , meaning they have built-in connections and metamethods, such as :GetPropertyChangedSignal() and can be accessed easily from any place in the game. You cannot access dictionaries across scripts, unless you use BindableEvents and/or ModuleScripts. Even if you do use events/modules, it’s still overly-complicated compared to just using instances that are visible in the explorer.
I disgaree. ValueObjects
do have some useful events but a BindableEvent
can serve that purpose just as easily if you really need to check every time something changes. Dictionaries (imo) are much more convienent and readable; I’d rather look at a dictionary that a messy stack of abstactly-named folders and ValueObjects
.
Not to mention relying on listening to a bunch of Events is going to make your script prone to memory leaks if not handled properly. Again, competent developers will account for this, but novices more than often won’t.
You cannot access dictionaries across scripts, unless you use BindableEvents and/or ModuleScripts.
I don’t see why this is an issue in the first place? You pretty much listed the only ways to read dictionaries across scripts, and you can send dictionaries through RemoteEvents
and RemoteFunctions
as arguments as well (there are limitations, see here). Any comptent developer using dictionaries for data handling will account for this, and the modularity will make it easier to handle in the future instead of having to juggle a whole lot of values.
I think this is a good thread that discusses this issue in a bit more detail. Give it a read!