[racket] match in Advanced Student?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Aug 17 12:10:11 EDT 2011

What should I change it to? I tried to mimic the define-struct and
cond error messages that call unexpected sexprs "parts".

Jay

On Wed, Aug 17, 2011 at 7:45 AM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
>
>
> p.s. I will say I don't understand the word 'part' in the ASL error message.
>
>
>
> On Aug 17, 2011, at 9:44 AM, Matthias Felleisen wrote:
>
>>
>> If you look at the docs for ASL as opposed to Racket, you will see that match in the former implements a much simpler pattern language than the latter. In particular, ASL does not support the _or_ pattern.
>>
>> Teaching languages aren't Racket. And we should have students sign a language not to put Racket on their resume when they apply for jobs after taking one of our courses.
>>
>> -- Matthias
>>
>>
>>
>> On Aug 17, 2011, at 9:33 AM, Prabhakar Ragde wrote:
>>
>>> Why does this expression successfully evaluate in #lang racket but gives a syntax error in Advanced Student?
>>>
>>> (match 1
>>> [(or 1 2) 'pass]
>>> [else 'fail])
>>>
>>> The or-clause is highlighted and the error is "match: expected a pattern, but found a part".
>>>
>>> Thanks. --PR
>>> _________________________________________________
>>> For list-related administrative tasks:
>>> http://lists.racket-lang.org/listinfo/users
>>
>>
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/users
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93



Posted on the users mailing list.