3 ms·
* Interfaces which can have fields would be really, really great. * A rust-style borrow checker would make dealing with channels and pointers a lot safer. * E
by XorNot 10y ago
* Interfaces which can have fields would be really, really great.
* A rust-style borrow checker would make dealing with channels and pointers a lot safer.
* Equality operations for slices would clean up some ugly parts of the standard net library (addresses are []byte, so a direct x == y doesn't work but seems like it should).
* Closed enum sets: some ability to setup an enum type which can be "complete" when used in a switch statement without needing a "default" and which will only panic/fail when a bad type conversion is made. Let me sanitize out a whole bunch of possible errors at one point in my code when I want to use constants (and be warned when I break the guarantees).
- jnordwick 10y agoMy two Golang pet peeves, not very important either: -still no math.round WTF? -make() should be syntax and not this quasi-function that takes this vast array of argument types, and while you're at it, you should just rename it `new`, because that's what it is.
- Vendan 10y agonote that new() already exists in the language.
- jnordwick 10y agoYes, and make() is completely superfluous. make() and new() can be completely rolled into one piece of syntax without ambiguity because they are the same thing.
- howeman 10y agohttps://godoc.org/github.com/gonum/floats#Round https://godoc.org/github.com/gonum/floats#Round
- deleted 10y ago[deleted]
- jnordwick 10y agoIs gonum part of Golang? I don't think I should have to pull in an entire library just to get a working round implementation.
- petre 10y agoHaha, no number rounding function/method in the standard math lib? And I thought Dlang missing a BigFloat type was a deal breaker.