racket/typed-racket

TR should provide a Dictionary type

Open

#31 opened on Feb 21, 2015

 (0 comments) (0 reactions) (0 assignees)Racket (106 forks)github user discovery
good first issue

Repository metrics

Stars
 (576 stars)
PR merge metrics
 (Avg merge 11d 14h) (1 merged PR in 30d)

Description

It would be nice if TR provided a built-in Dictionary type. At its simplest, it would just be (U (HashTable a b) (Listof (Pairof a b)), but vectors are also technically dictionaries.

Does TR's type system allow "specializations" of types? I.e. some way to define a special case for (Dictionary Integer b) that includes vectors?

Technically, dictionaries also include structures that implement gen:dict, but obviously generics don't exist in TR yet.

Contributor guide