- Hides deprecated api,
unpack,vunpack, andlunpack, inunpack/deprecating. If you still wants to use them for some reason, pleaseimport unpack/deprecatinginstead.
- Supports nested unpacking.
- Implements hack to enable rest unpacking after
var. i.e.[var _ as *a, b] <- someSeq
- Renames rename syntax. From the originally confusing
{name: anotherName} <- timandunpackObject(name = anotherName)to clear and descriptiveasfor both. (i.e.{name as anotherName} <- timandunpackObject(name as anotherName).)
- Adds
*rest operator support for unpacking sequence-like stuff.
-
Deprecating
unpack,lunpack, andvunpackin favor ofunpackObject,unpackSeq,aUnpackObject, andaUnpackSeq. The new interface is more similar to the<-syntax, and the programmers will have more control over how the data source will be unpacked. -
Adds example and tests to demonstrate how to flexibly unpack named tuples (like a boss).
-
Sequence unpacking will skip the
_entirely now.
-
Inspired by @Yardanico's unpackarray.nim
-
Initially only has
unpack,lunpack, andvunpackmacros. These allows unpacking after chaining but has some limitation. Hated by most (N=2). -
Later added
<--and<-syntax as suggested by @alehander42.