[Q] TypeConverter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Q] TypeConverter

Dmitry Zamotkin-4
Hello!

Why #isRightNullValue: and #isLeftNullValue: methods are not symmetric?

---8<---
TypeConverter>>isLeftNullValue: anObject
 ^anObject = self leftNullValue

TypeConverter>>isRightNullValue: anObject
 ^anObject isNil
---8<---

For example, how I could return nil from NumberPresenter?

Could I replace #isRightNullValue: method with code below?

---8<---
TypeConverter>>isRightNullValue: anObject
 ^anObject isNil or: [ anObject = self rightNullValue ]
---8<---


--
Dmitry Zamotkin