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.
Related
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 2 years ago.
Improve this question
If I use cats in my scala project, would it make migrating to dotty easier or difficult?
I'm not too sure of the ramifications of using a library like this and how hard it will be to eventually migrate over to dotty.
Using any library at all will force you to wait until it is released for Dotty.
For many libraries it will be a smooth migration if they don't use type system intensively, some will have to make some adjustments to provide support for new types, and all macros will need a total rewrite.
AFAIR Cats are making preparations for Dotty (you can see that they even have tests for it). But there is also the rest of TL ecosystem and each part of it will have to prepare for migration individually (while depending on its upstreams).
Personally, I wouldn't expect to migrate to Dotty in production for the first half a year. I would give some time to library author to migrate and test their changes. For now some attempts are being made, but since, not everything is set in stone yet, some libraries prefer to wait till right-before-the-release before they start migration.
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 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
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 7 years ago.
Improve this question
I want to get into Scala and the lift framework, but since there is alot of confusion for me as a PHP programmer. So I got some questions to help me get started.
I want to setup a webserver that runs the lift framework with a Mongo DB backend where do I begin?
What is Apache Tomcat?
What is Jitty?
Is Comet an technology (protocol, design pattern?) or is it an project like Lift?
How can I setup Lift in Mac Os x as development enviroment, I understand I need Eclipse so I have downloaded it but what then? I don't understand how to install Scala.
The Lift wiki has a lot of information to get you started, and I would encourage you to join the mailing list. Where you will find many answers to questions already asked and you can of course ask more :)
Best luck using lift!
Try these series of tutorials http://blog.pboos.ch/2011/03/lift-tutorial-1-dev-environment-setup/
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Does anyone know of a site, newsgroup, message board, etc. where I can submit some of my Scala code to have it "reviewed" by experienced Scala developers? The code works and whatnot, but I'd really like to learn to be more idiomatic when coding Scala, and often I find myself reverting to more imperative like development because I can't find a "better way."
Try on Code Review
My advice is to upload your project to github - make sure to add copyright and licensing information. Then post the one or two relevant short snippets on Code Review and link to your project on github.
Note that there are plenty of questions here on stackoverflow where users have asked to turn something that is imperative to something more functional or idiomatic. The key is to break down your problems into distinct issues you're trying to solve then take the one that has the most chance to get an answer and ask a question about it. If you can make it self contained then that really good. See https://stackoverflow.com/search?tab=relevance&q=%5bscala%5d%20%20idiomatic for some ideas...