World: r3wp
[!REBOL3 Proposals] For discussion of feature proposals
older newer | first last |
BrianH 20-Jan-2011 [710] | Sounds good to me. |
Andreas 20-Jan-2011 [711] | As you see, case and type are the major distinction between equal and strict-equal. |
BrianH 20-Jan-2011 [712] | Yup. That makes sense. |
Andreas 20-Jan-2011 [713x2] | So that would make it easy to define FIND as using EQUAL? per default, and STRICT-EQUAL? with /case. |
(Or a renamed /case option. A bit hypothetical due to backwards compatibility, but mentioning it for the sake of completeness.) | |
BrianH 20-Jan-2011 [715x2] | We can't rename the /case option - legacy naming rules. And if the equivalences are reshuffled this way, we won't have to. |
Andreas, the proposal has been added here: http://issue.cc/r3/1834 - if you have any suggestions or tweaks, mention them here or there and I'll update it. | |
Andreas 20-Jan-2011 [717x2] | Yes, I have a suggestion: my explicit wish was to wait with this for Ladislav's feedback. |
Please respect that in the future. | |
BrianH 20-Jan-2011 [719x2] | I put in a request for Ladislav's feedback in a ticket comment, and in other AltME worlds where he works. Including the RMA world, where they write code that would be affected by this. |
Unlike here, tickets can be tweaked based on feedback. We needed a baseline to start with. | |
Andreas 20-Jan-2011 [721x2] | Unlike here, extensive CC discussions are a mess. |
Edit "no aliasing" to "alias distinctions". Thanks. | |
BrianH 20-Jan-2011 [723x2] | They're a mess here too, but are more useless because they can't be searched as easily once they drop off the history, and the relevant people who would make the changes aren't generally here that much.. CC is a much better place for this kind of thing. |
Actually, no aliasing is more correct than what is on the wiki. | |
Andreas 20-Jan-2011 [725x2] | equal plus no aliasing is bad wording. |
And it's really simple: I wanted Ladislav's feedback here first, before we write up a ticket and litter it with useless comments. Again, please respect that in the future. | |
BrianH 20-Jan-2011 [727x2] | OK. |
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. | |
older newer | first last |