Re: [racket-users] using TR in PL class?

2016-02-13 Thread Eli Barzilay
On Tue, Feb 9, 2016 at 11:01 PM, 'John Clements' via Racket Users
 wrote:
> I’m running a fairly vanilla pre-pyret PLAI class, using the
> plai-typed language. Has anyone looked into doing this using Typed
> Racket?

*cough*  A long, long time ago, and still going.

> I feel like my interactions with TR have gotten sufficiently smooth
> that I might try using it for my PL class.

+1, but IIRC, the plai-typed language is an HM thing, and therefore
students have a bit more to learn when they use TR.  But², IME this is
not a big problem, at least not in my case since they're not used to any
proper typecheckers.

So, other "IME"s (which are all at varying levels of subjectiveness):

> Potential problems:
>
> - mismatch with PLAI (though I’m already using an out-of-date PLAI
>   because I’m not using Pyret)

My class diverges from PLAI (the pre-pre-whatever version), in some
places significantly so.  Things like laziness (where it had a kind of
shallow haskell tangent), macros (which weren't there in a deep way),
typechecking (IMO, it really needed some code to match the rest),
continuations (way too little code), and of course some lambda calculus
(if only to let students get some fun and some bragging done when
they're done).  With all of these, diverging from the language of the
book was never a big point for me...


> - loss of the wonderful define-type form.

That was the very first thing I added -- in a proper ML-ish way.
Actually, I added it before TR existed, and later converted it to TR.  I
still hope that at some point in the future the whole thing can be
folded into TR (but it sounds like that's still not getting close).

> - potentially baffling error messages.

TBH, TR had some horrible errors too, but it had generally gotten pretty
good.  To the point that students no longer assume that the language is
broken when they have a bug.


> Potential benefits:
>
> - *much* richer libraries available without the use of typed-in.
> - exposure to occurrence typing, a pretty nifty type system.

+1; and it has a benefit of providing at least one different point when
you get to talk about types.


> - don’t have to explain the (quite painful) s-exp wrappers
> - getting to use ‘match’ — better than plai-typed-s-exp-match because
>   you get binding as well as matching

I do use `match`, but that's in addition to my `cases`, which tends to
confuse students.  (And see above.)


> - somewhat better documentation (students always get hung up on the
>   plai-typed docs. yes, they just need to click on the *second* link…)

And I have some issues there too, since I simplify / restrict some types
in my language(s).


> Opinions? Yes, I admit that I’m not giving Pyret a fair shake, and
> I’ll admit that most of that is related to my commitment to Racket.

(A general +1 about that too...)

-- 
((x=>x(x))(x=>x(x)))   Eli Barzilay:
http://barzilay.org/   Maze is Life!

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


[racket-users] using TR in PL class?

2016-02-09 Thread 'John Clements' via Racket Users
I’m running a fairly vanilla pre-pyret PLAI class, using the plai-typed 
language. Has anyone looked into doing this using Typed Racket? I feel like my 
interactions with TR have gotten sufficiently smooth that I might try using it 
for my PL class.

Potential problems:

- mismatch with PLAI (though I’m already using an out-of-date PLAI because I’m 
not using Pyret)
- loss of the wonderful define-type form.
- potentially baffling error messages.

Potential benefits:

- *much* richer libraries available without the use of typed-in.
- exposure to occurrence typing, a pretty nifty type system.
- don’t have to explain the (quite painful) s-exp wrappers
- getting to use ‘match’ — better than plai-typed-s-exp-match because you get 
binding as well as matching
- somewhat better documentation (students always get hung up on the plai-typed 
docs. yes, they just need to click on the *second* link…)

Opinions? Yes, I admit that I’m not giving Pyret a fair shake, and I’ll admit 
that most of that is related to my commitment to Racket.

John


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


signature.asc
Description: PGP signature