Skip to content

Deprecate the LSL list functions without a direct replacement#73

Open
tapple wants to merge 5 commits intosecondlife:mainfrom
tapple:deprecate-lsl-list-2
Open

Deprecate the LSL list functions without a direct replacement#73
tapple wants to merge 5 commits intosecondlife:mainfrom
tapple:deprecate-lsl-list-2

Conversation

@tapple
Copy link
Contributor

@tapple tapple commented Mar 13, 2026

I don't expect this to be merged as-is, or possibly at all. Mostly opening it to have a discussion

  • llDeleteSubList
  • llDumpList2String
  • llList2List
  • llList2ListStrided
  • llList2ListSlice
  • llListFindList
  • llListFindListNext
  • llListFindStrided
  • llListInsertList
  • llListReplaceList
  • llListSortStrided

Dialog: (AvatarID: uuid, Text: string, Buttons: {string}, Channel: number) -> (),
Die: () -> (),
DumpList2String: (Source: list, Separator: string) -> string,
DumpList2String: @[deprecated {reason="Use 'table.concat' or 'lljson.encode' instead."}](Source: list, Separator: string) -> string,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table.concat is only equivilant if the list does not contain vectors, quaternions, or uuid's

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neither booleans, table.concat()only works with stringand number.

with lljson.encode()we can't choose a separator.

I think that ll.DumpList2String() is still useful.

ParcelMediaCommandList: (CommandList: list) -> (),
ParcelMediaQuery: (QueryList: {number}) -> {any},
ParseString2List: (Text: string, Separators: {string}, Spacers: {string}) -> {string},
ParseStringKeepNulls: (Text: string, Separators: {string}, Spacers: {string}) -> {string},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced ll.ParseStringKeepNulls with string.split in my code, but it has so many more options I don't think it's an adequate deprecation

Base64ToString: (Text: string) -> string,
BreakAllLinks: () -> (),
BreakLink: (LinkNumber: number) -> (),
CSV2List: (Text: string) -> {string},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ll.CSV2List does string trimming as well; not easy to replicate. And I didn't think 'll.List2CSV` should be deprecated if it's pair isn't

@tapple tapple changed the title Deprecate list functions without a direct replacement Deprecate the LSL list functions without a direct replacement Mar 13, 2026
List2List: <T>(ListVariable: {T}, Start: number, End: number) -> {T},
List2ListSlice: <T>(ListVariable: {T}, Start: number, End: number, Stride: number, slice_index: number) -> {T},
List2ListStrided: <T>(ListVariable: {T}, Start: number, End: number, Stride: number) -> {T},
List2List: @[deprecated {use='unpack', reason='Prefer structured tables over strided lists.'}]<T>(ListVariable: {T}, Start: number, End: number) -> {T},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or use table.move(t, start, end, 1, {})

Copy link
Contributor Author

@tapple tapple Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added: 1672bce

DeleteCharacter: () -> (),
DeleteKeyValue: (Key: string) -> uuid,
DeleteSubList: <T>(Source: {T}, Start: number, End: number) -> {T},
DeleteSubList: @[deprecated {use='table.delete', reason='Prefer structured tables over strided lists.'}]<T>(Source: {T}, Start: number, End: number) -> {T},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table.remove()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed: 1672bce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants