[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: G-BoUqOW8AEgJyt.jpg (49 KB, 884x1206)
49 KB
49 KB JPG
I came to the realization that functional programming is not for me.

>Hindley-Milner type systems are retarded
>significant whitespace languages are retarded
>no loops, recursion only is retarded
>everything MUST be immutable is retarded
>(((lisp))) is retarded

turns out, i only really liked tagged unions and exhaustive pattern matching. let's just steal that and implement it in mainstream languages like C++/C#/Java and leave the rest of the retardation behind for fpfags
>>
>>107811366
>significant whitespace languages are retarded

Why?
>>
>>107811393
1,copying code snippets from other places like stackoverflow or nowadays chatgpt will cause the indentation to be fucked up almost all the time.
2,cannot be minified
3,the compiler will randomly start crying when you want to align things nicely
4,invisible characters should not define how the program behaves
>>
>>107811418
>1
"other places" worth a damn will already have indentation. both your examples included
>2
retard
>3
what?
>4
false and frankly retarded
>>
>>107811418
>1
No it doesn't
>2
Doesn't matter
>3
You're not aligning things nicely
>4
Youmeanlikethespacecharacterdoes?
>>
i dont know what you said but AWOOGA ooga booga that picrel!!!!!
>>
>>107811453
>"other places" worth a damn will already have indentation. both your examples included

yes and most editors will fuck it up when you paste unless you use fucking emacs or notepad like a cavemen
>>
>>107811505
>most editors will fuck it up when you paste unless you use fucking emacs or notepad like a cavemen
vim has done The Right Thing(tm) here since forever, wtf kind of old ass 7.4 shit are you using?
>>
>>107811366
functional programming is just when the verb does first. object oriented programming is when the noun goes first. it's just

>walk(the_dog)

vs

>the_dog.is_walked()
>>
>>107811597
that would be procedural vs oop actually
>>
>but muh lisp macros

no one gives a shit
>>
>>107811597
>>walk(the_dog)
I like this one. Which language do I learn?
>>
>>107811597
No, it's not.
FP is a paradigm based on the lambda calculus, so no global mutable state, no side effects, no jumps - only recursion
>>
>>107811366
are you dumb?
syntax always need whitespaces to separate things
void f(){}
int x =
// you can't do:
voidf(){}
intx =
>>
>>107812118
you know what i meant nigger
>>
>>107811366
computer is applied math, anon
so fp which follows math faithfully makes the most sense
>>
>>107812172
computers are literally a gigantic global mutable state thoughbeit. fp people are just as religious and ideological as oop niggers and they both ignore the hardware. the moment i learned haskell uses dogshit slow linked lists of characters for strings because it fits better into their immutability ideology is the moment i understood fp fags don't care about pragmatism or good engineering either. both fp and oop fags just want to live on top of a billion abstarctions where they dont have to think about the "yucky" hardware anymore. two sides of the same coin
>>
>>107811366
filtered
>>
>>107812199
I'm gladly filtered amongst all the other people who build actually useful shit. Nothing useful is ever written in fp trash languages because your immutable "everything is a math formula" bullshit doesn't translate to the real world. no operating systems, no game engines, no databases, no browsers, nothing.
>>
>>107812189
computer is a dogshit that doesn't follow math which causes many bugs
computation should always be immutable and pure
computer was originally pure like math functions, until some retards added side-effects and merged it with pure computations which fuck up everything
while oop is a dogshit wrapper around imperative programming which does not change the imperative paradigm, fp however does change the behavior of the computation
>>
>>107812239
this is exactly what i meant when i said fp niggers are ideological cultists thanks for demonstrating. you look at the world as how you think it should be and not how it actually is. I'm personally really happy we have a paradigm we can use to quarantine your kind off from any real engineering
>>
>>107811366
>>107811418
whitespace is just like any other character
two spaces mean two chars, which means indentation level two
three spaces mean three chars, which means indentation level three
want another level? just add one space
how much of a brainlet can you be to not be able to grasp this?
>>
File: 5765732.png (35 KB, 1245x224)
35 KB
35 KB PNG
>>107812293
sometimes you want the ability to freely spam as many spaces as you want for code alignment. python would not allow this and my code would be forced to look ugly
>>
>>107812321
>cshart
no wonder you got filtered
>>
>>107812329
At least C# is used to write real software unlike all the fp shitlangs
>>
>>107812189
functards and cniles are way more zealous than OOPchads. only the first two impose their shitty practices on other paradigms. and it doesn't help their case when practically all of their complaints about OOP are either based on deliberately bad practices, or blatant evidence that they got filtered by OOP and have no idea how to make it work
>>
>>107811366
there is a reason why functional programming courses at the university are taught by absolute autists. and i mean REAL autists.
>>
>>107812293
spoken like a true bitch slave to his own computer
yes, whitespace is "just another character" for a computer, but for a human it's *spacing* between actual symbols. the human is the master in this pair, the code should be aligned for him
>>
>>107811366
>>Hindley-Milner type systems are retarded
retard
>>
Programming in general is not for you.
>>
>>107811366
Fuck, I wish this was me.
>>
>>107812896
>type inference is so goooooood

the type is an anchor.
you can use it to go to definition immediately.
you can use it to find all references to a type.
you can use it to rename a type in place immediately.

The Hindley-Milner type system assumes that typing out the types is the "problem" but in fact it is not.
>>
>>107812896
retard
>>
File: file.png (20 KB, 1086x153)
20 KB
20 KB PNG
>>107811418
>he doesn't know about pic related
nigga what are you doing?
>>
>>107815224
That will literally ruin your code in significant whitespace languages
>>
>>107815496
>t. never coded python in vscode
ok
>>
common lisp has loops, no significant whitespace and mutability. same for scala.
>>
File: 1727026438089694.png (5 KB, 346x68)
5 KB
5 KB PNG
>>107815609
((((((()))))))
>>
>>107815862
unironic skill issue



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.