News for hackers. Stuff that matters.
Re:Five Popular Myths about C++: Postscript by Iftheshoefits on Tuesday December 30, 2014 @02:28PM (#8816209)
I've encountered each of these myths "in the wild," and I dare say you'll see them thrown up repeatedly here on HN in various contexts.

The third item on that list especially is something you can almost certainly see every day in a random HN thread about programming languages (along with counterpoints).

In fact, 'safety', of which GC is a subset, is a huge objection, and one of the first, most frequently raised in my experience. People are afraid of pointers, some rightly (e.g. because they've personally experienced bad memory management code, or they've never worked outside of a dynamic language, etc.), but most not.

Re:Five Popular Myths about C++: Postscript by nawitus on Tuesday December 30, 2014 @02:53PM (#8816357)
Note that one can be against a programming language feature without being afraid of them. I think pointers are a bad feature in a programming language because they're not necessary. It's rather unfortunate that Go, for example, supports pointers (which is of course not surprising when you consider who designed it).
Re:Five Popular Myths about C++: Postscript by sacado2 on Wednesday December 31, 2014 @07:09AM (#8819055)
It's hard to deal with low-level code without resorting to pointers in some ways, though. I can't think of a low-level language that doens't use them, actually.
Re:Five Popular Myths about C++: Postscript by nawitus on Wednesday December 31, 2014 @10:06AM (#8819595)
That's true, although you can always use pointers without pointers being a language-level feature. That said, if the programming language is designed for low-level code then pointers are beneifical in my opinion. But is Go really designed to be a low-level language? I don't think so, and if it is, I will stay away from it if I can..
Re:Five Popular Myths about C++: Postscript by sacado2 on Wednesday December 31, 2014 @01:50PM (#8820529)
Go is middle-level, lower than scripting languages, higher than C++. You have control over memory layout, which lets you use less memory than a language that boxes everything (like Java or Python). You can use linear structs, or references to data, whatever fits your problem best. But, to do that, you need pointers.

However, Go pointers can't be casted to another type and you can't do pointer arithmetic. In this way, they are very close to Java or Python references, except they're made explicit. How can these kinds of pointers be any worse than references ?

Re:Five Popular Myths about C++: Postscript by nawitus on Wednesday December 31, 2014 @02:26PM (#8820697)
>How can these kinds of pointers be any worse than references ?

Because references are easier to use.

Re:Five Popular Myths about C++: Postscript by sacado2 on Thursday January 01, 2015 @04:10PM (#8824330)
I get your point, although I think references are not that easier ; if one doesn't think what's happening underneath when using refernces, nasty bugs can occur.
Re:Five Popular Myths about C++: Postscript by Iftheshoefits on Tuesday December 30, 2014 @03:42PM (#8816631)
You're correct, of course, and I should probably have not used that loaded term.