Possible tweak to given syntax

Mark "Justin" Waks
1 min readDec 17, 2019

--

A twofer today: for those following the endless saga around the syntax of given (the proposed replacement for implicit, and the source of more bikeshedding than anything else I’ve ever seen), Martin has just proposed this change, from:

given listOrd[T](given Ord[T]): Ord[List[T]] ...

to:

given listOrd[T]: Ord[T] => Ord[List[T]] ...

Note that this is just a proposal at this point, not even a PR. But IMO it’s an intriguing one — I think the stacked use of the word given is a bit horrible, and the => in the proposal makes a certain intuitive sense. It says what it means more clearly, and that’s an important consideration.

If you have opinions, I recommend wandering over to the proposal itself and chatting about it.

--

--

Mark "Justin" Waks
Mark "Justin" Waks

Written by Mark "Justin" Waks

Lifelong programmer and software architect, specializing in online social tools and (nowadays) Scala. Architect of Querki (“leading the small data revolution”).

No responses yet