On Fri, Jun 30, 2017 at 10:03 AM, Zelphir Kaltstahl <zelphirkaltst...@gmail.com> wrote: > > Ok but what is the best practice? Using: > > ~~~ > (ann a Type) > ~~~ > > ~~~ > (: a Type) > ~~~ > > ~~~ > (a : Type) > ~~~ > > and when? For example in a let form, I could imagine that it might be best > practice to specify the type where the variable is specified, instead of a > new line and a new s-expression. > But I'd like to read some reasoning or guide from someone who knows a lot > about Typed Racket or maybe even worked on it.
The `(ann e T)` form is an expression, which has the type `T`. The way I'd annotate your term is: (let ([x : Positive-Flonum 7.0]) x) Sam -- 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. For more options, visit https://groups.google.com/d/optout.