stateless icon indicating copy to clipboard operation
stateless copied to clipboard

Reduce data layer accidental complexity

Open neutropolis opened this issue 7 years ago • 0 comments

When defining an association between entities, we need something like this:

trait Person[Pr] {
  type P[_]
  type Ad; val Address: Address[Ad]
  val optAddress: OptionalAlg.Aux[P, Address.P, Ad]
}

This is very noisy. One of the ideas that we'd like to apply is the next one:

trait Person[Pr] {
  type P[_]
  type Ad: Address
  val optAddress: OptionalAlg.Aux[P, Ad.P, Ad]
}

However, at first glance, it seems to be impossible to implement this idea with macros. Is there any other way to get something similar to this?

neutropolis avatar Dec 11 '17 10:12 neutropolis