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

If it materialized instead, yeah that sentence wouldn't apply the same way. But materializing with a default constructor opens up many cans of worms. I would say it has significantly more downsides than short circuiting. Also it should use a different operator.


Small additional point: if it used a different operator, what if that operator was used in an expression that is not the target of an assignment? Does that operator just become equivalent to ?, or does it do the materializing anyway even though it is not required in support of an assignment?


It would probably materialize no matter what.

But syntax error would be fine.

Definitely not acting the same as a question mark.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: