pmjoe

pmjoe

I got some knowledge on Elixir quickly, the language is very simple and straightforward. I feel that even not having a deep understand at the language I could contribute to any codebase. Now, I’m having to learn Scala for a new position and I never been more miserable, to a point that I’m considering a 30% pay cut to jump to another company just to not have to program in Scala anymore.

Just curious to know if this is something that others have experience as well with Scala or any other FP language. Maybe Elixir is just too good :sweat_smile:

First 10 of 17 Posts Switch mode

D4no0

D4no0

I was also trying to learn scala professionally about half a year ago after not being able to find an elixir job for long.

I made a few conclusions about the language for myself:

  1. It has features of FP mixed with features from OOP and imperative, which makes codebases a mess, I like functional languages because they have less complex features, not the other way around;
  2. because of so many features, the ecosystem is fractured into lots of philosophies/frameworks/libraries that all do things in different ways, one worse than the other;
  3. the standard language constructs are designed as an afterthought. Take for example what they call monads and how they are implemented like some kind of list interfaces under the hood, the way you chain them with what they call a for loop is just horrible design that has no reason to be like that.

At this point I would rather pick kotlin, as it is more focused and has a clear goal on what it tries to achieve, while scala tries to do a lot of things and none of them that well.

I would recommend to try out clojure instead, I’ve heard many great things about the language and the revolving ecosystem.

joey_the_snake

joey_the_snake

30% is a large paycut so whatever decision you make, don’t make it quickly.

v0idpwn

v0idpwn

Scala has a learning curve issue, but I don’t think its “miserable” to work with in the long term. Don’t jump the ship too early.

dimitarvp

dimitarvp

You already have pretty solid comments so I’ll only remark that if you don’t want to take a pay cut then you can make a philosophical compromise and look into Golang.

Far from perfect but the one thing it has in common in Elixir is that it’s mostly explicit and self-explanatory.

shishini

shishini

Scala should be amazing

I dont know Scala, but there are good reasons to call it amazing

  1. Interop with Java
  2. I heard that the JVM is faster than the Beam
  3. Zio (zio.dev)
  4. Smart creator who makes very nice videos ( Martin Odersky)
  5. Lost of big projects are built on scala ( spark , akka pekko, play )
  6. It speaks javascript (Scala.js)
  7. Rock the JVM is very Scala centric

There is a lot to like about Scala .. I would say you are lucky to be working in a place where they are using it

SirWerto

SirWerto

Spark/Scala experience for a couple of years here

  1. Toooo many features, specially for the FP part I would say.
  2. The language prefers to be implicit more than explicit. You end up reading the whole codebase to understand just a single file.
  3. People who choose Scala tend to abstraction, so projects tend to be very complex because of that and it becomes difficult to switch from one project to another.

That being said, the language is very likeable and allows you to go deeper in you FP knowledge if it’s whats you want. Just don’t give up on your first try :slight_smile:

Can’t agree more XD

murrgelb

murrgelb

I’ve developed in many functional languages professionally, from various lisps to Haskell, Scala, F# and they differ.

Languages like Haskell and Scala that emphasize development with types are entirely different from most dynamically typed languages. You have to at least get a basic understanding of monads, type classes (implicits) and type systems (which isn’t impossible). This implies a steep learning curve in both, methodology, as well as syntax. To top it all, Scala has one of the most versatile type systems I worked with.

That said, the struggle you are feeling is expected, but the understanding and insights you’ll get are valuable and this will even improve your coding in Elixir. I recommend to get used to it and enjoy the insights into different concepts of software development. Even if it hurts.

dimitarvp

dimitarvp

I am not sure people would reject Scala because it’s difficult to learn. I was left with the impression that the too many paradigms mixed in and too many ways to do the same thing are the main turn-off.

murrgelb

murrgelb

Which I would argue makes it hard to learn :stuck_out_tongue: because you have to learn many techniques to do one thing. And many of these (subtyping, implicits, monads, inheritance) are not trivial, if seen for the first time.

pmjoe

pmjoe OP

Ok, this will be a long answer because I’ll answer all comments in one reply. Bear with me.

@D4no0, indeed, from the FP languages maybe Scala is the one with more open positions. I totally agree with the points you raised.

@joey_the_snake and @v0idpwn , hey, thanks for that. That’s a good advice, it’s hard to take this decisions with your head hot. I’m trying to digest this change for more time.

@dimitarvp, I’m quite productive with Go and I would chose it over Scala at any time. Still, the market is not good right now and I’m kinda of well paid at my current position. I’ll wait for a better opportunity to jump the ship, maybe until there I start to appreciate more Scala, who knows.

@shishini, in theory yes. The language itself is quite nice, but the ecosystem is the worst I’ve ever seen. It’s a niche language and the community is fragmented into multiple types of Scala: Better Python, Better Java, Haskell on the JVM with Cats and then with ZIO, and AKKA. The integration between the JVM and Scala is more of a curse than anything else. It’s not like Erlang and Elixir where they both share the same values.
In theory if you can select a subset of the language that you’ll use it can be enjoyable, but from personal experience every codebase is a mess and is a mix between all types of Scala. It’s crazy hard to understand what is happening.

@SirWerto, yes, the implicit part of the language is the worse. I don’t know why devs have this obsession to make things implicit and “faster” to write and then it becomes a nightmare to read and maintain. It’s crazy that every time I ask questions for more experienced Scala devs at my company they always need to open the file on their IDEs to give any advice. They can’t understand what is happening on a function just by taking a look at the function. This is such a non sense.

@murrgelb, thanks for the advice. I’m mainly a Go developer and working with Scala for the past 2 months has already opened my eyes to so many things. Not that I was not aware of them before, but how some things are made simpler with things like ADTs for example. (but yet, I would choose Go over Scala at any moment :sweat_smile:)

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement