It's possible to allow the user to destructure Position into the constructors. This can cause problems where the needed functions already exist to allow this usage, but in a controlled fashion. Position is a very critical structure, which should always be managed by the Position functions and not changed externally. The fact that a Position transitions between Point and Solution should be irrelevant to the usage. The same can be said for Objective.
Although some of the lenses provided in the library for data access are convenient, they unfortunately provide a loophole with some logic as they are implemented at the moment. For example: it should be impossible to change the objective of a position - but you actually can right now with how the lenses are defined. In some lenses the "setter" portion is simply not valid. Such lenses should be reworked to be Getter instances, or removed.
Furthermore, this scalac bug is extremely troublesome for us.
It's possible to allow the user to destructure Position into the constructors. This can cause problems where the needed functions already exist to allow this usage, but in a controlled fashion. Position is a very critical structure, which should always be managed by the Position functions and not changed externally. The fact that a Position transitions between Point and Solution should be irrelevant to the usage. The same can be said for Objective.
Although some of the lenses provided in the library for data access are convenient, they unfortunately provide a loophole with some logic as they are implemented at the moment. For example: it should be impossible to change the objective of a position - but you actually can right now with how the lenses are defined. In some lenses the "setter" portion is simply not valid. Such lenses should be reworked to be Getter instances, or removed.
Furthermore, this scalac bug is extremely troublesome for us.