It's not at all inevitable. I would - indeed do - use Scala for all of the use cases you listed.
It's not at all inevitable. I would - indeed do - use Scala for all of the use cases you listed.
For example, my main language is C++, and my second language is Java. But when the problem I have is picking snippets of text out of a text file, I reach for Perl, because Perl is far better at that than either C++ or Java. I don't want to "reuse the same [C++/Java] tools and techniques" in that domain - it's considerably more painful than using Perl to do it.
I've found that even if I don't need to use a language after I've learned it, the skills and experiences I pick up while learning it improve my code as a programmer.
I've learned how to write fast code in C; learned how to write flexible template code in C++; appreciated the "batteries included" standard libraries of Python; wrote concurrent code in Go; used sum types and functional programming in OCaml.
My friend wrote an article[1] that says there is still no silver bullet for programming, and I agree with her.
Perhaps even if you think it is better to master a single programming language, you might better master it by seeing how other languages approach the same problem.
[1]: https://chameleon.kingdomofmysteries.xyz/articles/harmful/st...
Not convinced. I used to work in a similar way (indeed I would've made a similar argument), using Java for a primary codebase and Python for lightweight scripting around it. But I found that it was possible to adopt a general-purpose language that did both of those well.
Check out this boat car btw! (http://yachtpals.com/boat-car-9158)
It’s a boat. And it’s a car. It’s amazing.
People are so stupid that they’re still buying cars that can’t go in water. When will they learn?
I wonder if it were equally possible with any language.
Could a Python or Java programmer say the same? I think there are probably a handful of languages that you could use for "everything". The limiting constraint is the presence of a reliable javascript compiler, followed by data science libraries (I think).
Scala was explicitly designed as a "scalable language" with both the strong safety guarantees that you need for large-scale development and the lightweight syntax that you need for throwaway scripts. But a lot of modern language design is converging on the same set of features (e.g. static typing for safety but type inference for convenience, pattern matching for the safety of the visitor pattern but the convenience of an if/else) and would have the same abilities. E.g. in a Reddit post about Rust a couple of days ago people were talking about writing web services in Rust, and part of the rationale there is that while Rust may not be the perfect web service language, it's good enough that if you already have Rust in your stack you might well write web services in Rust rather than bringing in a new language. I haven't seen anyone doing data science in Rust yet, but I see no fundamental reason why the language couldn't be adapted for it.
That's the conventional wisdom about GC, but I'm not sure how true it is these days - prototyping a video streaming program in a previous job we were surprised to discover that Haskell performed significantly better than C++ in that role. The JVM GC is quite tuneable and if you're willing to sacrifice throughput for latency you can get it quite low.
(Rust has a lot of good points but I won't be interested until it gets HKT).
> I never really needed recursive types, but that's also something limiting on the JVM.
What do you mean? Recursive types in the sense I'm used to work fine on the JVM; there is even e.g. a recursion-schemes like library for Scala (matryoshka).
It's a terrible idea. Writing and running scripts from Scala is incompatible with certain actions. Specifically provisioning and kernel configuration. There are lots of tasks that Scala is a bad tool.
Even if there’s a Scala transpiler or WASM target - if you think you’re going to ship to production and blissfully never need to know JS...
“It's inevitable you will have multiple languages / platforms comprising your stack.”