Type erasure: Rust vs Scala [closed] - scala

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 7 years ago.
Improve this question
I program in Scala. I'm fairly versed.
Now, Rust has caught my eye. It looks good. Like it might be another language I would like to have under my belt.
From time to time, when I want to go crazy with types and still have compile time safety, I run into problems, one of which is type erasure.
Is there much difference between the two? Would it be easier to implement this question in Rust? Does Rust have type erasure?
PS. I hope this question is not too vague. Just want to have an overview of the main difference when it comes to types and generics.

Scala is GC language and has JVM runtime so it can tap into JVM ecosystem (clojure, java, groovy, ...), Rust is well known for it's trademark ownership approach which gives a lot more safety guarantees at compile time.
Rest of the differences can be neglected I believe.

Related

Is the Cake Pattern missing from Haskell? Why and when would I need to use the Cake Pattern in Haskell? [closed]

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?

Using Scala in the real world [closed]

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.

Getting started with Prolog [closed]

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.

how do i start learning shapeless concepts in scala [closed]

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

Difference between obsolete and waste code [closed]

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 10 years ago.
Improve this question
What is the difference between terms: "obsolete code" and "waste code"?
If there is the difference, what approaches are eligible for its reduction?
Obsolete code:
Code that may have been useful in the past, but is no longer used, e.g. code to use a deprecated protocol.
Waste code:
Never heard of the term, but I'd imagine - code that may or may not be executed that can be removed without changing workings of the application. I'd imagine this would include obsolete code.
Either of the above can range from single statements to entire libraries.
Personally I would say that obsolete code are methods that are there, but aren't used any more. Like for example deprecated methods/functions. Waste code would I define as code that has as only function to slow the application down.