...
Should I learn Scala or Haskell?
Other urls found in this thread:
learnyouahaskell.com
lihaoyi.com
doc.rust-lang.org
twitter.com
Learn C++ and stop being a fucking hipster
Haskell
PureScript
Learn Haskell.
If you knwo Haskell, Scala will be easy to pick up.
But beware, both are difficult languages.
HTML
Thanks for the replies.
What are beginner sources to learn Haskell. Do you know of any beginner tutorials for building cool things in Haskell?
Also, what major companies use it? In my classes we learn Java, C, ASM, etc.. I am bored of those. Want to branch to functional programming land over the summer.
Then Haskell is a very good idea.
A good strating point might be:
>learnyouahaskell.com
BTW Haskell is not that important as single language to know. IF you only look for a Job, Java and/or JavaScript is still your best bet.
But Haskell will upvote your C.V. if you apply somewhere. Also it's fun and a good experience.
sweet! thanks i'll spend rest of the day/week going through this
Haskell
Book called Haskell Programming from First Principles has been way better for me than learnyouahaskell. Try the requests board or something, would upload it but on mobile
excellent, thanks!
what problems does haskell solve really well?
Learn Rust too. It's a great language with functional taste, but not pure functional. For example, functional languages do not allow mutability for safety and you have to use persistent data structures, which are inefficient. Rust allows mutability and keeps it safe through its ownership, borrowing, and lifetimes principles. It's the best of two worlds. Just try it and don't listen to the idiots who only talk bullshit like "you only need C", or " hurr durr SJW".
This is the official Rust book, it's great.
doc.rust-lang.org
Making you a better programmer. Other than that, it's almost not used in the industry.
> fell for the scala meme
Then wouldn't learning scala be better
Nope.
Haskell is a meme, but Scala is fucking dead and nobody will bat an eyelid if you tell them that you know it.
Learn Haskell, it will be fun and you might be able to woo the interviewer because of its reputation as a difficult language to grasp (it's really not, by the way), but don't expect to use it at work at any capacity beyond simple personal-use scripts if you can be bothered to use it that way
Why would anyone learn Rust when D or even Ada provide the same benefits with greater speeds and less bullshit?
OK, will do. Thanks user. I now have the from first principles book!
Because both languages you mentioned are dead.
So the only reason to use a shittier language is because a bunch of autist like shilling for it everywhere? Fair enough.
No, but that's reason enough not to waste your time on failed languages with niche or no presence, especially they offer no innovation and are just a rehearsal of the same old concepts from the 80s. I mean, I guess it's worth learning Ada if you're looking for a job in the Aviation industry, but there's no reason to waste your time on D ever.
Curious, how easy is it to go from:
Scala -> Haskell, if you already know Scala?
If you understand the functional aspect of scala then it's not too hard I think.
k
Learning different languages is always good. Scala though is far from being as efficient as Rust. I'd also say that Rust is easier.
Why?
>D
Garbage collection, slow. Rust prevents all data races, memory leaks, etc, and doesn't need garbage collection for that.
>Ada
Lacks features like bitwise operators, macros. It's too high-level.
>low-level, systems programming language
>no need in garbage collection
>complete memory safety, no data races
>highly concurrent
>just as fast as C++ in single threaded applications
>almost always faster than C++ in multi-threaded, or just as fast
>Rust has more optimization potential. Currently isn't implemented due to LLVM limitations, but is being fixed.
>great package management (cargo)
>compilation errors are very helpful, in 95% they tell you what exactly you're doing wrong
>statically typed, but has powerful type inference (compile time, of course)
>traits
>pattern matching
How's this a "shittier" language?
Haskell is a toy language, or more specifically: a type theory lab for programming language researchers.
Your don't believe me? consider this: it's been almost 30 years since they started developing the language, and yet, we don't have a proper and unified fucking STRING TYPE!! HOLY FUCKING SHIT! Haskell currently have 5 different "semi-standard" types for strings, and interoperability between libraries is fucking hell, I mean, String itself is a FUCKING CONS LIST!!!!! DO YOU EVEN KNOW HOW STUPID THAT IS IN TERMS OF PERFORMANCE??? GOD DAMN IT, HASKELL IS BULLSHIT. JUST FORGET ABOUT IT.
Scala on the other side is also shit, but for completely different reasons. But, at least you could get a job as a Scala programmer one day.
I don't see the point of Scala over Java.
>but muh functional programming
Then just use Haskell.
Oh, yes, it's also taken the first place as the most beloved language on StackOverflow for 2 years. Only Sup Forums hates on something new and innovative.
You can get functional programming on top of JVM. Seens pretty good to me.
I can't say anything else as I learned Haskell first and then Scala.
Sup Forums doesn't hate it, it's just a couple of autists who spam Sup Forums-tier copypasta about sjw and cucks every time you mention Rust.
How easy was it to go from Haskell to Scala?
>Garbage collection, slow.
D is as fast or faster than C++ without any sacrifices, while rust must be made unsafe to even match C++.
>Rust prevents all data races, memory leaks, etc, and doesn't need garbage collection for that.
Simple Rust code allows for that, but more complex manipulations are even admitted in the documentation that they will never release ownership and actively tells you to not use said functions except in a very specific manner. This is C-tier level of wishful thinking in regards to memory features.
>Lacks features like bitwise operators
Oh, I get, you are just an idiot who can't google.
>macros
Pls kill yourself.
How's Ruby treating yah?
I would argue Haskell is the ultimate learning language. Like learning Lisp, learning haskell makes you a better programmer.
bump
Learn Hoon instead.
Is Haskell more difficult than Lisp?
>Like learning Lisp, learning haskell makes you a better programmer.
No, it doesn't. Learning math makes you a better programmer. Trouble is, most programmers can't learn math because they don't have the wetware for it.
After three years spent studying Haskell, I realized that Perl and C++ are the true way to get things done.
If you just want to learn a functional language learn Scheme from SICP+additional learning materials.Generally, scheme books teach you not only the language, but some CS also.
>How's this a "shittier" language?
It's ugly as fuck, almost unintelligible and it's trying to implement all features of other languages and as a result becomes more messy and unintelligible.
Rust claims to solve the problem with C++ but it's already an unintelligible mess. C++ needed 20 years to become messy but at least is battle tested and mature while Rust became this mess in 2 years and it doesn't even have a standard library.
In programming less is more and therefore Go with the nice intelligible syntax and careful selection of features like concurrency seems a lot better and a language build to last, just like C.
I don't know either Rust or Go, so I may be wrong. By reading the documentation I liked Go and the ways you can use it's features. Go gave a high precision vibe like C or Haskell. While Rust felt like an ugly hacky scripting language that is already breaking under it's own weight.
Go is a nice language with no compelling niche. Sure, like with all designed things, there's a trade-off of features and quirks, but it's main issue is that there's isn't a usercase where using Go is worth rewriting tons of stuff.
Have you ever seen an Haskell programmer actually employed? Guess the choice is simple.
>inb4 unemployed haskell meme
Show me your paycheck then.
Learn C#
Literally the only choice
>hundreds of jobs asking for haskell knowledge
>none actually are solely haskell, and of those that ask for a second language, that's the one they want you to use
What did industry mean by this?
That Haskell is a pleb filter?
>haskell
Haskell is amazing, the most elegant language that I know of. Learning Haskell is an enlightening experience as you realise that the algorithm implemented in Haskell is a 1-to-1 relation to math.
If you understand and can express the solution with math functions, sets and first order logic then it's trivial to implement it in Haskell and often you don't even need to test for correctness because you have formally proved it.
Amen brother
>getting people who are passionate and good
>they can use their favorite language
>you have to pay them less but still get your work done
Banks like to do that for example
Basically you will be taking -20% salary hit because "hey, our job is cool, you get to use Haskell".
its
its
Then do you recommend kids learn Scala because they're be employable? Facebook hires Haskll'ers.
Sorry :-(
Scala lets you do things that are not possible in Java. It's basically the C++ of the JavaVirtualMachine: Great power, much greater responsibility.
Java protects you from so many stupid things, it's verbose but friendly. Haskell can be a b*tch sometimes, but if your program is finally running it does what it should do.
Scala is called "SCAlable LAnguage" for a reason: the tip of the iceberg is super smooth and you can be very productive. But some advanced features can be tricky, very tricky. If you write "correct" scala it's much denser than Java and has about te4h speed of it. But when you do something stupid (often without realizing it) you get fucked in the ass without even noticing.
And last but not least:
You won't get a Scala junior job.
Scala is made for experienced Java Devs that want some more action. But if you are not very good with Java, forget about a Scala position.
Haskell has not many jobs, but IF people like Haskell they will also like you because you do Haskell. It's more a circle of enthusiasts, similar to the LISP community.
Thanks for the response. What would you recommend learning then? I do enough Java in school, so ready to do any FP for a breath of fresh air.
Learn Kotlin, Kotlin is the Java-based language that everyone was hoping that Java would become. Its sort of similar to Swift and has powerful functional features. Nobody ever liked Scala, it was a bad compromise between Java OO and functional programming.
Haskell is always a bad choice unless you want to go whole hog into pure functional programming
Haskell
Do NOT learn haskell. If you're gonna fall for the functional meme I guess Scala is the better choice because it does have some use in industry. I'd recommend Java as a first language for many reasons that have probably been said in here already.
Java is a better first language. No one is actually using Kotlin yet. And with Java 8 you have the functional features anyways. Java will be more useful, and Kotlin will be very easy to pick up after learning it.
There's a reason MIT teaches Scheme in their Introductory CS class.
Scala is used more in companies
Haskell is more cool for weekends projects
Dijkstra liked Haskell. So, Haskell