|
|
|
|
|
by callc
218 days ago
|
|
You shouldn’t need a library to do this simple operation. I’m guessing the go language design went too far into “simplicity” at the expense of reasonableness. For example, we can make a “simpler” language by not supporting multiplication, just use addition and write your own! |
|
It could have been a builtin function, I suppose, but why not place it in the standard library? It's not a foundational operation. If you look at the implementation, you'll notice it simply rolls up several foundation operations into one function. That is exactly the kind of thing you'd expect to find in a standard library.