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

Or you use the correct types and avoid these "problems" alltogether.

It's not possible to bake in a cold oven. Why does your type allow it then? Why don't you encode the state directly?

  oven := ColdOven.heat()
  bakedPizza := oven.bake(pizza)


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

Search: