Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
WhereIsTheTruth
2y ago
0 comments
Share
You refactored your code, you think you wrote your ``min`` function, but no, it'll call the builtin one, without warning you..
I don't like this design..
0 comments
default
newest
oldest
vito
2y ago
The compiler will tell you if the types aren't compatible, and this is only for primitive comparable types. What `min()` implementation could you have that even does something different?
KRAKRISMOTT
2y ago
A heap?
Chiron1991
2y ago
Not too familiar with go toolchains, but I bet there's a linter that will warn you about shadowing builtins.
Mawr
2y ago
Yep: "variable append has same name as predeclared identifier (predeclared) go-golangci-lint"
bananapub
2y ago
if you have so few tests and so little code review that this matters then I am not sure what to suggest
dgfitz
2y ago
Qt uses qMin and qMax, it may have been nice if go went with like gMin and gMax
j
/
k
navigate · click thread line to collapse