Hey, I’ve recently gotten interested in learning Elixir, but I’m also currently learning Go. I haven’t invested too much time in Go yet, and now I’m having second thoughts about whether I should continue with Go or switch to Elixir. I’m mainly focused on learning backend development as of now. Do you think Elixir would be a good choice for backend development, or should I stick with Go for now?
#Elixer? or stick to Go(lang)? [backend] (both are new to me)
47 messages · Page 1 of 1 (latest)
Hi, @bitter token! It really depends on what you're looking to make, I think. I don't know a lot about Go, but I know a bunch of people here are quite familiar with it. When you say backend, do you mean.. Backend (Applications), Backend (Web), Backend (Mobile Apps), Backend (Video Games), Backend (Servers) or all the other flavours
Hi, I am looking for backend (web) but isn’t the rest too similar? Atleast mobile apps I can think of must be real close to web. Not sure about servers
No worries. So Elixir's biggest draw is it's concurrency model which has spawned heaps of valuable libraries like Phoenix and tools for database management like Ecto. As a not-very-experienced web developer, backend or otherwise, I can whole-heartedly say that Elixir made this incredibly simple. I came from an OO background, stumbled hard with a lack of return function and a simple for loop, but eventually it just clicked. If you want a language that you can run when you start coding, recompile as you are developing and won't hard crash when you give it bad data (you have to REALLY try to make it crash), Elixir is absolutely 💪.
With how you write your code, you'll have so many ways to improve as you look back with more knowledge. Frankly, the dev experience is fantastic. The one piece of advice I'd give is "Learn to read the docs". Not skim, not copy paste, comprehend and understand the docs; because they are, in most cases, documentation-as-code through @spec (typespec).
Again, I don't know much about Go but I read it was made by Google so it's likely not a syntax I would enjoy; that and it'd be bloated and scale poorly. These are assumptions with bias, of course.
If you're familiar with Python or Lua, Elixir is kinda like.. A step below that, where Lua's socket library you need to include or Python's requests module are just there, part of what you write. Enough rambling though; I recommend even if you don't end up using Elixir, you will certainly find value in the way you write code using practical functional programming. It's not Haskell tier "Need a doctorate in mathematics and computer studies" to do stuff, this is difficult until you get over the initial syntactic wall; then it's easier than most languages out there ever written.
Phoenix is a web framework for the Elixir programming language that gives you peace of mind from development to production
Plenty of people here do not like Go, and obviously people here are gonna be biased towards Elixir 😅 but practically speaking, if you care more about getting a job, it'll probably be easier with Go than with Elixir.... But learning Elixir is still a really good idea, it will teach you ways of thinking that other languages won't necessarily
#off-topic message
if this doesn't bother you and you don't crave elegancy, laconic and fancy, then Go might be just alright for you, and also Go is easier to distribute
Go compile targets with x64 and ARM is definitely better than Elixir's (although not be much in terms of a pratical standpoint). However, while Go looks initially easy to use, especially with its C like syntax, it is completely rife with a lot of gotchas that you have to embrace before you get confident with it. Because Go allows you "do whatever the hell you want" with its ergonomics, you can quite easily overlook the assortment of mistakes you'll make:, see https://100go.co/
And given how opinionated it is, a style guide is much needed, but the Go runtimes gives you a vague direction in Effective Go with few actual examples and doesn't give you many takeaways in a digestable form. As such, you would need to go through this: https://github.com/uber-go/guide/blob/master/style.md
I've done Go and Elixir professionally, and I really dislike Go's ergonomics. Go saps the fun of programming and provides you sharp razors to cut yourself with, but at least the razors are simple and not lawnmowers.
oh, right
try out Elixir track on Exercism and see how it tastes for you syntax wise
one of biggest problem you might encounter in Elixir is that it insists on you to think quite different on the problems that Go solves with blatancy, especially since Go often doesn't have prefire (standard library) solution, and Elixir often might
I do care about getting a job, will be graduating soon and have already wasted a lot of time time. Didn’t even get my hands on DSA properly to pass the company’s OA tests.
I’m trying to ditch js, every other guy I talk to is using js and I have tried js obvious for front end, I didn’t like it much. For backend I do have good choices so I’m trying to figure out which one should I go for all in.
Hey, thank you for getting into depths and explaining it all to me.
So prolly stick to golang for now and visit elixir (just noticed I wrote elixer) later, though I want to try it but it would be time consuming for me to do both, is what I think.
If your end goal is to get a job, Go is the safer bet, but you will be dealing with a lot of it. Ultimately, the better option depends on your locality. Java, for instance, would be safer in some regions than Go
There is no such thing as a small amount of Go
Well my end goal is looking for opportunities overseas, will although start with getting some experience from a startup (best place to learn, I’ve heard).
I would disagree there with startups, it really depends on the startup
For example, you go into a startup and you're expected to just code without people helping you
That is not a place you want to be to begin your career
Well yeah this is one thing, getting help in startup’s is kinda hard
Then, simply put, don't do startups
How do I directly jump to a good company, I really didn’t do anything in my engineering, really sad about it. I thought this would be a good path, some experience and then into a good product based company maybe
You don't.
I did, but cannot count them or add all of them to show on my profile
Then you hope that you're good enough and that the place you are at knows what to expect from you
What do I do
Do I know your life situation?
Do I know where you live, your circumstances and everything that lead you to this point? If I was completely irresponsible, I would tell you do to some crypto gig and (maybe) get paid
Just do things earnestly, be honest, try not to panic
Everyone does that.
And people who have it together sometimes don't, or know where they sit
Started from Elixir or golang to now me thinking about getting career advice from someone on what to do and how to do…
Your best.
Regarding the original question:
I don't think it has to be an either or, it's good to know several different tools and getting a bit into functional programming if you haven't done it before can be really enlightening in some ways and might help you in other languages you are working in, it was like that for me.
Elixir is a pretty nice intro to that, and the concurrency stuff is great.
Lack of static types is a big problem for me in Elixir and would make me reconsider starting a new project with it, so if that's something important to you, it might be worth considering before you start working on larger scale things.
I think you meant lack of compile time checks, which guards kinda cover 
That's what static typing means, the type must be known at compile time.
Elixir is currently a strongly, dynamically typed language, not statically typed.
Guards do not cover that, no, they are runtime checks. If you have a guard on a function and attempt to call that function, the process will throw at runtime with a function clause error.
I realized this discussion falls outside of post's topic, so whatever
Static or dynamic types doesn’t bother me at this point of my coding journey, I’ve used both cpp and python and I’m okay with either declaration type
I understood absolutely nothing apart from elixir is dynamically typed
tldr you can't always ensure you accept and return the right type before runtime
In cpp if you write a function that takes an int and try and pass it something else, the program doesn't even compile. You can't even run the program. In Elixir if you do it, it compiles just fine and doesn't blow up until you try and run your program later.
Oh I see, so it’s a bad thing for a lang right?
no, definitely not, it's just a property of certain languages that you should be aware of and some people like certain properties more than others
in Elixir, due to pattern match in function signatures and multiple function clauses, you can create both miracles and atrocities
It’s a personal preference, I do not like it very much is what I’m saying but for you it might be fine!