ruby.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
If you are interested in the Ruby programming language, come join us! Tell us about yourself when signing up. If you just want to join Mastodon, another server will be a better place for you.

Administered by:

Server stats:

1.1K
active users

@luhring -- do you have any resources you'd recommend in order to appreciate benefits of TypeScript in more complex situations? I've generally just tried to minimally appease the type-checker, but I'm hoping to "do it right" and reap the rewards.

Dane

@luhring Not the real problem, but an example to illustrate: if I'm messing around with a 19x19 go game board grid, is there a way to make sure I don't accidentally create an 18x18 or 20x20 board via types? `BoardSpace[][]` just makes sure that I have an array of arrays of BoardSpaces.

Fixed-length arrays isn't something I need solved, but just an example of something I imagine type-checking could help with.

@dane Hey! It's been a while since I touched TypeScript, but I'd love to know the answer to this!