phetsims / number-line-distance

"Number Line: Distance" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 3 forks source link

Use assert more liberally in the future. #56

Closed pixelzoom closed 3 years ago

pixelzoom commented 3 years ago

From code review #35:

  • [ ] ⚠️ Assertions should be used appropriately and consistently. Type checking should not just be done in code comments. Use Array.isArray to type check an array. @pixelzoom: I'm a little surprised to find only 8 uses of assert. But there's only ~2900 lines of code here. Still, I'd encourage you to consider using assert more liberally in future code.

I meant to create an issue for this, and just realized that I had not done so. There's nothing that you need to do for this sim. You can simply close this issue after reading it.

SaurabhTotey commented 3 years ago

Alright, sounds good. I'll keep this in mind for the future. Thanks for the heads up!