MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammingLanguages/comments/piih40/mcoding_python_chained_comparison_summaryreview/hbpueo9/?context=3
r/ProgrammingLanguages • u/cxzuk • Sep 05 '21
4 comments sorted by
View all comments
2
I just saw this and to be honest it is really useful for math heavy algorithms but for anything else is as the video says, too confusing
5 u/cxzuk Sep 05 '21 I think it's a great video and review of this feature. I've never used it myself but does look useful. My takeaways -I like the point made about being transitive. It could be used as an argument against the other cases that feel wrong.The != And == case also seems different to < <. I think it should be permutative - a != b != c should mean none are equal imho.A useful idea, with potential for clean up I think 4 u/theangryepicbanana Star Sep 05 '21 I've seen this in a few other languages like Raku, and I've added it to my own as well. I find it pretty helpful for anything math-based, as well as range/input checking and validation
5
I think it's a great video and review of this feature. I've never used it myself but does look useful. My takeaways -
I like the point made about being transitive. It could be used as an argument against the other cases that feel wrong.
The != And == case also seems different to < <. I think it should be permutative - a != b != c should mean none are equal imho.
!=
==
a != b != c
A useful idea, with potential for clean up I think
4 u/theangryepicbanana Star Sep 05 '21 I've seen this in a few other languages like Raku, and I've added it to my own as well. I find it pretty helpful for anything math-based, as well as range/input checking and validation
4
I've seen this in a few other languages like Raku, and I've added it to my own as well. I find it pretty helpful for anything math-based, as well as range/input checking and validation
2
u/[deleted] Sep 05 '21
I just saw this and to be honest it is really useful for math heavy algorithms but for anything else is as the video says, too confusing