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

I would probably put a trait implementatoin on Value that does `.invert_bool`, and have that panic. That way eval is just `eval(m).invert_bool()` and if it panics it panics.

What you really probably want is to make this a Result type-returning thing, and then have have `not` be a function of type Value -> Result<Value,ErrType>, and then you can do not(eval(m)) and panic at the top-level.



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

Search: