ACEsuit / WithAlloc.jl

A simple Bumper convenience extension
MIT License
1 stars 0 forks source link

Readability when dropping arguments #4

Open cortner opened 4 months ago

cortner commented 4 months ago

WithAlloc leads to code that looks like this:

A, B = @withalloc myfunction!(x1, x2, x3)

which stands for

A = @alloc( ... )
B = @alloc( ... )
myfunction!(A, B, x1, x2, x3)

To make it clear that the two allocated hidden arguments are in there hidden, one could do something like

A, B = @withalloc myfunction!(_, _, x1, x2, x3)