Closed julien-truffaut closed 7 years ago
Thanks for the suggestion! I did think of this one. It has some disadvantages:
.name
syntax with a special form[]
with the usual Scala meaning of type parametersI feel there is a bit of a trap with using forms that have a Scala-only intuition - users may naturally expect other Scala features to work, and be surprised when they don't. It may lead to feature-pressure to reimplement half of scalac in the macro, which I really want to avoid. For instance, this is why I used the mainstream notation [...]
for indexing rather than the Scala usage (...)
. I think this applies to square-brackets-as-type-annotations too, apart from the confusion introduced by an overloaded meaning.
The other thing is that there is no need to represent all of Monocle's features in Goggles; ultimately it's very easy to drop in Monocle optics directly, in this case say, from @GenPrisms
. So we don't need to rush to introduce syntactic features that would require relaxing the other goals of the project.
Sorry I missed #11 and thanks for your detailed arguments. I agree we shouldn't rush adding something that will be a nightmare to maintain. I was mostly suggesting that it would be great to have a short syntax to support both Product and Coproduct