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

Comment by WalterBright

4 months ago

For me something similar. I was using lots of if-then for the program logic, and a fellow student showed me how to replace that with an array. Wow!

Another epiphany was when I was reading the source code for ADVENT (the original Adventure game). There was a comment in the listing "A troll is a modified dwarf". And voila! I discovered inheritance.

0 comments

WalterBright

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