5
submitted 2 years ago by [email protected] to c/[email protected]

Did I break a taboo by doing this?

you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 2 points 2 years ago

As an aside, you probably don’t need a static union type for your min and max functions. I assume you could use comparable.

comparible only allows ==

[-] [email protected] 2 points 2 years ago

Oh right! What am I saying? contraints.Ordered maybe.

[-] [email protected] 1 points 2 years ago

I just looked at the standard docs and I didn't realize there was a built-in min and max function. Y'all should really read the standard lib docs.. it's fascinating in there.

this post was submitted on 25 Sep 2023
5 points (64.7% liked)

Golang

2506 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 2 years ago
MODERATORS