Live data from Hacker News

Explicit term inference with Scala 3

scala-lang.org

11–20 of 77 posts

Re: Explicit term inference with Scala 3

#11
post #7
post #2

After a couple weeks of dabbling between Scala and F# to migrate Python and Node.js codebases (at a scaling startup serving big enterprises) I ended up choosing F#. Scala is a beast and the package manager + build tools were giving me headaches. I’m optimistic about the current trajectory with Scala 3 and simplifying the language.

> Scala is a beast and the package manager + build tools were giving me headaches. Ignore them and use maven. It's much better documented, consistent, and backwards-compatible. I struggle to understand why SBT ever gained any popularity, and it should certainly have never been recommended to newcomers.

SBT is easy to use at the beginning, simply because the build files are 1/10 the length of a Maven XML build description, the console output looks better, the build REPL has lots of commands that make things easier, and the simple projects just work fine.

Once you start to dig deeper, you find out that setting multimodule projects is still easier in SBT. And if you decide to dig deep and really learn the build tool, it doesn't really matter which one you choose. But devs that chose SBT as their Scala build tool will probably keep using it.

Re: Explicit term inference with Scala 3

#12

This is a nice write-up, it's beeb some time since I've written Scala and Scala 3 looks promising. Though, I am curious if there is anyone else who shares my mindset on Scala. In a corporate environment, I found it to be an extremely expressive and powerful language but that power comes at a grave price, which I'll try to summarize: - it's difficult to understand other people's code compared to other languages (e.g.…

Agree. It's a shame because I do believe it is very much cultural - it is possible to write very clear, expressive and safe Scala code. But it doesn't seem the community has settled on that as a cultural idiom. Instead they frequently favor maxing out the power of the language and type system at every opportunity and that means you often encounter lines of code that look like a string of hieroglyphics, or functional programming concepts and higher order types thrown at basic simple logic that could be imperatively written with much more clarity.

Re: Explicit term inference with Scala 3

#13

A summary of what Scala is great for: - Safe and high performant concurrent programming. Scala is miles ahead of most other languages here and pretty much on par with the best ones (such as Haskell) - ETL / data transformations. Python is a big player here - but for stable and performant data pipelines, I strongly believe Scala is the better choice. For explorative things, python has the edge though. - Actor systems…

Well said. In some of my older comments I've shat on Scala (compared to Haskell) but after being forced to write Python for a day job, I've realized how good I had it with Scala. Luckily I'll be writing some again soon.

Re: Explicit term inference with Scala 3

#14
post #3
post #2

After a couple weeks of dabbling between Scala and F# to migrate Python and Node.js codebases (at a scaling startup serving big enterprises) I ended up choosing F#. Scala is a beast and the package manager + build tools were giving me headaches. I’m optimistic about the current trajectory with Scala 3 and simplifying the language.

I think F# is really underused - it fills a very similar spot in the trade off space and from what time I have read has excellent design.

My main beef with F# is the .net library -- none of it is written from a functional perspective, which means you're constantly mixing functional and object-oriented paradigms.

Re: Explicit term inference with Scala 3

#16

A summary of what Scala is great for: - Safe and high performant concurrent programming. Scala is miles ahead of most other languages here and pretty much on par with the best ones (such as Haskell) - ETL / data transformations. Python is a big player here - but for stable and performant data pipelines, I strongly believe Scala is the better choice. For explorative things, python has the edge though. - Actor systems…

Scala is incredible for web apps.

I can write my React/JS front end [1] and highly concurrent, real-time scalable backend [2] using the same language, build tools etc.

[1] http://slinky.dev

[2] http://zio.dev

Re: Explicit term inference with Scala 3

#17

A summary of what Scala is great for: - Safe and high performant concurrent programming. Scala is miles ahead of most other languages here and pretty much on par with the best ones (such as Haskell) - ETL / data transformations. Python is a big player here - but for stable and performant data pipelines, I strongly believe Scala is the better choice. For explorative things, python has the edge though. - Actor systems…

"For explorative things, python has the edge" -- I'm a lazy programmer, how can I get contextual auto-complete like I can with Scala (and other type safe languages)?

From my experience, auto-complete for Python shows everything (like JavaScript's), so I end up googling.

Re: Explicit term inference with Scala 3

#18
post #7

Earlier quoted context omitted.

> Scala is a beast and the package manager + build tools were giving me headaches. Ignore them and use maven. It's much better documented, consistent, and backwards-compatible. I struggle to understand why SBT ever gained any popularity, and it should certainly have never been recommended to newcomers.

Personally, I wouldn't recommend Maven to beginners. I would recommend beginners to learn Maven as it is one of the de-facto standards in JVM dependency management, but the documentation is highly confusing and the learning curve is very steep. Beginners will likely struggle with Maven concepts.

I very much disagree; the only people I've known to have trouble with Maven are experienced developers who expected their build tool to work in a very specific way (i.e. that they would define a bunch of commands for it to execute and tell it what to do). For a beginner who comes to it with no preconceptions, maven is very easy: you fill in the parts your XML editor tells you to, list your dependencies, and then run one of their short list of phases for what you want to do: https://maven.apache.org/guides/introduction/introduction-to... . What could be simpler?

Re: Explicit term inference with Scala 3

#19

This is a nice write-up, it's beeb some time since I've written Scala and Scala 3 looks promising. Though, I am curious if there is anyone else who shares my mindset on Scala. In a corporate environment, I found it to be an extremely expressive and powerful language but that power comes at a grave price, which I'll try to summarize: - it's difficult to understand other people's code compared to other languages (e.g.…

Completely agree. I got to work with a Scala codebase for a few months, and those few months were painful indeed. It was well-nigh impossible to make sense of any pre-existing code.

I'm no stranger to diving into a new codebase and trawling my way through spaghetti to make sense of it ... but I absolutely do not want to do this with a Scala codebase ever again.

Re: Explicit term inference with Scala 3

#20

This is a nice write-up, it's beeb some time since I've written Scala and Scala 3 looks promising. Though, I am curious if there is anyone else who shares my mindset on Scala. In a corporate environment, I found it to be an extremely expressive and powerful language but that power comes at a grave price, which I'll try to summarize: - it's difficult to understand other people's code compared to other languages (e.g.…

[deleted]
Post reply on HN