Skip to content

Generics#5

Open
duckbrain wants to merge 2 commits intoetnz:masterfrom
duckbrain:generics
Open

Generics#5
duckbrain wants to merge 2 commits intoetnz:masterfrom
duckbrain:generics

Conversation

@duckbrain
Copy link

Follow-up (builds on) #4. Also an incompatible change. Upgrades to Go 1.18 for generics.

Swaps out the string terms for a generic container. Allowing expressions to be built with structs or other types. (In my case, ints were useful.)

Also makes grid.P safe, since it uses separate struct fields.

@etnz
Copy link
Owner

etnz commented Sep 2, 2022

Can you elaborate a bit more on the usecase for ints?
(partly for curiosity but) mainly because adding a little extra effort (generic) on every string-based user for a very corner usecase would be a no-go.

Another approach could be to keep the string-based Expr and offer ageneric GenericExpr for other usecases.

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