Alex Knauth

Results 244 comments of Alex Knauth
trafficstars

The error message "expected an improper list of length n (plus the last element)" isn't clear enough. Would something to the effect of "length n (including the tail element)" be...

In the setter you have to refer to the old target to do the length check; I think that disqualifies it from being an isomorphism; I'm not sure.

That's because struct-type properties aren't really supported yet, I believe. That's why the current docs for [`struct`](http://plt.eecs.northwestern.edu/snapshots/current/doc/ts-reference/special-forms.html#%28form._%28%28lib._typed-racket%2Fbase-env%2Fprims..rkt%29._struct%29%29) don't actually mention them, and I believe that's also why [`define-struct/exec`](http://plt.eecs.northwestern.edu/snapshots/current/doc/ts-reference/special-forms.html#%28form._%28%28lib._typed-racket%2Fbase-env%2Fprims..rkt%29._define-struct%2Fexec%29%29) is provided...

Should this be transferred to the [typed-racket](https://github.com/racket/typed-racket) repository?

Still need to make a constructor for the more general box type, and fix printing to use that. What should it be called? (Edit: Resolved)

When I said "unions of box types," I was really thinking in my head "unions of vector types, when I do the same thing for vectors." For that I was...

I was also thinking of read-only boxes as `(U (Boxof a) (Boxof Nothing))`.

Re more general type: Mostly because of printing the types. For example `set-box!` can take a box that allows `a` to be written, but allows `Any` to be read, which...

I wanted `write` to be before `read` to make the argument order clear, but `Write-Read-Boxof` sounds good. (Though I'm also wondering, would changing `Read-Only-Boxof` to `Boxof/Read-Only` instead make sense?)

Write before read is consistent with `Parameterof`, `parameter/c`, and `box/c`, as well as with the co- and contra- variance of function types. Input before output. I could change it, but...