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

That was considered, but the problem is what does the user think when he sees `a < b < c` ?

1. is it intended to be the C way?

2. is it the Python way?

3. did the user assume it was (1) or did he assume it was (2) and guess wrong?

This means that such expressions are a never-ending red flag for a code review. Hence it is made an error. The user can still get the C behavior by using parentheses.

Note that if D was a Python-derived language, then selecting (2) semantics would be a no-brainer. But as a C-derived language, it has to be an error.



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

Search: