[racket] Typed Racket and classes and objects
Thanks Matthias. BTW I find changing the Java examples to Racket very
instructive and makes me appreciate the clarity of Racket.
Cheers,
Harry
On Sun, Jan 13, 2013 at 12:14 PM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
>
> Not yet. We are in the process of adding a gradual type system that deals with our classes, but we're not beyond the paper design phase. You can do one of two things:
>
> (1) use define/contract for the classes and formulate the types as contracts. You don't get compile-time checking but run-time checking then.
>
> (2) Use comments to write down the types and forgo any checking whatsoever.
>
> Your milage will vary. I think I'd go for option 1 even if this is a lot of keyboard-typing. -- Matthias
>
>
>
> On Jan 12, 2013, at 7:49 PM, Harry Spier wrote:
>
>> I've started going through "A Little Java a Few Patterns" to learn
>> some basic OOP techniques and patterns but I've been using Racket
>> instead of Java (I don't know Java so I'd prefer to stick with
>> Racket). Is it possible to use Typed Racket instead of Racket with
>> classes and objects, so I can put types on the class arguments and
>> values the methods return, similar to what the Java based examples do?
>>
>> Thanks,
>> Harry Spier
>> ____________________
>> Racket Users list:
>> http://lists.racket-lang.org/users
>