News for hackers. Stuff that matters.
Re:The language I wish Go was by munificent on Thursday October 21, 2010 @03:08PM (#1816991)
Yeah, at the time, I found his explanation uncompelling:

which means you should have the choice to do efficient things, if you know what you're doing.

That directly clashes with other design choices in Go. For example, taking the address of a variable on the stack implicitly puts it on the heap (at performance cost) to protect you from accidentally using the pointer after that function returns.

If you're worried about it and you really care: don't pass a pointer, pass a value.

...and pay the performance penalty of doing not just a copy, but a deep copy, simply because the language doesn't have const.

There are no comments on this comment yet.