What is your honest opinion on the Haskell programming language?

What is your honest opinion on the Haskell programming language?

Other urls found in this thread:

cinnober.com/hubfs/Website_2016/content/White papers/The-benefits-of-Java-white-paper-1.pdf?t=1504622649992
twitter.com/SFWRedditVideos

Laziness is a bad idea.

it's the best tool for learning functional programming concepts. other than that it's rather useless outside academia

>list with 1000000 elements
>add an element to the end of the list
>1000001 elements get copied into a brand new list
>cue Haskell users wondering why their toy language doesn't take off in the enterprise

See and Also, they haven't even been able to ship a sane compiler for almost 20 years.

focking this, mate

there are highly efficient vector and sequence modules

Conceptually it is a good idea.
But I don't know if it's a good idea for a useful programming language.
It might be better if haskell gets replaced by something strict as THE functional language to program in.


Then simply don't use a list, you fucktard.
The good thing about this language is that you don't even need to change your code much if you make it an instance whatever you need.

>doesn't take off in the enterprise
>what is finance

-- ([a], [a])

add_first x (xs, ys) = (x : xs, ys)
add_last y (xs, ys) = (xs, y : ys)

get_list (xs, ys) = xs ++ reverse ys


Haskell wins again! AGAIN! CUTE!

>what is finance
A sector dominated alone by Java and COBOL.
Maybe with C++ and OCaml mixed in, if you believe in the wallstreet meme.

Tedious and difficult to learn, produced binaries are slow. It offers me nothing

>he thinks Java and Cobol are used in the same context as C++ and functional languages
You don't know shit m8

>Tedious
wrong.
>difficult to learn
maybe.

programming is all about side effects. it's too much of a hassle to deal with IO monads and crap to get working programs. otherwise cool. F# is much better for writing code, like lisp, as it isn't strict and asshole about FP

I never said that, illiterate faggot.

But that being said, they are.
You don't know shit, m8.

>1TB of virtual memory

Not brainlet-friendly enough to ever take off, as demonstrated by this very thread. Every halfwit that can't grok monads (let alone how efficient immutable data structures work) necessarily ends up jumping on the efficiency meme-wagon and perpetuating the lie that Haskell is not efficient enough for... well... they never specify. Apparently it's not efficient enough for anything.

>maintaining legacy transaction systems is the same context as doing algorithmic trading
Yet again proving you're a retarded faggot

>programming is all about side effects
If you were competent, you would discover that very little of it is about side-effects.

not him, but C++ and Java are used in trading in exactly the same context

They are same. In fact people use even slower shits there. Get over it, brainlet.

Not at all, no financial firm uses Java for performance critical applications. Most of it is done in C++, sometimes C and asm
>They are same
Oh so you're just baiting

>programming is all about side effects.
that's the stupidest thing i've ever read on Sup Forums

No, were not. I bet, you plebosaur and that >62286387 fagrocket are the same, though.

>m-muh samefag
truly pathetic

you're the samefag, buddy

>Not at all, no financial firm uses Java for performance critical applications.
false
cinnober.com/hubfs/Website_2016/content/White papers/The-benefits-of-Java-white-paper-1.pdf?t=1504622649992

Fun to write from a creative problem solving and/or math standpoint but not particularly useful for anything besides parsers and compilers.

The prelude is pretty crufty and could use an update. Immutable singly-linked lists being a first-class feature means that idiots like this think that you're supposed to use them everywhere, but they are certainly not more important than any other data structure.

Monads are cool but they are not a panacea. Big haskell programs seem to deteriorate into this style where everything just returns a monadic value, which makes it pretty similar to a procedural or object-oriented language. I hope people come up with some new monads to remedy this.

>C++ and functional languages
Don't compare Haskell to C++, moron. Haskell is, like, even higher level than Python.

i'm currently at work at a financial firm that uses java for performance critical software. Can confirm there's constant memory and performance and indian code issues.

Sounds more like your own fault.
No problem here, with my Azul JVM and Excelsoir JET compiler.
/shilling

>implying I compared them
Learn to read
>higher level than Python
You don't know what you're talking about

>Monads are cool but they are not a panacea.
I wasn't implying anywhere that monads are a panacea. It was just an example of a typical stumbling block.

>Big haskell programs seem to deteriorate into this style where everything just returns a monadic value
I don't see why that would be the case unless the bulk of your program is I/O handling.

>any functional mumbo jumbo in real world finance
kek no
t. QA desk at footsie IB

kindly pull the giant FP abstraction you have jammed up your ass out and take a look at what computers are used for

You clearly attempted to indicate some sort of analogy such as follows. Learn to write.

Java : Cobol :: C++ : Functional Languages

>unless the bulk of your program is I/O handling.
So basically everything except babbies first servers, converters and compilers.

>Azul JVM
i don't write the code, i just fix the system after the fact. honestly i'd like to bring up azul & excelsior

i'm not trying to advocate a purely side-effect-free approach like haskell, but saying programming is all about side effects just means you're a bad programmer. if you can't do the simplest thing without something undefined happening invisibly then you need to refresh yourself on some basics

No I didn't, fuck off.

>the bulk of every program he's seen consisted of I/O handling
Sounds like babby's first programming job involves nothing more than writing utilities.

I was half kidding. I wonder how much tuning the stock JVMs garbage collector actually helps.
Any experiences here?

>lying on the internet

in haskell's FP perspective, IO is side effect. UI is a side effect. state is a side effect. come on man.

Or browsers, CAD & CAM software, actual web servers, GIS software, most of (You)r computers libraries, DAWs, most industrial software.

And that's why I said I'm not advocating that.

I'm familiar with typeclasses coming from rust traits, but i'm annoyed with the omission of method syntax.

Your inability to properly form your thoughts into words is not my problem, user. Git gud, and stop responding to debate with hostility, it will only get you into trouble in the real world.

Solves the wrong problem. Comes with a shitty standard library.

I don't use it. That's my fucking opinion. Go suck the shit out of my ass hair.

>implying I/O handling is the bulk of the code in any of those examples
>unironically thinking anyone will buy it

>it will only get you into trouble in the real world.
>implying he isn't sperging in his basement after throwing some tantrum at his last and only job about them not using Hasklel

It is. Turns out IO doesn't only mean keyboard interaction.

I'm actually working on an Access solution for a workgroup at an organization right now. I learned VBA on my own to build it and have been training the admin staff how to write SQL and VBA so as to maintain it when my contract is up.

It's a shitty obscure language that nobody uses.

>It is.
My experience conflicts with your assertions. Can you actually prove your claim? Otherwise, kindly fuck off.

Are there some actual FP jobs?
hard more: no clojure and web shit

maybe not but you're assuming i have no clue what i'm talking about when i'm just using the haskell perspective in a fucking thread about haskell. is it good design to write a bunch of functions that throw side effects around that make no sense? no, but side effects are a necessary portion of every program.

Ctrl+f "haskell" in an employment website.

Monads are about encapsulating side effects, not just I/O. Any sufficiently large program is going to have many interconnected parts that cause various side effects with each other (some of those side effects being I/O related). Also, if you want to write performant haskell, you need to use a memory management monad everywhere. Curiously, I think this is one of haskell's strengths that you can do this, whereas in other languages you would need to write some C FFI code just to even get down to that level. Of course you can still do that in haskell too if you really want.

No, I just assumed you didn't read my post. Why would you respond to a statement saying "I don't support all the assertions of the Haskell philosophy" by pointing out the assertions of the Haskell philosophy that don't make sense?

It's fun.
It teaches a lot.
It can do the big stuff if you really want to (though you're probably better off with a language that has more ready-made libraries).

What's to hate?

because you called me a bad programmer and we're gonna nerd fite

I meant OP, the Hasklel sperg. Yes, look at the source code of any browsers.
>My experience
consists of sitting in basements and watching animuh.

Well ok that makes more sense. I take it back, we don't really disagree after all I guess.

>Monads are about encapsulating side effects, not just I/O.
I don't know why you're still moaning on about monads. I never said they are a panacea, that they're just for I/O, or whatever bizarre strawman you're going to pull out of your ass next.

>Any sufficiently large program is going to have many interconnected parts that cause various side effects with each other
Plumbing looks like plumbing in any programming language. If most of your program is just plumbing, feel free to use something more suitable than a functional language. Python should suit you.

>you want to write performant haskell, you need to use a memory management monad everywhere
And once again someone brings up the performance meme without specifying any context.

>browsers
That's the only example on your list that remotely makes sense. Either way, provide evidence or piss off. I'm not interested in discussing your subjective opinions.

>That's the only example on your list that remotely makes sense.
Actually that's the example that makes the least sense, you sperg-o-rama, it was almost a bait part of the list, because big parts of it can be implemented side-effect free. But if you actually knew shit you'd know that instead of falling for it.

representative for Hasklel programmers
/thread

>the best tool for learning functional programming concepts.
That's would probably be a teaching language like Standard ML. Learn Haskell after you've learned an ML.

>spouting opinions without being able to provide a shred of evidence
Typical Sup Forums brainletism.

>not deducing the obvious in your brain
Typical Hasklel brainletism.

>add an element to the end of the list
This is not what linked lists are for. A programmer who doesn't know his way around data structures has no business dissing Haskell. There are many reasons why Haskell sucks, but immutability isn't one.

>pulls an opinion out of his ass
>unable to back it up with any evidence
>i-i-it's obvious!
Off you go, tard.

>produced binaries are slow
No, they are actually quite fast on average, on par with properly warmed-up HotSpot Java, but use much less RAM. The problem (caused by non-eager evaluation) is that the performance is somewhat unpredictable. Small changes to your code are more likely to kill the compiler's ability to optimize it than in a language like Java.

Haskell was an experiment to see if a functional language that defaults to lazy evaluation could be highly optimized. The experiment failed, if you watch any interview of the language designers they will tell you that they no longer care about lazy evaluation.

A misconception about Haskell is that its a pure functional language and that other functional languages like Ocaml and Erlang are only hybrid functional/imperative. This is not true, Haskell is not functional in the mathematical sense, it has state, its not any more pure than say Ocaml. The only difference is the use of monads that try to isolate I/O from program logic. Monads are also a failure which is why no other languages uses them.

That said, Haskell has the prettiestt syntax of any programming language so I wouldnt blame anyone for wanting to learn it over other functional langauges.

Haskell will never become popular with it's shitty syntax. It should have used s-expressions.

I know for a fact that a lot of Vanguard is straight Java

Why is Ocaml so unpopular if it's better? Not to say Haskell itself is popular but still

it doesnt run on windows for one, which is why F# was made

some say SML is better than Ocaml, there are a lot of implementations of SML (Intel just released theirs), there is only one Ocaml implementation

Ocaml is honestly a better and more productive language than Haskell, but lack of use means lack of libraries. Janestreet released their standard library for Ocaml which is called Core, its better for general purpose programming than the standard library that comes with the official Ocaml implementation

Aren't functional languages almost exclusively used in academia or to just learn about algorithms and theoretical CS? why care about general purpose programming if nobody's going to do any with it?
I mean sure erlang is very popular but that's because of its special circumstances. The other FP languages are mostly dead
>Ocaml is honestly a better and more productive language than Haskell
Why learn Haskell then? pretty syntax isn't a good enough reason
Are there any things it does better than other FP langs?

Just about every modern programming langauge has functional programmng features like high order functions, closures, mapping functions. You use high order functions all the time in Javascript. The only difference between functional languages like Ocaml, Elxir, etc is that they use immutable data structures like lists and tuples whereas in a scripting language like Javascript or Ruby you can reassign variables and container objects.

It has some good but too much bad.

The bads:
- significant whitespace
- gc instead of region-based (see: MLKit)
- laziness
- forced immutability instead of immutability by default with an easy override
- many libraries but they're all absolute trash (some are downright incorrect, most are so incomplete it would be faster to rewrite from scratch than to learn to use them)
- bad support for language extension (e.g. macros or other mechanisms for DSLs)

The goods:
- the type system
- the ffi
- it's pretty fast
- strong static typing with great type inference
- the case-based (thus extensible) function definition
- pattern matching
- the module system

The missing nice-to-haves
- no ability to modify a running image (see: lisps)
- no idiosyncrasy

I'll repeat: Monads are not just about I/O. Look at all the instances of Monad in the prelude if you want to see more of why this is. This tip will serve you well if you wish to write more haskell. And yes, there is plumbing in haskell, but the benefit is that you can write a lot of it in haskell. Python is a poor example because there is still tons and tons of plumbing in that, perhaps moreso than in haskell. It's one of those languages where you need to dive into C FFI if you want to get anywhere with it.

There is no performance meme in haskell. The issue has to do with how you need to implement efficient data structures that map correctly to immutable data types without creating too many thunks. If you want an easy to understand context for plebs about the issue I'm talking about, look at the history of how hash tables have been implemented in haskell.

As others have said, OCaml is a much better language than Haskell. The former is at least not afraid of using side effects when necessary.
An even better choice would be any Lisp.

People complain about Common Lisp "encouraging procedural programming", not at all. It's simply a truly unopinionated language. Just because it allows functional programming it doesn't mean it has to force it down your throat. That's why most purely functional languages will never be relevant.

It seems like a "trendy" language that has no use other than javascript type "web portal" interpreters that let kids roleplay as programmers for an hour or two.

So is TIAA.

Common lisp is extremely opinionated. In fact, there's a reason nobody seriously uses higher-order functions in common lisp: the nature of lisp-2's is that using functional-like constructs in them makes an unsolvable mess. Thus the opinion. Common lisp is antiquated in that regard. The only reason to use it is the compilers. The GCs are shit, the libraries are shit, the standard tools are shit and the language itself is cumbersome. Schemes are significantly better in all regards but the libraries, but no implementation has a good compiler.

Ocaml is a better language than haskell in almost all ways in a similar way that schemes are better than cl in almost all ways, but ocaml can't into parallelism while haskell does not have that problem. Also ocaml has so many fewer users that libraries are a much bigger issue. Plus there are lots of conflicting problems such as different standard libraries (in particular, the "normal" standard libraries is full of bugs and actually unusable for general programming, for instance). It ultimately has much of the same problems as haskell, though not all.

Haskell is the best way to learn FP.

> bad support for language extension (e.g. macros or other mechanisms for DSLs)
template haskell is actually equivalent to lisp macros

>no ability to modify a running image
this would not make sense in haskell as it's based on lambda calculus, not the turing machine, despite both of them being functionally equivalent

>laziness, forced immutability
i agree these are dumb and useless for a lot of programs, but they're the only real reasons to write in a pure functional language

>this would not make sense in haskell as it's based on lambda calculus, not the turing machine, despite both of them being functionally equivalent
Lisp is based on lambda calculus and does not have that problem. Moreover, the fully functional model of haskell implies this would make even more sense than in lisp where methods can have side-effects, since what you're replacing, and what you're replacing it with, cannot fuck up your global states or work in fucked up ways due to the current state of the global states, or whatnot.

>template haskell is actually equivalent to lisp macros
Template haskell is hacky as all fuck is the main problem. The lack of homoiconicity also makes it nowhere near as nice as the lisp stuff.

>Aren't functional languages almost exclusively used in academia or to just learn about algorithms and theoretical CS?
The primary benefit of functional languages is increasing productivity. However to realize those benefits you need skilled programmers, not just whoever you can hire straight out of university cheapest.

>What is a doubly linked list?


I don't think you should compare Lisp to Haskell.
They have different goals, different paradigms and different advantages/disadvantages..


Haskell is like the death star:
"You just wait, Tatooine! In five days I'm close enough to vaporize you!"

I guess what I'm trying to say is, Haskell makes difficult problems easy and easy problems difficult.

>Schemes are significantly better in all regards but the libraries, but no implementation has a good compiler.
Racket has pretty good libraries, and Racket 7 will use the Chez Scheme compiler which is great.

>Uhhhh what is immutability guys??? And why is it important

I've heard a person in the biz say that it's Azul or bust. You couldn't turn HotSpot in real-time.

>skilled programmers
How do you measure skill in that case?
Most people who use FP are scientists, and scientists are notoriously bad programmers

why do we get daily Haskell threads but there is hardly ever a thread about erlang or any other functional language?

useless and shit