Krautkanal.com

Veröffentlicht am 2014-11-17 23:37:28 in /int/

/int/ 25686405: If you can't understand the advantages of object or...

nehemiasec Avatar
nehemiasec:#25686405

If you can't understand the advantages of object oriented languages such as java and C# over C and other procedural languages, then you are just as bad as the people who doesn't understand the advantages of procedural languages over objected oriented languages

iqbalperkasa Avatar
iqbalperkasa:#25686427

If you think modern functional languages aren't just a reversed OOP with immutability, you don't understand functional languages

nehemiasec Avatar
nehemiasec:#25686504

>>25686427
But isn't a main idea of OO is mutability and its ability to adapt?

garethbjenkins Avatar
garethbjenkins:#25686530

>2014
>programming
What the codemonkey?

dmackerman Avatar
dmackerman:#25686584

>>25686530
fuck off khokol

mhwelander Avatar
mhwelander:#25686607

>not knowing what your code actually compiles to
>not knowing what garbage collector does behind your back
>not knowing all the OOP voodoo magic that happens behind for back
yeah, nah, I'll stick to C

jajodia_saket Avatar
jajodia_saket:#25686620

>>25686607
*your

dmackerman Avatar
dmackerman:#25686743

>>25686504

No. The main idea of OOP is polymorphism generalized over hierarchical categories, i.e. when you say "make a sound!" and the object makes a sound specific to the class of that object ("woof", "miau" etc,") so that you can write pretty generic algorithms that don't care about the concrete types we're dealing with. Objects can be both mutable and immutable, there's no restriction here.

And the mature functional languages (like Haskell), it's exact same OOP, except objects are immutable by default. Semantics are pretty much same, the syntax and the ideological sugar are a bit different: in classic OOP, we first describe a class and then everything which it holds: methods, fields etc. In functional languages, we first describe functions, and then -- what abstract type they belong to (so it's implied that functions are superior to classes)

But the end of the day, "functional languages" is just a stricter subset of OOP.

creartinc Avatar
creartinc:#25686783

>>25686607
Yeah, I get all that, but can you really keep track of all memory allocation, making all that C magic while catering to Business Rules and still being agile, flexible and creating maintainable code?
No matter how good you say you are, you can do shit 10x faster in Java than you would do in C, and that is its main advantage.

It hurts me inside when I see stuff when I see apps like Websphere and SAP PI running in java, its a pile of shit that runs like a a turtle on heroin, but people dont care about it as long as you can finish a full project within a month.

polarity Avatar
polarity:#25686836

>>25686743
wow, never thought about it that way. But in functional languages you dont explicit declare classes, you only imply them by their behavior (functions) right?

yesmeck Avatar
yesmeck:#25686878

>>25686607
>not knowing what garbage collector does behind your back

What do you imply by "not knowing"?

t. the knower

garand Avatar
garand:#25686955

>>25686405
Procedural language means it supports procedures (functions). OO languages are superset of that, they also support objects (classes).

>>25686427
Functional languages aren't really reversed OO, true that both "functional OO" and "procedural OO" are very similar, but their origins are vastly different. Immutability is OOP jargon, functional languages are about side-effects. The main point of functional languages has always been not hiding the state i.e. function calls always produce the same result.

terryxlife Avatar
terryxlife:#25686973

>>25686607
C is shit, you should use C++.

jajodia_saket Avatar
jajodia_saket:#25686988

>>25686836
yes

macxim Avatar
macxim:#25687033

>>25686955
>Functional languages aren't really reversed OO, true that both "functional OO" and "procedural OO" are very similar, but their origins are vastly different

I don't care about origin. I'm talking about what we have factually. By reversed OOP in mean that in OOP, classes are first, methods come second; in FP, functions come first, classes come second. But in the end, it's same shit: polymorphic functions generalized over certain types.

>The main point of functional languages has always been not hiding the state i.e. function calls always produce the same result.

That's again the reversed thing here. OOP's default behavior is mutability and side-effects, immutability is an option.

FP's default behavior is immutability and purity; mutability is an option (in practical non-academic languages like Haskell which use monads to make an excuse for side-effects)

kimcool Avatar
kimcool:#25687131

>>25687033
Stop raping the terminology just because you figured this shit out by yourself. Get some formal education. My head hurts.

areus Avatar
areus:#25687178

>>25687131
>Stop raping the terminology just because you figured this shit out by yourself. Get some formal education. My head hurts.

Bla-bla. Do you have something to say, Jooni?

vladyn Avatar
vladyn:#25687228

>>25687178
No, because we don't speak the same language.

pf_creative Avatar
pf_creative:#25687234

All my income comes from Java coding and i have like 50x more money than average ukrainian.

polarity Avatar
polarity:#25687349

>>25687228
>No, because we don't speak the same language.
I don't understand you. I use terminology everyone knows. Maybe you're just a little bit dumb?

adriancogliano Avatar
adriancogliano:#25689634

As an EE all I can say:

Look at him! LOOK AT HIM AND LAUGH!

cboller1 Avatar
cboller1:#25689680

>>25687234
People used to make a fortune with PHP so it's not actually a good point at all.

Neuste Fäden in diesem Brett: