Accessors.jl icon indicating copy to clipboard operation
Accessors.jl copied to clipboard

insert at named location (PropertyLens)

Open tpapp opened this issue 2 months ago • 1 comments

I am wondering if inserting an element c = 3 into (a = 1, b = 2), so that the result is (a = 1, c =3, b = 2), is possible with this package.

@insert x.c = ... will always insert last.

tpapp avatar Oct 08 '25 09:10 tpapp

This functionality definitely isn't currently available in Accessors. What would be your ideal API? And I'm personally curious what's your usecase :) Typically, one either has a number-indexed collection like tuple/vector, or name-indexed like namedtuple/dict. When both aspects are important?

aplavin avatar Oct 09 '25 03:10 aplavin