318 karma · joined Jan 5, 2019 (7y ago) · 168 submissions
comment 3w ago · link · parent
It seems like your use case is rather not a good fit for Java.
Java shines best with large applications, where more abstract source code is desired and when you care more about typical performance, not the worst case performance. And if you can afford the cost of all those benefits, which is higher RAM usage.
At least that's the theory :)
comment 3w ago · link · parent
If it could help you, we're using JIB. We're on Scala and so we're using sbt-jib. Zero issues, works like a charm, deployment (on k8s) is just not a problem for us. But I would expect that it should work well for Java too.
comment 1mo ago · link · parent
Indeed, everybody knows they have just one type (:
https://www.google.com/search?q=%22dynamic%22+programming+la...
https://cs.stackexchange.com/questions/63533/untyped-vs-unit...
https://semantic-domain.blogspot.com/2022/01/static-typing-v...
comment 3mo ago · link · parent
https://marketplace.visualstudio.com/items?itemName=Oracle.o...
comment 5mo ago · link · parent
Golem is a durable workflow platform and can run any wasm.
comment 8mo ago · link · parent
https://github.com/0xType/0xProto#4-ligatures-that-dont-defo...
I can't recommend 0xProto enough, the only thing I'm sorry about is that I didn't find it sooner :)
comment 9mo ago · link · parent
React Native Skia allegedly runs on Linux too
comment 1y ago · link · parent
https://www.youtube.com/playlist?list=PL0DsGHMPLUWVy9PjI9jOS...
comment 1y ago · link · parent
Are there Clojure libraries that don't use JVM(/JS/...)-specific stuff that works on any Clojure platform/dialect? Can such libraries be used on Jank out of the box? Or do library authors have to do something explicit in their libraries to enable their use in specific platforms/dialects?
comment 1y ago · link · parent
https://mill-build.org/mill/comparisons/why-mill.html#_perfo...
comment 1y ago · link · parent
Now even Java has cheap threads (Loom).
And Go even has generics. Just 20-ish years later than Java. And it's likely that more features that now Java has will trickle into Go. If Go wants to survive.
All this to say that there is no space in the market for another language which is a stupid simple Algol. Go already occupies that space. And even Go will have to add features developers want/need, if it doesn't want to get cornered out of the market.
It's not only Scala that must evolve.
comment 1y ago · link · parent
But one of Scala's strength is versatility. You could use it quite well for all the listed use cases too. With just one language. (Maybe with the exception of system programming -- Scala Native still requires a tracing GC.)
Also, it's worth noting that Scala is more popular/mainstream/supported/has bigger community than Julia, Zig and Elixir / gleam. And if Red Monk is to be trusted, even more than Rust https://redmonk.com/sogrady/2024/09/12/language-rankings-6-2... That comes with many benefits.
> if you don’t need JVM / Java interop
OpenJDK is also very good, even if it's not a strict requirement to use it. Battle-tested, easily debugable, etc... AOT compilation is possible via GaalVM's native-image.
Or you can try Scala.js or Scala Native (which don't have anything to do with JVM).
comment 1y ago · link · parent
Oracle started heavily investing into Java. And Google picked Kotlin as the language for Android.
But Scala hasn't stagnated since. And as the blog post suggest, plans on moving further still. For example, https://docs.scala-lang.org/scala3/reference/experimental/cc... may be one of the most impactful developments in the language's history.
comment 1y ago · link · parent
This is also heavily influenced by the build too you use. Don't use sbt or Maven or Gradle. Use the good stuff. Use Mill.
https://mill-build.org/mill/comparisons/why-mill.html#_perfo...
Or Bleep, if you're feeling more experimental https://bleep.build/ .
comment 1y ago · link · parent
That's not what (at least some) numbers say. Both Scala and Kotlin are 14th.
https://redmonk.com/sogrady/2024/09/12/language-rankings-6-2...
Kotlin may be more popular, but not much. It's nowhere near the mainstream languages like Java, Python, JavaScript, C# or PHP. Not even close to TypeScript.
comment 1y ago · link · parent
Yes, Java has been getting a lot of features Scala has had since (more or less) always. But it's a continuing process, and not all such features are yet fully fleshed out and polished in Java.
Also, Java will probably never get many of important features Scala has (or will have). It may not be some esoteric things, like higher-kinded types. But things like meta-programming/macros. Or features which may be advanced from theoretical point of view, but are actually easy from user point of view (because they lead to a simpler code), like Capture Catching.
comment 1y ago · link · parent
> Yes, it's a very common one shared by virtually all Scala 3 developers. Stop. At least for a couple of years.
I, for one, think Capture Catching can't arrive soon enough. It will allow us to write much simpler programs, getting an edge over modern Java & co. I'm very much looking forward to it.
Don't use experimental Scala features in production code. They may change or be removed. And they will likely lack support in IDEs. But that is a common sense.
comment 1y ago · link · parent
Thankfully not anymore. They got their act together and have been maintaining compatibility since Scala 3.0.0 has been released in May 2021, which is almost 4 years and counting.
https://github.com/scala/scala3/releases/tag/3.0.0
Scala 3.x is to remain compatible for the whole 3.x series (think of semantic versioning). There's no Scala 4 (breaking with Scala 3) in sight.
Also, Scala 3 and Scala 2.13 JARs are also compatible with each other, which helped with the transition.
> 2) The tooling around it is not the best
sbt may not be good. But Mill is much better than either Maven or Gradle. Especially Gradle. Bleep is also promising.
Scalafmt is widely used and liked. Scalafix -- the linter/fixer -- is used a bit less, but still of a good quality.
comment 1y ago · link · parent
* Immutable/persistent collections in standard library
* Machinery to "modify" immutable deeply nested case classes/sealed traits. You have the copy method, you have lens libraries. Very easy and comfortable to use.
* Expression oriented. if/try/etc expression can be bound to a variable
* less characters to write the same idea/program, while not losing readability
* better tooling: Scalafmt is ubiquitously used, supported in IntelliJ and is very good. Scalafix (a linter which can also fix some issues automatically) is used a little bit less, but is also good.
* build tools: while I don't like sbt, Mill is a so much better build tool than Maven or, even worse, Gradle. Then there is also scala-cli, which is not a build tool, but can work like it, if you have a simple, single-module project (i.e. no sub-projects/sub-modules).
comment 1y ago · link · parent
But you can (and people mostly do) use Spark from Python. And Akka/Pekko from Java (but I'm not sure how that is common).
And the job market is there:
https://functional.works-hub.com/jobs/?remote=true&tags=scal...
https://scalajobs.com/locations/remote/
https://remoteok.com/remote-scala-jobs
https://betterremotejobs.com/search?title=scala
https://readytotouch.com/organizers/scala/vacancies?remote=1
https://www.levels.fyi/jobs?searchText=Scala&workArrangement...
https://www.linkedin.com/mwlite/search/jobs?keyword=Scala&lo...
https://discord.com/channels/629491597070827530/629546253381...
https://discord.com/channels/632277896739946517/840255868096...
comment 1y ago · link · parent
If Clojure and Rust work well for you, more power to you. But at least in theory, you could very well use just Scala for these purposes
Scala can compile to JS https://www.scala-js.org/ if you target frontend.
And if you want portability, you can compile a Scala program with GraalVM's native-image and statically link everything with musl libc https://www.graalvm.org/latest/reference-manual/native-image...
And if you want both frontend and portability everywhere, Scala will soon have a support for compiling to WASM (with WASI, etc) https://github.com/scala-wasm/scala-wasm/ (to be integrated into Scala.js after developed)