you are viewing a single comment's thread
view the rest of the comments
[–] 7 points 2 years ago (1 child)

That's what I hate about javascript, it doesn't warm you about undefined behavior, it just throws.

I used to not really care about that, but after learning C and Rust, damm, I wish there where result types everywhere

  • source
  • parent
  • hideshow 2 child comments
  • [–] 9 points 2 years ago* (1 child)

    Some small nits to fix:

    1. C has it's own undefined behavior.

    2. JS has confusing behavior, not undefined behavior. Its specs are well defined and backwards compatible to a fault, making some things unintuitive and harder to learn if you don't learn the history of the language.

    3. Problems with both should be avoided by learning and using standard practices. (Don't pretend C is object oriented, always use === instead of == in js, etc...)


    In complete agreement:

    1. Result types are awesome, all future languages should be designed around them.
  • source
  • parent
  • hideshow 2 child comments