Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by alcover

1 year ago

Oh, that's quite on the mark!

Nitpicking: I'm not fond of reserving keywords like len or append.

  len(arr)
  append(arr, v)

Better is

  arr.len
  arr.append(v)

Also

  x: [dynamic]int

is quite verbose

Maybe better would be

  x: [int]   //dyn
  x: [int,2] //fixed

0 comments

alcover

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities