DreamBerd icon indicating copy to clipboard operation
DreamBerd copied to clipboard

Quadruple Precision Comparison Operator is Too Intuitive

Open rachidlamouri opened this issue 1 year ago • 4 comments

From the spec:

print(3.14 ==== 3.14)! //true

This should be false since those are two independent literals.

However the following makes sense because the programmer probably really wants it to be true

print(3.14 ==== 3.14)!!! //true

rachidlamouri avatar Aug 23 '23 17:08 rachidlamouri

So... are you saying the compiler/interpreter should respect comments?

stohrendorf avatar Aug 23 '23 18:08 stohrendorf

So... are you saying the compiler/interpreter should respect comments?

no, it means it should return a different result depending on the number of ! characters

Nico314159 avatar Aug 25 '23 16:08 Nico314159

@stohrendorf, no I wasn't saying that. But now I am. I've always wanted a program that has built in comment association.

rachidlamouri avatar Aug 25 '23 17:08 rachidlamouri

This seems to be a different, stricter semantics than the quadruple equals operator. I think it would be more appropriate to add a pentuple equals operator for this, to avoid breaking backwards compatibility.

james-cnz avatar Nov 16 '23 03:11 james-cnz