Live data from Hacker News

Scala Native with Denys Shabalin – Software Engineering Daily Podcast

softwareengineeringdaily.com

21–30 of 42 posts

Re: Scala Native with Denys Shabalin – Software Engineering Daily Podcast

#21
post #17

Earlier quoted context omitted.

The language is more powerful, Rust still doesn't have HKT support. The maturity of the eco-system. Not having to deal with the borrow checker. In any case, I would say in such cases OCaml and Haskell are also good candidates.

Rust is in a different league altogether. Scala, Haskell, OCaml are garbage collected languages. This makes them easier to use, but some problems are out of reach. Embedded development, kernels, native apps requiring performance without frames dropped, real-time systems actually, including consumer stuff like decoding video, these have been the domain of C/C++. Of course, there are projects out there using these lang…

Java is doing quite well in such domains, including real time control of battleship weapon systems and missile radar controls.

The ongoing NLL work proves ergonomics are still not there, and it doesn't cover all scenarios like internal references as done typically for callbacks in GUI widgets.

It will surely improve, and the best thing for polyglot developers is that we can easily pick the best tool for the job.

Re: Scala Native with Denys Shabalin – Software Engineering Daily Podcast

#22
post #6

Why would you compile Scala natively itself instead of compiling JVM bytecode?

Interesting question - I hadn't thought about compiling the JVM bytecode to machine code. It looks like there is a Java frontend for LLVM that achieves that: https://llvm.org/svn/llvm-project/java/trunk/docs/java-front...

One of the things that appeals to me about Scala Native is its interoperability with C, which I suspect is something that the LLVM Java frontend doesn't provide.

Re: Scala Native with Denys Shabalin – Software Engineering Daily Podcast

#23

Im actually quite interested in why teams choose to use Scala if youre not fitting it into an existing JVM shop.

The only competing production-capable languages are Haskell, OCaml, and maybe F#

And Swift if targeting Apple devices is enough.

Re: Scala Native with Denys Shabalin – Software Engineering Daily Podcast

#24

Im actually quite interested in why teams choose to use Scala if youre not fitting it into an existing JVM shop.

The only competing production-capable languages are Haskell, OCaml, and maybe F#

I'd include Rust on your list (if we're defining production-capable at a level where Scala Native qualifies), and maybe even Idris.

I do think Scala still has advantages: higher-kinded type support which OCaml and F# don't have, strict evaluation unlike Haskell, and better IDE/tool support than any except F#.

Re: Scala Native with Denys Shabalin – Software Engineering Daily Podcast

#25

Any reason to use Scala native when Rust exists?

Higher-kinded types (worth it for this alone), existing library ecosystem, better tool support, politics. I do hope Rust reaches a stage where it can a substitute for Scala, but without HKT it will never be as productive.

Re: Scala Native with Denys Shabalin – Software Engineering Daily Podcast

#26

Why is the transcript a PDF? It's unreadable on mobile. Do they think people are going to print it out, like Knuth reading his email?

Are you using a rooted Android phone? There are open PDF readers that you can flash as an apk into your rom image, if you’re trying to avoid spammy adware from the market. Apple supports PDF files on iPhones natively, by default.

Re: Scala Native with Denys Shabalin – Software Engineering Daily Podcast

#27

Why is the transcript a PDF? It's unreadable on mobile. Do they think people are going to print it out, like Knuth reading his email?

there are various tools online to view PDFs without even downloading them. For example, google docs has one: https://docs.google.com/viewerng/viewer?url=https://software...

Re: Scala Native with Denys Shabalin – Software Engineering Daily Podcast

#28

I wasn't familiar with Scala prior to listening to this episode, so I enjoyed that it provided both a background on the traditional, JVM-based Scala, as well as the new Scala Native project, which I'm more inclined to use.

There is a third backend, Scala.js https://www.scala-js.org

Based on the same principle as Scala Native, this one outputs javascript.

I've written a couple of projects where both the backend and front end is written in Scala, using one project, with different sub-projects for frontend/backend.

Scala.js will probably not convert Javascript developers en masse, but its very handy for Scala developers that prefer to write Scala to Javascript.

Re: Scala Native with Denys Shabalin – Software Engineering Daily Podcast

#30

Im actually quite interested in why teams choose to use Scala if youre not fitting it into an existing JVM shop.

Even if you aren't fitting it in to an existing JVM shop, the available libraries on the JVM beat anything else for variety and quality. There are specific niches (e.g. visualization of data) that you can find better options, but if you don't know exactly what your project is going to entail in advance, JVM is the safest choice.
Post reply on HN