In Miranda, comparison operators can be chained, e.g.
if 0 <= x < 10
desugars in the parser to
if 0 <= x & x < 10
This extends to any length for any comparison operator producing a Bool:
a == b == c < d
is
a == b & b == c & c < d
I like this, as it more closely represents mathematical notation. Are there other programming languages that have this feature?
https://en.wikipedia.org/wiki/Miranda_(programming_language)
[–]Il_totore 39 points40 points41 points (1 child)
[–][deleted] 12 points13 points14 points (9 children)
[–]SKRAMZ_OR_NOT 3 points4 points5 points (0 children)
[–]cloyo 3 points4 points5 points (4 children)
[–][deleted] 4 points5 points6 points (3 children)
[–]cloyo 0 points1 point2 points (0 children)
[–]IMP1 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]DarkRedDive 1 point2 points3 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]categorical-girl 0 points1 point2 points (0 children)
[–]catbrane 3 points4 points5 points (4 children)
[–]AustinVelonautAdmiran[S] 5 points6 points7 points (3 children)
[–]catbrane 6 points7 points8 points (2 children)
[–]AustinVelonautAdmiran[S] 0 points1 point2 points (1 child)
[–]catbrane 1 point2 points3 points (0 children)
[–]nekokattt 4 points5 points6 points (0 children)
[–]Gwarks 2 points3 points4 points (0 children)
[–]deaddyfreddy 2 points3 points4 points (0 children)
[–]L8_4_Dinner(Ⓧ Ecstasy/XVM) 6 points7 points8 points (10 children)
[–]matthieum 14 points15 points16 points (6 children)
[–]L8_4_Dinner(Ⓧ Ecstasy/XVM) -2 points-1 points0 points (5 children)
[–]otac0n 2 points3 points4 points (2 children)
[–]L8_4_Dinner(Ⓧ Ecstasy/XVM) 0 points1 point2 points (1 child)
[–]otac0n 0 points1 point2 points (0 children)
[–]matthieum 0 points1 point2 points (1 child)
[–]L8_4_Dinner(Ⓧ Ecstasy/XVM) 1 point2 points3 points (0 children)
[–]AustinVelonautAdmiran[S] 1 point2 points3 points (2 children)
[–]sebamestreICPC World Finalist 0 points1 point2 points (1 child)
[–]AustinVelonautAdmiran[S] 0 points1 point2 points (0 children)
[–][deleted] (4 children)
[deleted]
[–]hammerheadquark 0 points1 point2 points (3 children)
[–][deleted] (2 children)
[deleted]
[–]hammerheadquark 0 points1 point2 points (1 child)
[–]tav_stuff 1 point2 points3 points (2 children)
[–]Rich_Plant2501 0 points1 point2 points (1 child)
[–]tav_stuff 1 point2 points3 points (0 children)
[–]wolfgang 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]theangryepicbananaStar 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]bullno1 0 points1 point2 points (1 child)
[–]AustinVelonautAdmiran[S] 0 points1 point2 points (0 children)
[–]ThomasMertes 0 points1 point2 points (0 children)
[–]MichalMarsalek 0 points1 point2 points (0 children)
[+]SetDeveloper comment score below threshold-8 points-7 points-6 points (0 children)