The more Virtus code I wrote, the more awkward I feel it is. It's not because Virtus is inherently bad, I just don't think it fits our case.
-
So many attributes need to be marked
reader: :private. It's not ruby's way. Ruby has its ownprivatekeyword. -
NilToDefaultis bad. How do I decide whether a model need to include it? Or we simply include it everywhere? -
The difference between
writer_classanddefaultis subtle. Why does the implementer add a newwriter_classhere? Why does he use default value there? We're using different ways to do the same thing (compute values) here. -
writer_classis awkward. Why do I need to create a class just for itscoercemethod? I feel like writing Java. -
defaultmethod is the most awkward. We turn every computed attribute from a single method to two method (attribute and the default method) by using Virtus. There're dozens of attributes likebedsbelow inListingPresenter. -
The type annotation is useless.