[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
Why don't you like functional programming? What's
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: 43
Thread images: 4
File: N0uy3hr.png (36 KB, 2000x1412) Image search: [Google]
N0uy3hr.png
36 KB, 2000x1412
Why don't you like functional programming?

What's your favorite language?
>>
because i'm an idiot.

java
>>
>>55437752
>java

confirmed for idiot
>>
>>55437743
I do!

Swift.
>>
>>55437743
C++, but I know little this language
As and English
>>
>>55437743
ONE WORD: SPACE LEAKS
>>
>>55437743
I am too stupid and it hurts my head a little just trying to work out a very simple problem in haskell.

It took me 20 mins to figure out how to make a arbitrary long triangle of stars.
>>
>>55438324

Nice, now I have a new buzzword to trigger the haskell guys..
>>
File: Screenshot_2016-07-06_15-17-34.png (28 KB, 723x768) Image search: [Google]
Screenshot_2016-07-06_15-17-34.png
28 KB, 723x768
>>55437743
But I do, anon. Loving it so far, I think that I will learn scala soon.

>inb4 clojure is not a true lisp

try explaining your employer why did you decide to write a library for the main company's java application in SBCL; then survive enough time to be employed and be able to narrate about it.
>>
>>55440001
mount user? my nigga
>>
Hoon
>>
>>55440001
get a real font tho, ffs
>>
>>55437743
Don't insult me anon. I love Haskell.
>>
File: sheafcohomology.jpg (29 KB, 500x501) Image search: [Google]
sheafcohomology.jpg
29 KB, 500x501
I love functional programming.
>>
>>55440050
what's wrong with terminus?
I'd like to set up fira code on emacs tho - ligatures are the real shit
>>
>>55437743
java is my fav because its super duper easy and holds my hand, I also like rust because it's a nicer version of c++.

the only real development languages now days are java c# and obj-c, That's where all the money is.
>>
>>55437743
because they're slow and require a huge runtime
>>
>>55440279

>because they're slow

but develloping time are expensive, software faults are even more expensive and runtime micro optimization is often irrelevant..
>>
>>55440308
>runtime micro optimization is often irrelevant..
not when you are working with DSP
>>
functional programming is okay, but it is certainly not a must for doing any project.
As soon as a problem gets complicated, you don't spend the majority of your time to write code, you spend it on figuring how to solve the problem.
I would prefer to write something large in C++ just because you can easily write all the small things so the api becomes like writing functional code.
>>
GoLang
>>
>>55440323

That's why I wrote "often", anon.

But I realized you only answered OP's question why you are not using it.

>>55440373

That's the cool thing about languages like Scala, where you can just go "low level" if you want to and do soomething Java-like if the problem would be hard to solve in functional programming..
>>
>>55437743
Because i dont see them as general language.
I like Haskell but i would never build a enterprise programm with just haskell.
>>
>>55437743
I do
my favourite language is Elm :^)
>>
>>55437765
le java is bad meme
>>
>>55440373
That's a problem if the first computer thing you've ever learnt is imperative programming.
Just think about functional programming as a collection of mathematical expressions, nested one in another - such as (3x - 5y)^2 + 6xy. If I give you x=3, and y=7, you will be able to calculate the value of the expression by replacing the letters with the values.
If you remember this, you'll be able to avoid a whole bunch of """""space leaks""""" mentioned by >>55438324.
For example, if you define x = a + b, you did not compute x, but you said to the compiler that x equals a plus b, and it decided to keep a + b in memory. Do it inside a fold of a list of ~100000 elements and see what happens. It's dangerous, but still less than the shit you see in C.
I'm not advocating for functional everywhere, but just saying that typical functional features are slowly creeping inside every programming language you know (lambdas, just to name one). Especially web backend programming that benefits a lot from parallellizing should use functional languages more (immutable data structures = no state = easy multithreading); frontend too, has Functional Reactive Programming (FRP, ask >>55440877 for more), that has been badly copied by C# """"binding"""" features - it greatly simplifies binding data to graphical elements.
>>
>>55440972
That's not a meme. Java, php, ada and every single bullshit pajeet language that is written in by PluggableInterchangeableFactoryCodeMonkeys is awfully bad. And not only because it has a lot of common pitfalls, but because it's always simplier to fall in one of them rather than write good reusable code without performance/readability issues. Christ, JVM doesn't even have TCO by default.
>>
>>55441268
Christ, m8. That's a quite a formidable wall of meme text. And there's something about your gratuitous use of quotation marks that really turn me off from reading that shit.
>>
>>55441363
Well, a lot of people here use them to indicate sarcasm... I've been far from /g/ for a couple of months, thought that it would be the newest meme.
tl;dr of the meme text above: FP is easy if you stop thinking about imperative programming all the time. It's also really featureful.
>>
>>55437743
I'm learning Common Lisp right now. I like it so far.

Favorite language right now is probably Python.
>>
File: ocaml.png (58 KB, 420x420) Image search: [Google]
ocaml.png
58 KB, 420x420
But I do. From yesterday's fizzbuzz thread

let rec f n s = 
if n > 100
then print_string s
else f (n+1) (s ^ "\n" ^ (
try snd (find
(fun x -> (n mod (fst x)) = 0)
[15,"fizzbuzz"; 3,"fizz"; 5,"buzz"])
with Not_found -> string_of_int n
))
in f 0 ""

https://try.ocamlpro.com/

OCaml Master Race
>>
>>55441638
I've been gone for two year
>>
>>55441328

>Java, php, ada

Those langauges are so differnt, it's very ignorant to even put them in one sentence..

Ada was used for the programming for the F-22 and the Eurofighter, and it did a pretty good job.

Java is - like it or not - the industry standard, because of it's safety, scaling and the JVM which is pretty nice. With Frege you can even programm Haskell on it.

PHP was designed as language for "duct tape" purposes, and while I only used it one or two times and never liked it much, it does have it's place. And it does have beautiful frameworks like Laravel.

People like you will never undersatnd that there is no silver bullet, but each langauge has a specific design purpose with individual pros/cons.
>>
>>55441685
>writes "fizzbuzz" as a separate string
>still longer and has more unnecessary bloat than a normal FizzBuzz
Put it in the bin, m8!
>>
>>55437743
I don't dislike the concepts of functionnal programming, but in general functionnal languages like Haskell are cryptic as fuck (don't you dare tell me they aren't)
I love C. Its the best
>>
Whatever happened to the "Haskell is deprecated" shitposter?
>>
>>55442581
He became deprecated.
>>
>>55437743
I do

APL
>>
My favorite language is one in which all of you use, but only indirectly.

Machine code.

Get on my level.
>>
>>55437743
F# is my favorite language but I still use Ruby and Rails for work.
>>
Can I make games with functional programming? I though it was just for math problems and shit.
>>
>>55442680
It's excellent as a core language. So the central logic of your games could be made in Haskell.
>>
>>55442680
You can make shitty indie games.

You won't be making Crisis 4 with immutable data structures anytime soon.
Thread replies: 43
Thread images: 4

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.