[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Functional Languages
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 33
Thread images: 2
ITT we talk about them and why Haskell is the only one worth learning.
>>
>>51962766
>2016
>Hasklel
Good laff
>>
>>51962766
Clojure
>>
Lens makes Haskell the functional Java
>>
>>51962766
Haskell doesn't even compare to Lisp.

Lisp can be anything: functional, OOP, procedural, weak typed, strong typed, statically typed, etc.

Haskell can only be functional.

It's like comparing apples and The One True God.
>>
>>51963124
why is Lisp not popular?
>>
>>51963486
Because it's terrible and unreadable.
>>
>>51962766
Because aligning everything and counting spaces is fun.
I have never met a haskeller I hate but to use it to solve any real problems baffles me as anything more than having a bit of fun.

I still like hot steamy scheme.
>>
>using functional languages
Why not just use C instead of those cluster fuck """"""""""""""""languages""""""""""""""""""
>>
people still use Lisp?

jesus.
>>
>>51963083
Not sure if this was intended as criticism or not, but lenses actually aren't that bad. I watched a SPJ talk from 2013 recently and he explained them much better than Kmett or any of the tutorial writers ever could have. They're pretty natural, IMHO, though a bit overkill if you're only going to deal with simple and flat-ish datatypes.

Here it is: https://skillsmatter.com/skillscasts/4251-lenses-compositional-data-access-and-manipulation
It's basically the "You could have invented" of lens tutorials.
>>
>>51964675
But you're programming on a computer and not by hand? Aligning stuff is the job of the editor.
>>
File: daily_programming_thread_SICP.jpg (211 KB, 612x816) Image search: [Google]
daily_programming_thread_SICP.jpg
211 KB, 612x816
Is there a book like SICP but for Haskell?
>>
Has anyone been following the 24 days of Hackage this year? I've read some of it, but I'm not sure I like the new author. The posts are rambling, confusing and, well, boring. Hopefully ocharles will be back next Christmas.
>>
Monads are a bad idea for languages with natural continuations.
>>
>>51965239
Lenses might be nice, but Kmett's implementation of them is an absolute disgrace to the language.
>>
>>51965922
That sums up most of his libraries, and I agree. It's nice to know you can use Lenses with any profunctor and not just Hom, but I don't think the standard implementation needs all that generality.

Have you tried out lens-simple instead?
>>
Can someone give me a quick explanation of what do functional languages do differently?
>>
>>51966008
Haven't tried lens-simple, but it looks like it's a wrapper around O'Connor's lenses, which is a much cleaner implementation.
I've used lens-family a couple times and it does the job (i.e. making records works like they should) without adding 100+ dependencies to my projects.
>>
>>51966130
Instead of having variables change over the course of a program running like an imperative program or objects interacting in an oo program, functional programs perform computation by the composition of functions. these functions are often closer to the idea of a mathematical function (mapping of input to output) with less focus on side-effects.
>>
>>51962884
This desu
Best language to learn and work with now
>>
>>51966196
I feel like you gotta learn a functional language to understand what they do because I still don't understand what they do from reading about it
>>
Clojure or Racket, which should I use as a general purpose language if I don't care about performance, the JVM and other implementation details?
>>
>>51966569
Racket. Mutable types in Clojure are really frustrating towork with.
>>
>>51962884
>>51966318
>>51966569
Clojure is not a Lisp.
>>
>>51962766

Does anyone outside of academia circle-jerk land use Haskell?
>>
>>51966655
yes
>>
>>51966569
Clojure is great anon, and jvm is one of the best technologies we hav, java interpolation is helpful in using all the super useful java libraries and it's a lisp and functional. It literally has the best of all worlds. And also if you know clojure you will know clojurescript which is a drop in replacement for shitty javascript so you can write websites apps everything.

>>51966584
See anon playing guitar is cool but it hurts your fingers, but once you get over that stage you will always be cool.
Clojure is similar starting it feels odd but a little practice and projects will make you love it.
>>51966591
Haha faggot
>>
>>51966655
my company does.

but only because I used Yesod at work once.
>>
>>51966719
The mutable data types in Clojure are shit.
>>
>>51966806
Why would you want to use them in the first place anyways ?
>>
>>51966934
Not all imperative algorithms have a known functional counterpart yet. This is also why ST exists in Haskell.
>>
>>51966975
Maybe it's just one or two cases anon. Clojure is a pure functional language maybe if you are a pussy you can use java just for the part and continue other things in clojure. Clojure is designed by some of the very genius engineers(hardcore c++ programmers), they know what they are doing.
Thread replies: 33
Thread images: 2

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.