Aug 23, 2017 · 1 min read
Articles like this one make me want to give Kotlin a try. Good job!
One question: why hook into the parsing process and add various converters, instead of adding getXXX methods in Article class that take care of post-conditions?
For example (Java equivalent):
public VideoType getVideoType() { return this.videoType == null ? VideoType.unknown : videoType;}
This way, all post-conditions related to articles will be bundled inside Article class instead of being scattered in different places. IMHO, this approach is better for modeling and more maintainable.
Am I missing something?
