Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kubre17437yWith Haskell you barely have control what are doing. With C++ you even deallocate memory by yourself
-
spacem18417yI like recursive functions as much as the next guy but fuck Haskell. I need my programming languages to have variables and for loops.
-
@irene so i heard but I've never actually seen it or used it I'd love to learn it just for fun but i already have shit tons of things i need to learn
-
@irene Looks likes it is just a quote for haskell people to say, even mentioned in haskell wiki. https://en.m.wikiquote.org/wiki/...
-
@vkubre ya, that feeling of being in control is warm and fuzzy, except you need decades to be actually in control with c++
-
@idomurrcurr touting that your language is the best and the rest is shit has nothing to do with having a brain. In fact, it has everything to do with begin an elitist jerk with the vision of a horse who can't see past their farmland. Tell them about php and they will slap you with their hooves.
-
@irene it's not *just* runtime check, the unused code paths are eliminated by a compiler by trivial graph traversal. Which can't be trivial in imperative languages, 'cause all the code being impure by default.
-
@Mayhem93 why, not all of them are shit. Just these mainstream ones I've worked with for last fucking decade and have so fed up with them and computer abolitionist assholes defending the right to assign a human to the job computers were fucking invented for over and over again. /rant
-
@irene and I'm barely scratching the surface. Just consider this - functional programming is *very* different, so any assumptions you may have from previous experience are likely incorrect. Mine, for one, were (mostly because being self-taught).
-
@irene It is perfectly possible to program functionally on an imperative language. It's just that languages like haskell force you to write that way. It's not like functional is something unnatural that needs to be converted with overhead. And you can override laziness if really necessary.
-
@irene well the business logic is high-level, and c++, among many other, actually lacks sum types (no, std::optional is months old and probably won't make 90% of existing projects; no, std::variant might or might not land C++ 2020) which forces you emulate them with trees of ifs and cases carefully handling errors with exceptions when you actually need goto, or some AbstractVisitorFactory nonsense you'll forget next day (not sure which is worse).
Consider this instead:
https://fsharpforfunandprofit.com/p...
Designing with types: Making illegal states unrepresentable -
Haskell, in principle, can compile to faster code than C for certain examples.
It uses an intermediate called C-- before compiling, and because Haskell has such a thorough type system, and uses lazy evaluation, GHC can optimize a lot more than GCC.
Strict types and laziness are benefits for the compiler, and they are independent from Haskell being a functional language.
Being a Functional language tends to slow things down: You often use several "loops" (tailrecursive functions like map, zip, filter) instead of doing all operations in one single for loop.
However, that is a tradeoff: such highly abstract building blocks make code safe, concise and modular.
Take point 1 and 2, and you end up with something faster than Java, safer than C and more concise than Python.
In practice, that is where Haskell shines: Ultra correct software for banks, laboratories and engineers, with a package ecosystem highly geared towards abstract math and simulations. -
vertti4537y@bittersweet excellent detailed reply! I was about to barge in saying about the same things but not as neatly phrased.
There is also something called Cloud Haskell now which aims to capture some of the backend development. Although I think it's (and will stay) experimental -
There's a write-up from a yesterday's keynote talk at fby.by by Michael Snoyman explaining why Haskell actually _is_ awesome - https://snoyman.com/blog/2017/...
-
@jschmold
> I much prefer what I'm used to
Good for you! What is it?
> real wonky language with too many hidden intricacies
Care to name a few?
> I wanna read code and "reason about it" without having to lookup a hundred other functions…
That's odd, my experience is quite opposite.
Related Rants
Haskel seems awesome.
rant
haskel
programming
code
programming language