Open julien-truffaut opened 3 years ago
Do we require a common method in the supertrait, or do we just scout around for fields with the same name & type in the case classes?
Without common method, I don't think we can get code completion from IDE. At least, I don't see another way.
One of the earlier versions of the ticket had selection over different case classes without a supertrait method, but the usecase doesn't make any sense to me. I don't see why anyone would want that, so I strongly agree there should be a supertrait method
I wonder if it's possible to change the implementation of .focus
, so doesn't directly invoke the macro but instead takes an implicit parameter for a lens (with the macro one given as default), so in the application code there's a way to at least manually provide the instances. Will it increase compile time because of all the implicit searches though?
Original issue: https://github.com/optics-dev/Monocly/issues/14