Is it possible to make names accessible within a block, like this?
obj = (;x=1, y=2)
with obj do
x + y
end
# x and y are not accessible here
Is it possible to make names accessible within a block, like this?
obj = (;x=1, y=2)
with obj do
x + y
end
# x and y are not accessible here
With a macro:
julia> using StaticModules
julia> obj = (;x=1, y=2);
julia> @with obj begin
@show x + y
end;
x + y = 3