Datatype-generic programming libraries for Scala

陌路散爱 提交于 2019-12-04 09:15:37

问题


I'm looking for a Scala library allowing for datatype-generic programming (like Scrap Your Boilerplate, for example). A list of libraries with appropriate links and short descriptions for each one would be a perfect answer.


回答1:


Well,

  • Adrian Moors has reimplemented Jeremy Gibbons' Origami programming : The paper. The source.

  • Bruno Oliveira and Jeremy Gibbons have re-implemented Hinze's Generics for the masses, Lämmel & Peyton-Jones' Scrap your Boilerplate with Class, and Origami Programming, and written a detailed comparison about it. Source here.

  • Naturally, the Scala Collections library itself can easily be seen as an instance of generic programming, as Martin Odersky explains, if only because of its reliance on implicits, Scala's flavor of Type Classes.




回答2:


Christian Hofer, Klaus Ostermann, Tillmann Rendel and Adriaan Moors's Polymorphic Embedding of DSLs has some accompanying code which is 'very generic'. They cite Finally Tagless, Partially Evaluated as an 'important influence', which endears this paper to me for some reason...



来源:https://stackoverflow.com/questions/3031449/datatype-generic-programming-libraries-for-scala

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!