[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Should I learn Scala or Haskell?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 65
Thread images: 1

File: download.jpg (6KB, 337x149px) Image search: [Google]
download.jpg
6KB, 337x149px
>>
Learn C++ and stop being a fucking hipster
>>
>>60709052
Haskell
>>
PureScript
>>
>>60709052

Learn Haskell.

If you knwo Haskell, Scala will be easy to pick up.


But beware, both are difficult languages.
>>
HTML
>>
>>60709097
>>60709136
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.
>>
>>60709161

Then Haskell is a very good idea.

A good strating point might be:
>http://learnyouahaskell.com/chapters


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.
>>
>>60709243
sweet! thanks i'll spend rest of the day/week going through this
>>
>>60709052
Haskell
>>
>>60709161
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
>>
>>60709441
>>60709440
excellent, thanks!
>>
what problems does haskell solve really well?
>>
http://www.lihaoyi.com/post/WartsoftheScalaProgrammingLanguage.html
>>
>>60709161
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.
https://doc.rust-lang.org/book/
>>
>>60709528
Making you a better programmer. Other than that, it's almost not used in the industry.
>>
>>60709052
> fell for the scala meme
>>
>>60709972
Then wouldn't learning scala be better
>>
>>60709953

Nope.
>>
>>60710212
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
>>
>>60709953
Why would anyone learn Rust when D or even Ada provide the same benefits with greater speeds and less bullshit?
>>
>>60710335
OK, will do. Thanks anon. I now have the from first principles book!
>>
>>60710439
Because both languages you mentioned are dead.
>>
>>60710452
So the only reason to use a shittier language is because a bunch of autist like shilling for it everywhere? Fair enough.
>>
>>60710516
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?
>>
>>60710667
If you understand the functional aspect of scala then it's not too hard I think.
>>
>>60710864
k
>>
>>60710212
Learning different languages is always good. Scala though is far from being as efficient as Rust. I'd also say that Rust is easier.
>>60710264
Why?
>>60710439
>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.
>>60710516
>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?
>>
>>60709052
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.
>>
>>60709052
I don't see the point of Scala over Java.

>but muh functional programming

Then just use Haskell.
>>
>>60710924
Oh, yes, it's also taken the first place as the most beloved language on StackOverflow for 2 years. Only /g/ hates on something new and innovative.
>>
>>60710995
You can get functional programming on top of JVM. Seens pretty good to me.
>>
>>60710884
I can't say anything else as I learned Haskell first and then Scala.
>>
>>60711016
/g/ doesn't hate it, it's just a couple of autists who spam /pol/-tier copypasta about sjw and cucks every time you mention Rust.
>>
>>60711064
How easy was it to go from Haskell to Scala?
>>
>>60710924
>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.

>>60711016
How's Ruby treating yah?
>>
>>60710984
I would argue Haskell is the ultimate learning language. Like learning Lisp, learning haskell makes you a better programmer.
>>
>>60709052
Learn Hoon instead.
>>
>>60710335
Is Haskell more difficult than Lisp?
>>
>>60711372
>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.
>>
>>60709077
After three years spent studying Haskell, I realized that Perl and C++ are the true way to get things done.
>>
>>60709052
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.
>>
>>60710924
>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.
>>
>>60712601
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.
>>
>>60709052
Have you ever seen an Haskell programmer actually employed? Guess the choice is simple.

>inb4 unemployed haskell meme
Show me your paycheck then.
>>
>>60709052
Learn C#

Literally the only choice
>>
>>60712783
>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?
>>
>>60712849
That Haskell is a pleb filter?
>>
>>60712849
>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.
>>
>>60712394
Amen brother
>>
>>60712849
>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
>>
>>60712849
Basically you will be taking -20% salary hit because "hey, our job is cool, you get to use Haskell".
>>
>>60712601
its
its
>>
>>60713327
Then do you recommend kids learn Scala because they're be employable? Facebook hires Haskll'ers.
>>
>>60713376
Sorry :-(
>>
>>60713384

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.
>>
>>60713771
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.
>>
>>60709052
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
>>
>>60709052
Haskell
>>
>>60709052
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.
>>
>>60714652
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
Thread posts: 65
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.