Late but I want to record principles and experiences in this thread: 

On Dec 26, 2015, at 6:52 PM, JCG <griffin...@gmail.com> wrote:

> Having just converted a server process of about 1800 lines of untyped Racket 
> to 1900 lines of typed Racket, I'd like to make some comments
> 
> 1) I highly suggest starting in Typed Racket if you are going to go end up 
> there.  I made the mistake of writing it untyped and then retrofitting which 
> clearly is the more difficult path.
> 


TR is intended for people who wish to add types retroactively. 

My own experience doing so is highly favorable, and I have ported 1000s of 
lines and I have asked some of my students to port many more of my lines. But 
yes, TR and its tool support is work in progress, and I am sure we can do 
better. 


> 2) The conversion caught one likely-to-happen-sometime bug, thank you.


That's a nice side effect. I rarely find mistakes, but I follow the HtDP 
approach to an extreme with tons of type comments. 

The actual purpose is to record with sound, checked types what the designer had 
in his head retroactively so that developers can benefit from this type 
information and so that the creation of *new code* can benefit from the 
(shallow but large) advantages of types and type checking. 


> 3) The end-product appears to be a 50%-performance hybrid due to boundary 
> contracts,  but ameliorated runtime-wise by utilizing the 
> typed/racket/no-check language after it's all working in type checked mode.


I don't understand this bullet. Bullet 1 says your code is now completely 
typed. Our experience is that completely typed versions are about as fast and 
on many occasions (eg., numeric) faster than completely untyped versions. 

But, we are perfectly aware that many hybrid versions are slower than the 
untyped version by several factors. Many of people in PLT (everyone?) are 
working on this problem right now. 


Thanks -- Matthias

-- 
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.

Reply via email to