24

I would like to learn about polytypic concepts in Scala, I came across shapeless library what would be the best starting point for learning and applying shapeless.

prassee
  • 3,651
  • 6
  • 30
  • 49
  • How much scala do you know? It seems to me that shapeless is doing a lot of complicated things to work around some limitations of the scala language. – huynhjl Jun 09 '13 at 13:31
  • I am not a expert but I could write programs that uses higher order functions,currying and going through a bit about type level programming, – prassee Jun 09 '13 at 13:39
  • I am interested in an answer to the same question. I followed the examples and looked at the unit tests to use a very small amount of shapeless. I am curious what path others have been following. – huynhjl Jun 09 '13 at 14:40
  • 11
    I just wrote up a related blog post with a Shapeless example [here](http://meta.plasm.us/posts/2013/06/09/learning-shapeless/). – Travis Brown Jun 09 '13 at 19:00
  • 1
    [feature overview](https://github.com/milessabin/shapeless/wiki/Feature-overview:-shapeless-2.0.0#polymorphic-function-values) is very cool – iuriisusuk Dec 04 '15 at 13:04
  • Book: https://underscore.io/books/shapeless-guide/ examples: https://github.com/milessabin/shapeless/tree/main/examples/src/main/scala/shapeless/examples tests: https://github.com/milessabin/shapeless/tree/main/core/shared/src/test/scala/shapeless – Dmytro Mitin Feb 18 '23 at 13:36

1 Answers1

27

I don't know if thats an answer you wan't, but the best push for me to start learning/using shapeless was a couple of Miles videos from different Scala conferences :

From flatmap
ScalaNE 2012
ScalaNE 2013

His forgotten blog

And as a big practise - i'm writing a lot using Spray toolkit, it uses shapeless inside. So try to write some web server or some client.

Also a github's wiki contains good intro for the library.

Great idea - try to rewrite some case classes into shapeless records with hlists, it's pretty cool to use it with some JSON converter =). Much of it is some generic kind of stuff wich is not very useful in real project, but if you want better understanding of type level programming, it's really great stuff

4lex1v
  • 21,367
  • 6
  • 52
  • 86
  • thanks for the reply ... I would start with this hope this would raise some questions which are more relevant !!!!! – prassee Jun 10 '13 at 03:51