Re: [racket-users] cast on mutable hash table...

2020-02-15 Thread 'John Clements' via users-redirect
Yes, I’ll add this. It slightly increases the pain density, especially since I think students likely to mistakenly write (list (? symbol? #{s : Symbol}) …) instead of the correct (list (? symbol? #{s : (Listof Symbol)}) …) … but it’s probably better than having to cast. Thanks! John > On

Re: [racket-users] cast on mutable hash table...

2020-02-15 Thread Philip McGrath
On Sat, Feb 15, 2020 at 1:23 PM 'John Clements' via users-redirect < us...@plt-scheme.org> wrote: > Yes, absolutely. One reason that students in my class wind up using cast > quite frequently in their parsers is that they use patterns like (list (? > symbol s) …) which (as I recall) expand into

Re: [racket-users] cast on mutable hash table...

2020-02-15 Thread 'John Clements' via users-redirect
Yes, absolutely. One reason that students in my class wind up using cast quite frequently in their parsers is that they use patterns like (list (? symbol s) …) which (as I recall) expand into unannotated lambda’s, and always require a cast. I write that up here: