Are there any programming languages that extend the behaviour of comparison operators to allow expressions such as

    if (low < value < high)

?

This syntax is currently disallowed by DMD.

I'm aware of the risk of a programmer misinterpreting this as

    if ((low < value) < high)

Is this the reason why no languages (including D allows it).

I'm asking for in some cases, where value is a long expression, it would be a nice syntatic sugar to use.

Reply via email to