Re: [racket-users] Re: Reason why char=? accepts only one argument?

2019-11-26 Thread Siddhartha Kasivajhula
>
> What about Common Lisp's /= and char/= functions?  Can nonequivalent
> values form an equivalence class?


I don't think that would technically qualify as an equivalence class
because it would mean that an element is never equivalent to itself, which
is a definitional requirement for an equivalence class (reflexivity). In
fact the relation of "not equal" is not transitive either (another
requirement), since a /= b /= c does not prevent a = c. On the other hand,
because the relation is symmetric (a /= b implies b /= a), it does yield
"classes" that are subsets of the original set wherein every element is
"not equal" to every other, so that could be why they seem similar in some
way.

Can't comment on the decision to exclude /= since I'm not a member of the
development team :)

On Mon, Nov 25, 2019 at 8:15 AM George Neuner  wrote:

> On Mon, 25 Nov 2019 00:14:45 -0800, Siddhartha Kasivajhula
>  wrote:
>
> >Another way to think of it could be to interpret the operator as asking,
> >"do the arguments supplied form an equivalence class
> >?" If only one argument
> is
> >supplied, then it trivially forms such a class.
>
> What about Common Lisp's /= and char/= functions?  Can nonequivalent
> values form an equivalence class?
>
> I note that neither Scheme nor Racket implements these functions.  Is
> there some pedagogical reason, or is it simply a practical realization
> that "(/= _)" is interchangeable with "(not (= _))" ?
>
>
> Not a language theorist, just an aging compiler geek.
> George
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/pfunteltm3sm5irkjifvh00r7mien6l1nm%404ax.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CACQBWFkiVS_BizS_885uSOSj2saKK_WDJZLswbgokHgP_HsSMQ%40mail.gmail.com.


[racket-users] Re: Reason why char=? accepts only one argument?

2019-11-25 Thread George Neuner
On Mon, 25 Nov 2019 00:14:45 -0800, Siddhartha Kasivajhula
 wrote:

>Another way to think of it could be to interpret the operator as asking,
>"do the arguments supplied form an equivalence class
>?" If only one argument is
>supplied, then it trivially forms such a class.

What about Common Lisp's /= and char/= functions?  Can nonequivalent
values form an equivalence class?

I note that neither Scheme nor Racket implements these functions.  Is
there some pedagogical reason, or is it simply a practical realization
that "(/= _)" is interchangeable with "(not (= _))" ?


Not a language theorist, just an aging compiler geek.
George

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/pfunteltm3sm5irkjifvh00r7mien6l1nm%404ax.com.