Exercises for Essence of Dispatch
Damien Cassou, Stéphane Ducasse and Luc Fabresse
http://stephane.ducasse.free.fr
Three Questions
- Implement
not
- Implement
|
(or) and ifTrue:ifFalse:
- What is the goal of these exercises?
Exercise 1: Implement not
Propose an implementation of not
in a world where:
- You have:
true
, false
- You only have objects and messages
- How would you implement:
not
?
Exercise 2: Implement | (or)
Propose an implementation of or
in a world where:
- You have:
true
, false
- You only have objects and messages
- How would you implement:
not
?
Exercise 3: Why These Exercises?
- You are never going to implement Booleans in your life
- So why do we think these exercises are so important?
/