List Variable Is Empty Suggestion #6608
Labels
enhancement
Feature request, an issue about something that could be improved, or a PR improving something.
priority: lowest
"Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Suggestion
List variables are abit weird, you can't create an empty list since "empty" lists are just non existing lists. You check if a list is empty by using
if {_list::*} is set
, I feel like it should beif {_list::*} is empty
which wouldn't error but it will always fail or succeed, I can't rememberList variables also can be a list or a map (key-value pair), something like this
add "Hello" to {_list::*} <-- list
andset {_list::hello} <-- map
This creates alot of confusion since {_list::hello} and {_list::*} are both one but one value is a list and the other is a map
There should be a way to identify lists from maps or at least separate both
This one isn't really needed but it'd be nice to have which is streams to filter (this one exists), map (edit a list without loops), etc
There should be a proper way to insert in a list, maybe something like this
insert %objects% in[to] %objects% at %integer%
All of that isn't really needed but it'd be nice to have. And maybe make it so you can old list mechanics through the config to not break code
Why?
This would make lists not confusing to new skripters
Other
No response
Agreement
The text was updated successfully, but these errors were encountered: