[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]

>mfw functional programmers just keep spreading memes how

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: 18
Thread images: 2

File: 1476818857607.png (138KB, 375x375px) Image search: [Google]
1476818857607.png
138KB, 375x375px
>mfw functional programmers just keep spreading memes how OOP is bad instead of elaboraing and proving their claims
>>
OOP is bad, everyone knows it in their heart.
>>
>liking OOP
pajeet detected
>>
You just have it on your CV to impress MBA Chads who want to use you to create their next social media idea.
>>
>>57735195
yeah, because
 knowing( get_everyone(), "bad", "OOP", heart)

is soooooo much better than
everyone.heart.knowledge.add("OOP").is("bad")
>>
OOP isn't bad inherently.
It's just the only paradigm that CS101 "coders" know so they churn out garbage spaghetti and apply it to every situation, when most of the time it isn't needed at all.
>>
> ITT: My better syntax sugar is better than yours
>>
File: 1_o6f1NLEFqOQrji0MMXhoAA1.png (37KB, 1376x312px) Image search: [Google]
1_o6f1NLEFqOQrji0MMXhoAA1.png
37KB, 1376x312px
>>57735154
Yeah. OOP is best. We are number 1 programming.
>>
>>57735154
OOP isn't bad.
Neither is functional programming.
Both have their good points and are better for different stuff and nothing stops you from programming in an hybrid way.
You wouldn't use a screwdriver to nail a nail and you wouldn't use a hammer to screw a screw.

Also, english is a funny language.
>>
College java-drone here.

I don't known the difference between functional and OOP, what is it?
>>
>>57735404
Syntax does not mean it's functional. Go look up the definition.
>>
>>57735859
OOP has state inside each object. An object may have a private counter that you don't know of, so the state changes along the execution, which leads to side effects and unwanted behaviour.
Functional means there's no state, every method always works the exact same way and returns the exact same thing for the exact same input.
However this thread seems to be about syntatic sugar, not wether it's functional or not. /g/ has really fallen.
>>
>>57735154
OOP is usually better for larger projects
>>57735404
is the first example functional?
>>
>>57735404
I will let this here:
--source: haskell data analysis cookbook
import Text.CSV

-- Parses a CSV file
main :: IO ()
main = do
let fileName = "input.csv"
input <- readFile fileName
let csv = parseCSV fileName input
either handleError doWork csv

handleError csv = putStrLn "not a CSV"
doWork csv = (print.findOldest.tail) (filter (\x -> length x == 2) csv)

-- Finds oldest person.
findOldest :: [Record] -> Record
findOldest [] = []
findOldest items = foldl1 (\a x -> if age x > age a then x else a) items

age [a,b] = toInt b

toInt :: String -> Int
toInt = read

import pandas
table = pandas.read_csv("input.csv")
print table[table.age == max(table.age)]
>>
>>57736147
What's special about the code?
>>
>>57735913
>>57736021

I wanted to highlight the fact that almost universally human brains think about objects first and their interactions second. Therefore, in applications where information hierarchy and organization is the problem, it makes sense to use languages which have features to express such ideas in the easiest way possible.
>>
Functional is only used for screwing around.

If you want a job, you learn oop. oop is more versatile than functional programming.
>>
>>57735309
>implying
Thread posts: 18
Thread images: 2


[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.