Here is something for you to turn FP John :). A simplified version of #scala #slick’s code generator. https://scastie.scala-lang.org/0MGUDt4AQbyEwPl7k0KnYQ … Inheritance and nested classes each contribute to making customization super concise and straight forward. Records might be able to replace inheritance.
-
This Tweet is unavailable.
-
-
This Tweet is unavailable.
-
Replying to @jdegoes
Talk is cheap, show me the code :P! I think this is harder than you think. Either way one of us will learn something.
1 reply 0 retweets 5 likes -
This Tweet is unavailable.
-
-
This Tweet is unavailable.
-
Well my example is a direct application of a pattern described in Martin's paper: http://lampwww.epfl.ch/~odersky/papers/ScalableComponent.pdf … But challenge aside, I'd be quite curious what the best port of my earlier example to Haskell or Purescript (bc records) would be. cc
@aloiscochard@dibblego@kmett4 replies 0 retweets 2 likes -
after reading your scastie Chris, this looks to me exactly the same problem as pretty-printing (where the expr. is a DB schema). For which there is numerous papers and implementations in Haskell, is there more to it which I failed to recognize?
2 replies 0 retweets 3 likes -
Replying to @aloiscochard @jdegoes and
This would be an excellent opportunity for me (and others) to learn how lens solves this excellently. Maybe one of you is able to sketch that out? And indeed
@aloiscochard the customization part is where the concise Scala implemention shines.1 reply 0 retweets 1 like
Jump on IRC.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.