News for hackers. Stuff that matters.
Re:Buffer: Composable Buffers for Go by TillE on Sunday April 05, 2015 @07:26PM (#9325686)
That's one problem that named arguments solve pretty nicely. Unfortunately, I don't think Go supports them.
Re:Buffer: Composable Buffers for Go by MetaCosm on Sunday April 05, 2015 @08:03PM (#9325775)
There are a lot of ways to make arguments nicer in Go. The simple on is to just use a configuration struct (or anon struct) at that has nice names. But, for complex stuff, functional options as laid out by Dave Cheney: http://dave.cheney.net/2014/10/17/functional-options-for-fri... (video: https://www.youtube.com/watch?v=24lFtGHWxAQ)
Re:Buffer: Composable Buffers for Go by lobster_johnson on Sunday April 05, 2015 @07:54PM (#9325750)
You have anonymous strict literals, though, which are nearly as succinct and can serve the same role.