Feedback Use cond for comparisons, but not for structure 

Forum: U Chicago, Com Sci 221, autumn 2000
Re: News Assignment #8, due Thursday 30 November, end of day (Mike O'Donnell)
Re: Question anadict (C. Donour Sizemore)
Re: Question another anadict question (Michael C. Brizic)
Date: 2000, Nov 29
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

Whenever you need to make a decision based on a computed comparison, such as ltchar c1 c2, then you're stuck with the conditional. But when you need to make a decision based on structure, as in the very common situation where you write one case for the empty list and another case for nonempty lists, then pattern matching is better. In mergehead, which is inside anamerge, you definitely need a conditional to compare c1 and c2.



Mike O'D.


to: "Use cond for comparisons, but not for structure"