Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
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.
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
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm going to learn Scala, I already have experience in programming. But I have some questions.
When I create a Project in IntelliJ there I must choose between sbt, Lightbend Project start and IDEA. What should I choose and what's the difference between them?
After I have created a Project, I have to create a Scala Class, right? Then I have to choose between Class, Object and Trait.
What is the difference between them?
3.Are there any other things they are good to know?
Best regards Lockna
The simplest thing to choose would be IDEA. IntelliJ will compile the project for you and you shouldn't have to do much to get it working. If you want to learn Scala and a popular build system at the same time, use SBT. It's going to be too much information to ingest at once though, so I wouldn't recommend it if you're an absolute beginner in Scala/functional programming.
Well, perhaps you should read about Scala. That's a Scala 101 question. It's already well documented on the internet, probably a thousand times, and it's not valuable to add another one here.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I know a few ways to use DI in Scala:
Cake pattern
Macwire
What approach is the most suitable for multi layer application with Play?
I incline to using of macwire in my app.
UPD
Solution which fitted for me:
solution of this problem was leveraging of Macwire lib, but you can combine it with another approaches like pure functional style with monads (like Reader monad)
at my job we use macwire for DI with play and it works smoothly. we used to use cake pattern, but we found that it had more boilerplate than the macwire approach, the compiler errors were harder to interpret, the concept was harder to teach, and cake often triggered full recompiles (whereas we experience much better incremental recompilation with macwire. don't quote me on this one, our switch occurred between 2.10 => 2.11, and i believe there were some improvements from that).
it's hard to answer your question fully though without more details about what you're looking for exactly. care to elaborate?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Reading this question and this thread on Reddit inspired me to ask:
Why don't people in the Haskell community seem to be missing Scala's Cake Pattern? Why is the lack (or cumbersomeness) of a Cake Pattern in Haskell not a such a big issue?
The Cake Pattern is meant to help with large (scalable) systems/programs. Is it possible that systems created with Scala tend to be much larger than systems created with Haskell? This in turn might explain why the Cake Pattern is so important in the Scala world and its lack is not such a big issue in the Haskell world?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Question Context: Where there is an exiting Java application or a new project development that is to be written in mostly Java.
We know that we can use Scala from Java and vice versa.
What specific system features are more suited for functional programming. I mean I wouldn't use Scala just because it has a nice feature of executing a passed-in function implementation over the items of a collection nor would I use Scala just for its object orientation capabilities I would just use Java for that.
So going beyond the nice and interesting features of Scala what set of system features make a compelling case to use Scala on a Java project?
where to start, and where to end?
pattern matching
case classes
functions (and higher order ones)
great collections
more object oriented than java, avoid common anti-patterns
type inference -> much less noise
many great options in concurrency. Futures in Java are just so useless compared to Scala ones
traits for composing services
Testing with ScalaTest+ScalaCheck is much much better than JUnit/TestNG/
Akka !
The list is just too long.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
i'm rephrasing my question as it is deemed too opinion based. I will try to be more specific this time.
I wish to learn programming languages to expand my way of thinking and expressing problems:
Here are some background. My purposes for learning specific languages.
Scala as an OO-Functional hybrid for reactive programming
Clojure as a Lisp dialect for experiencing the power of macros
Note that Scala being statically typed and Clojure being dynamic is a bonus for me as i get to learn their pros and cons at the same time
What are the things to pay attention to in the process of learning Prolog that would help me think better?
So far, my research suggests that one of the most powerful feature of Prolog is its ease of implementing "Backtracking".
previous Version:
I figured I should learn prolog to add to my arsenal of programming.
But what is the essence of prolog? As in, what are the main features
and what should I expect to take away from the experience?
It would be nice to compare to Scala and Clojure as they're my
language of choice at the moment. I'm learning Scala mainly for actor
model/reactive programming, and the OO and functional approaches seem
really powerful to me. I took up Clojure because I wanted to pick up a
Lisp dialect to experience the power of macros, and so far, Clojure
had the most momentum. So what extras would Prolog give me?
Can I get those benefits/experience/features in Erlang since it's
syntax is derived from Prolog?
Thanks for looking at my question. Hope to hear all those wonderful
answers.