Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good point, this is where Rust's flexible enums are an advantage relative to C-style. If you'll forgive the Haskell syntax, you can have something like:

    data StatusCoode
      = Ok200
      | Missing404
      | Error500
      | OtherStatusCode Int
To rephrase the slogan a bit - make an illegal state a bit more difficult to represent or at least the risk of an illegal state clear to the programmer.



My bad.. I was just basing my comment off the readme. In general, I love what you guys are doing and my team is looking closely at Rust and Leaf.


No worries! I just meant to confirm your suspicions :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: