Re: [racket-users] intensional equality and unit tests

2017-02-21 Thread 'John Clements' via Racket Users
> On Feb 21, 2017, at 1:01 PM, Gustavo Massaccesi wrote: > > I'm not sure if this changed. To get a #t with equal? you can add > #:transparent . But be careful because #:transparent is more powerful > than what I expected. For example, it makes available the constructor > of

Re: [racket-users] intensional equality and unit tests

2017-02-21 Thread Gustavo Massaccesi
I'm not sure if this changed. To get a #t with equal? you can add #:transparent . But be careful because #:transparent is more powerful than what I expected. For example, it makes available the constructor of the struct. #lang racket (define-struct foo (a b)) (make-foo 3 4) ; ==>

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread Matthias Felleisen
> On Feb 20, 2017, at 2:27 PM, Sam Tobin-Hochstadt wrote: > > Maybe that's true, but I haven't wanted to do that in my Racket code > using either `check-expect` in class or `check-equal` in Rackunit (or > at least, not enough to define a new abstraction for it). Have you >

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread Sam Tobin-Hochstadt
On Mon, Feb 20, 2017 at 2:23 PM, 'John Clements' via Racket Users wrote: > >> On Feb 20, 2017, at 11:06, Sam Tobin-Hochstadt wrote: >> >> I don't think `check-expect` is doing something that's >> module-relative. For example, this program: >>

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread 'John Clements' via Racket Users
> On Feb 20, 2017, at 11:06, Sam Tobin-Hochstadt wrote: > > I don't think `check-expect` is doing something that's > module-relative. For example, this program: > > #lang racket > (require test-engine/racket-tests) > (struct x (a)) > (check-expect (x 1) (x 1)) >

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread 'John Clements' via Racket Users
> On Feb 20, 2017, at 11:02, Matthias Felleisen wrote: > > >> On Feb 20, 2017, at 1:53 PM, John Clements wrote: >> >> No, I don’t think you missed anything, but from the standpoint of those >> teaching early classes in either Java or Python

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread Sam Tobin-Hochstadt
I don't think `check-expect` is doing something that's module-relative. For example, this program: #lang racket (require test-engine/racket-tests) (struct x (a)) (check-expect (x 1) (x 1)) (run-tests) (display-results) fails its test. `equal?` in Racket checks structural equality in a deep way,

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread Matthias Felleisen
> On Feb 20, 2017, at 1:53 PM, John Clements wrote: > > No, I don’t think you missed anything, but from the standpoint of those > teaching early classes in either Java or Python (a standpoint that I > understand you are generally and mercifully not compelled to

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread 'John Clements' via Racket Users
> On Feb 19, 2017, at 14:40, Matthias Felleisen wrote: > > >> On Feb 18, 2017, at 11:12 PM, 'John Clements' via Racket Users >> wrote: >> >> (cc:ak) >> >> Okay, this sounds just crushingly obvious now that I say it, but honestly, I >>

Re: [racket-users] intensional equality and unit tests

2017-02-19 Thread David Storrs
On Sat, Feb 18, 2017 at 11:12 PM, 'John Clements' via Racket Users < racket-users@googlegroups.com> wrote: > (cc:ak) > > Okay, this sounds just crushingly obvious now that I say it, but honestly, > I don’t think it’s occurred to me: > > One reason that equality is such a nightmare in Java and