Hacker News new | ask | show | jobs
by rsc 4593 days ago
Not true. I count "new" being used about half as often as "&Point{}" in the Go standard library. That's not "practically unused".

  g% cg -c -f 'g/go/src/pkg.*\.go' '\bnew\(' | total 2
  1485
  g% cg -c -f 'g/go/src/pkg.*\.go' '\&[A-Za-z0-9_.]+\{' | total 2
  3051
  g% cg -c -f 'g/go/src/pkg.*\.go' . | total 2
  430482
  g%
So 430,482 non-blank lines of code, 1485 lines with new, 3051 lines that look like a struct pointer literal.
1 comments

If I had to guess, I think they meant that anyone writing new code will avoid using 'new'.