World: r3wp
[!REBOL3 Proposals] For discussion of feature proposals
older newer | first last |
BrianH 20-Jan-2011 [728] | Case-insensitivity is implemented using aliasing. Case sensitivity means that the aliases are ignored - no aliasing. |
Andreas 20-Jan-2011 [729x5] | Case sensitivity does not mean that aliases are ignore. |
At least I don't know of a way off hand to prove that. | |
But I trust you that word case sensitivity is implemented using aliases. | |
But to me, "equal plus no aliasing" still does not clearly express whether aliased words are considered to be equal or ignored in this case. | |
equal or different* | |
BrianH 20-Jan-2011 [734] | Fortunately it can be edited (and I will do that now). |
Andreas 20-Jan-2011 [735x2] | Equal plus alias distinction was clearer to me. |
(As not all aliases are case related.) | |
BrianH 20-Jan-2011 [737] | Actually, that feature might go away. The ALIAS function has been a big hassle in R3 because of the lack of a central system/words repository. We are likely to keep the aliasing facility for internal use to implement case insensitivity, but the ALIAS function to do other kinds of aliasing may go away. |
Andreas 20-Jan-2011 [738] | Yes, I am aware of that. |
BrianH 20-Jan-2011 [739] | Oh good :) |
Andreas 20-Jan-2011 [740] | But as of A110, we still have it :) So to formulate the wish on that basis, we need to take it into account, or someone else will hassle us about having left out alias. |
BrianH 20-Jan-2011 [741] | Yup. Working on the wording now. I think the semantics of the proposal are good though. |
Andreas 20-Jan-2011 [742] | Just keep it short, though. |
Ladislav 20-Jan-2011 [743x2] | >> equal? -0. 0. == true >> equiv? -0. 0. == true >> strict-equal? -0. 0. == true >> same? -0. 0. == false |
(I suppose, that is one thing Brian wanted to know) | |
BrianH 20-Jan-2011 [745] | Good to know. How would it affect numeric code if we made this change? Do we need operators for exact comparison? |
Ladislav 20-Jan-2011 [746] | numeric code - I do not think this specific property can affect anything |
BrianH 20-Jan-2011 [747] | We don't use denormalized numbers or anything like that which would make numbers with different bit patterns refer to the same number? |
Ladislav 20-Jan-2011 [748] | I am not sure I understand your question. Nevertheless, the least strict is currently Equal?, which, most probably, is useful. The most strict (for numeric code using decimals) that we could need is Equiv? The Same? is is important only because it is the most strict possible |
Andreas 20-Jan-2011 [749] | I think the real question is: we also have strict-equal? which is (IIUC) as strict as equiv? for numeric code using decimals _and_ is also mapped to operators: == and !==. |
BrianH 20-Jan-2011 [750] | I am trying to determine whether it would be acceptable to replace == with =? in decimal code where exact comparison is needed. Otherwise we would need to switch to prefix form if this proposal goes through, which math people don't necessarily like, or come up with operators for the equiv line. |
Andreas 20-Jan-2011 [751] | If we keep the mapping of strict-equal? to == then == would loose the added decimal precision under the new proposal. |
BrianH 20-Jan-2011 [752] | Andreas, do you like the new wording? |
Andreas 20-Jan-2011 [753] | To be honest, no. |
Ladislav 20-Jan-2011 [754] | Hmm, I would prefer the current state, then: - == is what I would use frequently, while I would not want to use =? in place of it, because of the difference - the change would require quite a lot of work, and where is a guarantee, that a new idea does not occur in a couple of weeks again? |
BrianH 20-Jan-2011 [755] | The long wording is for precision, and because these tickets serve as documentation of the issues for future reference. |
Andreas 20-Jan-2011 [756x4] | I don't want to define what the comparison dimensions are in this ticket. Leave that to an external document. |
That only hides the important issue. | |
Also, it is wrong: "equal? ... ignores case-aliasing of words". | |
equal? also ignores every other aliasing. | |
BrianH 20-Jan-2011 [760] | I changed that. |
Andreas 20-Jan-2011 [761x3] | Still wrong. |
>> a: 42 == 42 >> alias 'a "b" == b >> equal? 'a 'b == true | |
Ladislav, thanks. Seems the better option then would be to map == and !== to strict-equiv? and strict-not-equiv?. | |
BrianH 20-Jan-2011 [764] | I don't want to emphasize the aliasing thing or otherwise the ticket would need editing if/when ALIAS goes away. Still, good point. |
Andreas 20-Jan-2011 [765] | Then don't emphasize it. It is one comparison dimension that currently exists. |
BrianH 20-Jan-2011 [766] | That reminds me, need to check whether there is a ticket to remove ALIAS. |
Andreas 20-Jan-2011 [767x3] | No, there is not. |
Ignores datatypes, bindings, case, aliasing. should be sufficient | |
Also, get rid of the *NOT* mentions in the main body. If at all, mention that in a remark at the end of the ticket. | |
BrianH 20-Jan-2011 [770x2] | Good idea. |
Done. | |
Ladislav 20-Jan-2011 [772] | BTW, Same? is still less strict than my Identical? (even for decimals) |
BrianH 20-Jan-2011 [773] | Interesting. How does that happen? I thought SAME? just did a bit-for-bit comparison. |
Ladislav 20-Jan-2011 [774] | yes, but the NEW-LINE? bit is ignored |
Andreas 20-Jan-2011 [775x2] | Heh :) awesome. |
Ok, ticket's good. Thanks Brian. | |
BrianH 20-Jan-2011 [777] | That's funny :) |
older newer | first last |