Revisit contextual function type ordering for UDFs #153
Labels
area:core
Portals core
discuss
Discussion encouraged
itype:meta
Meta discussion
stat:backlog
No work planned for time being
One of the pervasive issues in Portals has to do with context functions. For example, this is the current implementation of the
MapTask
in Portals:However, this is the corresponding method from the factory/builder:
Another thing is awkward is passing a contextual function
f
as an argument to anything: it will always cause an error that it cannot find a contextual value, and instead one has to write something likec ?=> f(using c)
regardless.The awkwardness stems from that a case class cannot have as a parameter a contextual function type. So, at an earlier point in the implementation, the choice was made to do it as above. Now, it is perhaps a good time to revisit this principle, as after some more recent trials other potential work-arounds have surfaced.
One option could be to have the contextual parameter not as the first parameter, like the following:
The second option could be to have it as a second parameter list, like the following:
// Rant over
We should revisit this at some point.
The text was updated successfully, but these errors were encountered: