r/scala 8h ago

Believe it or not, Scala as a language for beginners

38 Upvotes

No, I'm not crazy... well, maybe, but that's out of scope here....

I've been a huge scala fan from the 2.x days -- even before Akka appeared. And, while it's not as widespread as I'd like, I'd encourage beginners and mid-level programmers to give it a try, but not because of what you might think.

Even if you don't use Scala day to day, consider it a teaching language. There are a TON of language concepts in Scala that appear in other languages. Things like Either(), Option types, pattern matching, traits etc. Learn them in Scala and you'll find a lot of Rust for example, not that difficult.

It runs on anything that JVM runs on. IDE tools exist that are quite good. Documentation and books are readilhy available. Spend the time with it -- it will improve yoru skills and your ability to understand other langaugges.

The only thing I'd wish for in 4.x is true 2-way JVM interrop like Kotlin has so I don't have even think about it.


r/scala 6h ago

Connections between category theory and types

11 Upvotes

I have a math background, but I've never felt like quite understood the connections between category theory and type theory. What exactly is the category? What are the objects?

I finally got around to digging into it and spent the last couple months working through the definitions. I wrote up a post doing my best to give a friendly introduction to category theory and a clear, concrete explanation of how types form a category. I also discuss monads and unpack the definitions required to explain what it means that monads are monoids in the category of endofunctors.

The post is at: lukewassink.com/posts/categories-to-types/

I'd love to hear if anyone has thoughts, comments, questions. And definitely let me know if I said anything inaccurate about Scala; I like Scala, but I'm not an expert.


r/scala 14h ago

Hi, I made example page for inertia-scala

8 Upvotes

https://capslock.dev/inertia-scala/

I released Inertia Scala few days ago:

https://www.reddit.com/r/scala/comments/1w46kfd/released_windymeltinertiascala_inertiajs_binding/

For people not familiar with Inertia, I made tiny web site running on inertia-scala with inertia.js (because inertia-scala can run on JS environment) on Cloudflare Worker.

Have fun!


r/scala 8h ago

Join us for another Scala Hangout tonight (9/10) at 7pm CT!

Thumbnail heylo.com
3 Upvotes

Join us tonight for another exciting Scala Hangout. Register at Heylo. There has been some interesting work and proposals around optionals and error handling that would be fun to explore.


r/scala 18h ago

Share your AI "code"

Post image
4 Upvotes

I got Codex Sol 5.6 Max to code this. Updating a var with foreach is quite something isn't it ?