Den man. 17. dec. 2018 kl. 16.58 skrev Will Jukes <william.r.ju...@gmail.com
>:

> After learning more Haskell I've been playing around with match and
> define/match, and I'm wondering if there's any particular reason to prefer
> more traditional Scheme forms over match (I vastly prefer match in most
> cases). Glancing at the match module it looks the process of expanding a
> match clause is pretty intricate, and the documentation mentions that match
> lacks the time complexity guarantee of case, but beyond that it's not
> immediately clear whether match imposes some unacceptable overhead or etc.,
> or to what extent it does if so.
>

The use of match often leads to both more concise and more readable code.

However if you add a field to a struct foo, then you need to a new field to
all patterns matching foos.
If on the hand you used foo-bar then adding a field baz requires no changes
to the existing code.

/Jens Axel

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