Hi Sam,
On 7/29/2019 9:40 PM, Sam Tobin-Hochstadt wrote:
On Mon, Jul 29, 2019 at 9:31 PM George Neuner <gneun...@comcast.net> wrote:
> To me, TypedRacket feels much more like ML than like Dylan or Common
> Lisp. Type inference is great - when it works. Coarse grained scope
> encompassing declarations are great - when you can figure out what
> they should be. Reducing busywork and the cognative load on the
> programmer seems like it always should be a Good Thing. But when
> inference fails and the declarations are unfathomable, and there is no
> easy way around the problem save by falling back to SLOW untyped code,
> then typing becomes a PITA. To my thinking, there needs to be some
> middle ground - like CL's 'the' operator or Dylan's local annotations
> - that can disambiguate problems on the spot.
I'm not exactly sure what you're asking for here -- the CL type system
works very differently -- but local annotation is certainly possible
in Typed Racket. The `ann` form allows you to annotate any expression
at all, ie `(ann 17 Integer)`.
'ann' operand order puts the (possibly lengthy) code expression before
the (typically much shorter) type declaration. This is the reverse of
the way Lisp does it, and, IMO, it makes 'ann' expressions harder to read.
I think Atlas nailed the crux of my issue: that Dylan and CL permit you
to add manifest typing incrementally as you desire or see need, whereas
TypedRacket requires at least some typing (of variables) right from the
very beginning and then it continues to natter at you about things you
don't necessarily care about in the moment.
What I want is to be able to freely mix latent typed and manifest typed
code, and not worry about crossing boundaries until performance
considerations require that I do so. That said, even though Common
Lisp is closer to what I want - I don't use it precisely because it is
Lisp ... I much prefer Scheme.
YMMV,
George
--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/7a83ad6b-f724-e36f-a147-4930572e2694%40comcast.net.