Settings

Theme

Show HN: Go Array and Slice Visualizer

willem.dev

3 points by 1268 2 years ago · 2 comments · 1 min read

Reader

Hi! This is a small web app I made to explore the relationship between arrays and slices in Go. Probably mostly useful for beginners to Go :)

It gets a bit rough around the edges when you provide a custom capacity using index expressions but should work in most other cases.

I'm looking into adding some transitions/animations, I think it would be a good way to visualize loops for example, but I haven't gotten around to it yet.

Let me know what you think!

andrewfromx 2 years ago

very cool. I tend to use slices everywhere and rarely use arrays. What am I missing out on?

  • 1268OP 2 years ago

    Thanks!

    Same here, it's rare to use arrays directly in my experience. Just difficult to explain (or visualize) slices without also discussing arrays.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection