shapeless cachedImplicit

150 views
Skip to first unread message

Sam Halliday

unread,
May 2, 2015, 4:33:39 AM5/2/15
to type...@googlegroups.com
Dear all,

Miles pointed me at the new cachedImplicit in shapeless, but I'm struggling to understand how it is better than just explicitly constructing an `implicit val` and then ensuring that I reuse that.

https://github.com/milessabin/shapeless/search?utf8=%E2%9C%93&q=cachedImplicit

To add some meat to my question, could somebody please help me to understand how I would use it to improve compiler performance for this simple example http://stackoverflow.com/questions/29676204

And, a much bigger ask, how it could improve the performance of my spray-json-shapeless framework (which is pretty stable now)?


There was also some hint that the cachedImplicit might be friendlier with the presentation compiler (I'm seeing ENSIME blow up a lot these days since using shapeless more heavily, so we'll need to write a workaround for that in ensime, as well as me better understand good shapeless practice) https://github.com/ensime/ensime-server/issues/954

Best regards,
Sam

lro...@quartethealth.com

unread,
Nov 28, 2017, 12:01:38 AM11/28/17
to Typelevel Users & Development List
I had the same question about cachedImplicit and was hoping to get some intuition on why you would and wouldn't use it. 

Miles Sabin

unread,
Nov 28, 2017, 2:48:40 AM11/28/17
to lro...@quartethealth.com, Typelevel Users & Development List
On Mon, Nov 27, 2017 at 7:34 PM, lrohde via Typelevel Users &
Development List <type...@googlegroups.com> wrote:
> I had the same question about cachedImplicit and was hoping to get some
> intuition on why you would and wouldn't use it.

This mailing list is largely deprecated in favour of the
typelevel/general and shapeless gitter channels these days,

https://gitter.im/typelevel/general
https://gitter.im/milessabin/shapeless

If you should get an answer to your question on the shapeless channel.

Cheers,


Miles

--
Miles Sabin
tel: +44 7813 944 528
skype: milessabin
gtalk: mi...@milessabin.com
http://milessabin.com/blog
http://twitter.com/milessabin

Luke Rohde

unread,
Nov 28, 2017, 8:25:52 AM11/28/17
to Miles Sabin, Typelevel Users & Development List
Thanks, will do.
Reply all
Reply to author
Forward
0 new messages