[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
RIP Object Oriented Programming
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: 131
Thread images: 10
File: 5611.OOPtombstone_5D92677E.jpg (47 KB, 500x300) Image search: [Google]
5611.OOPtombstone_5D92677E.jpg
47 KB, 500x300
Carnagie Mellon University has declared OOP dead

https://existentialtype.wordpress.com/2011/03/15/teaching-fp-to-freshmen/

How will Pajeet ever recover?
>>
Only now they'll more Loo like Scala, which is compatible with their Javapoo
>>
I hope we can have a mixture of good OOP and FP things. Pure anything can be huge unreadable/unmaintenable garbage.
>>
>>55021445
>wordpress

must be a shit university run by fags
>>
>>55021551
>Carnagie Mellon
>shitty
>>
>>55021498
hopefully. it's nice to see newer languages like rust abandoning hard oo
>>
>>55021562
seems to be what that anon implied.
>>
File: nigger.jpg (398 KB, 1920x1281) Image search: [Google]
nigger.jpg
398 KB, 1920x1281
>>
>>55021498
SCALA
C
A
L
A
>>
File: 204635.png (46 KB, 600x600) Image search: [Google]
204635.png
46 KB, 600x600
>Carnagie Mellon University
literally who
>>
>2011
>>
File: 1432928610617.jpg (699 KB, 1358x1456) Image search: [Google]
1432928610617.jpg
699 KB, 1358x1456
Any good courses to learn functional/imperative programming online?

Coming from a student who only knows OOP and wants to learn other ways of programming.

Pic unrelated.
>>
>>55021701
just make new page wen you want to make new class
>>
>>55021701
Learn You a Haskell is a great introduction to Haskell.

It's available for free online.
>>
>>55021814
Ops, misread your question, never mind...
>>
>>55021814
Real World Haskell is a great part 2

Also available online
>>
>>55021571
php did it too
>>
>>55021445
>Carnagie Mellon University has declared OOP dead

i don't think OP has any reading comprehension
>>
>>55021832
PHP is dead too
>>
>>55021696
turboNEET
>>
>>55021445
Functionnal programming is the future. Look at F#, its beautiful
>>
>>55022578
hahah nice meme

actually its boring meme, 90% of web is still runing on php and will run for years to come my dude
>>
>>55022625
PHP is to web what Java is to desktop, sadly
>>
>>55021498
F#
>>
>>55022625
PHP is legacy shit

It's the COBOL or C++ of the web
>>
>>55022640
>>55022674
calling php shit won't make it go away

also if done right php can be helpful

also chosing one meme clusterfuck of language over another wont solve anything
>>
>>55021445
The irony here is that Wordpress itself is written in OOP.
>>
>>55021445

Functional programming isn't the direct opposite of OOP, but of imperative programming. Imperative programming operates on the principle that programs have a global 'state' which should be manipulated to produce the desired results, while functional programming attempts to avoid state and treat all data and program flow as interactions between functions. Having no state is often described as being "functionally pure" or "no side effects."

To use an example, consider possible programs in an imperative and functional style:

def x_plus_three(x):
y = 42 # this would be a side effect
# it's poor programming, but the language won't stop you
return x + 3


Algebra, while not technically a programming language, is indeed functional:

f(x) = x + 3


Notice that using algebra, you couldn't change the value of y from within a function that operates only on x. Purely functional languages are subject to the same constraint- in fact, they don't actually 'change' anything at all, they merely produce brand new outputs by performing calculations on their inputs. This prevents errors in case you didn't want y to become 42 or x to permanently increase by three.

As for OOP, it's just a means to reduce errors created by accidentally changing things you didn't intend to change. You might define y as a private variable in a class, meaning each object of that class possesses its own 'y' and only functions attached to that object can change it, for that object alone.
>>
>>55022711
http://eev dot ee/blog/2012/04/09/php-a-fractal-of-bad-design/
>>
>>55022736
What's the irony?

>>55022794
That's a strawman of both. Imperative programming basically means you tell the computer what to do. This includes procedural programming, which structures programs around procedures and OOP which structures programs around objects and messages passed between these. I can easily write C functions that have no side effects, just as I can write C functions that have. Even if they don't have side effects, I'm not really writing functional code.

Declarative programming is more of a high level description of what you want, instead of how the computer should do a thing. Declarative programming includes functional programming, which structures programs around function composition. A consequence of this is that you generally avoid side effects, but it isn't the essence of the paradigm. Other declarative (sub)paradigms include logic programming and query languages such as SQL.

Side effects aren't central, but some tend to encourage those more.
>>
>>55022794
I wonder if a good way to teach for principles would be to have students write a small angularJs application that does all data binding and transformation with "filters", which are usually written in a pure functional style
>>
>>55023026
could be, except web dev is gay
>>
>>55023026
I think they should use jQuery and MongoDB so they will learn about webscale early on
>>
>>55021445

i honestly wish functional programming would dominate. it would make programming even harder for shitty normalfags and pajeets, making people like us get the raise we deserve
>>
>>55021686

Scala is fucking retarded and awful, but I still use it as my main language because it's way less broken and awful than all the other languages.

It's a huge step forwards, but some parts of it just makes me want to die, although it can also be a joy to program with
>>
>>55023345
try haskell scrub
>>
>>55023363
This. Haskell makes programming a joy. You no longer just write code, you breathe life into it. It's poetry. It's art.
>>
>>55021498
F#
>>
>>55021445
because OOP is too much for introductory course. rationale behind OOP only makes sense after a thorough understanding of imperative style and some experience with developing non-trivial software. that is what they actually did: move OOP class to sophomores(and later)
>>
>>55022952
Cool nitpick, but actually the absence of side effects and global state is exactly what makes a piece of code functional.
>>
>>55023363

I do write haskell, it's a great language, but I feel the type system offered by scala will eventually metamorphose into something beautiful rather than being the somewhat ugly duckling it is now.
>>
>>55023374
Found the code artisan.

FP is a meme, its not even remotely useful for anything enterprise related.
Their only case of usefullness is scientific computation
>>
>>55021445

>https://existentialtype.wordpress.com
>wordpress.com
>wordpress


Stopped reading right there.
>>
>>55023681
pajeet detected
>>
>>55021445
>2011/03/15
You're 5 years late, anon. Clearly Pajeets didn't suffer because of that.
>>
>>55021445
C++ to fuck off and die when ?.
>>
>>55023843
t. extreme neet
>>
File: ucciBlink2.gif (3 MB, 297x444) Image search: [Google]
ucciBlink2.gif
3 MB, 297x444
>>55021445
In my first CS class we were taught O'Caml extensively, then C - the second year we did Java and F#.

OOP is long gone
>>
>>55021696
>>
>>55021701

read about data driven programming

https://www.youtube.com/watch?v=rX0ItVEVjHc
>>
File: 1462464224374.png (296 KB, 668x437) Image search: [Google]
1462464224374.png
296 KB, 668x437
>>55021445
congratulations to them for making already useless and unemployable CS grads even more useless by teaching them a meme paradigm

try and argue with my point, I dare you; you can't, FP is a niche that won't get you hired anywhere
>>
>>55024270
>computer SCIENCE should be about training code monkeys
>>
>>55024098
>his CS degree wasn't at least 80% about Java
enjoy being unemployed
>>
>>55023425
they did it in my university too. They moved java in the second year with oop. Don't know if they teach imperative the first year tho.
>>
>>55024333
Computer "science" doesn't use the scientific method
>>
>>55021445
What academia does and what the industry does are completely disjunct. When was the last time you saw haskell code in production?
>>
>>55024350
> CS degree
> thinking about teaching a language, not a paradigm
enjoy being an unemployed ignorant fagget
>>
>>55024371
It's Saturday today, so yesterday
>>
>>55024388
Nice meme
>>
>>55024384
really, if an university teach you only how to do things and not why do things and the reasoning behind it, its a failure as university and you are a failure as graduate.
>>
>>55021701
If you know C# or Java then you probably understand imperative programming too since they aren't purely OO like Smalltalk or Eiffel.

Another person had said this but I would recommend Learn You a Haskell too.
Bear in mind it's REALLY different from what you are used to, and it might take some time to get into the habit of thinking functionally instead of imperative.
>>
>>55024422
I think 99% of universities in the world teaches you basics and fuctionalities of a paradigm, through a language of course.

What >>55024350 was implying it's the exact opposite of what you're saying
>>
>>55024333
these 'code monkeys' will actually land a job unlike you FP weenies who prefer to jerk off to your favourite LISP dialect
>>
>>55021445
Saying Java and C# are dead is like saying
>being on 4chan isn't a waste of my time
Even if you dislike the laungauges with every bone in your body, saying they are dead is fucking stupid.
>>
>>55025897
i know, but this place is great for laughs. i mean look at it.
c# is great for making programs really fast, especially when you use blend.
Java, tough i really despise it, i know it was great in the past, but c# is at this time better. C# can be compiled to c++ and thus c# programs can now be made to run on linux and apple products.
>>
>>55022880
K. Anywho, I'll just keep on making my 6 figure income building the web in php.
>>
>>55025940
NO FOR FUCK SAKE

C# cannot be compiled to C++.
C# can be compiled to CLR, and Visual C++ can also be compiled to CLR, which makes the two languages cooperant.

C# can run on Linux or Apple only because of libmono.

C# and Java are really the same as proof of concept, but Java has been made with certain design choices which sounded good when it was developed (back in the '80s).

Microsoft learnt from Oracle mistakes, and made a Java-alike language patching all the things in which Java was wrong
>>
>>55021701
Don't waste your time
>>
>>55025989
I'll keep coming
>>
>>55026071
Wasn't it Sun back then?
>>
>>55026139
yep, sorry
>>
>>55023363
>>55023374
>>55023632
>>55024371
Learn fucking assembly. After programming in assembly, Haskell is like shitting in the streets.

It doesn't have to be x86. Actually I would recommend something simpler like Z80 or ARM and make programs that run on a device you own.
>>
>>55026412
shut the fuck up, ASM fedora meme
>>
>>55021498
Agreed. That's why I like Clojure so well.
>>
>>55021498
Scala ocaml
>>
Get over it, imperative programming and OOP are here to stay, and functional programming will never be more than mere toys in the grand scale of things.
>>
>>55028210
You're right that imperative programming and top are here to stay.

But you're wrong in your appraisal of functional programming: Scala, Haskell, Clojure, and ML's are part of a giant comeback for functional languages. C++ added functional features. Rust has functional features. Java added functional features.

The functional languages are changing the way we program, for the better. Purity is usually bad in any paradigm. We should use what works, and stay away from dogmatic views.
>>
>>55023026
>>55023053
>AngularJS
>MongoDB
Just what undergrads needed, more useless meme tools.
>>
>>55028242
Everyone says that FP languages are making a comeback, but it never ends happening.
And just because other languages add FP features in them, doesn't mean they end being actually used.

Also
>Rust
>>
>>55026412
asm is ugly af
>>
>>55028274
If you don't use map, lambdas, folds/reduce and so forth please kys before I have to read your shit code
>>
>>55028311
I don't use them because I never had the need to use them.
>>
>>55024362
Neither does theoretical physics or mathematics.
>>
>>55028274
C++ has added functional features.

Clojure is actually becoming popular. This is all stuff happening right this second.
>>
>>55028372
Clojure is actually a nice language though as opposed to Scala
>>
>>55028382
Yeah...Scala is very complex, and I'm really not a fan.
>>
>>55028242
>>55028274
All this means is that FP fanatics are taking over language committees. How much of that are things programmers who like that language actually wanted and how much of it is them sticking their own pet ideas in or trying to "attract" FP programmers?

Adding "lambdas" to C++ and Java seems like that.
>>
>>55029023
These features are being used today in production code, and are valued.
>>
>>55021445
It's no coincidence that OOP backwards is POO.
>>
>>55028311
>map, lambdas, folds/reduce and so forth please kys before I have to read your shit code
your shit code must be really efficient..
where are the days when programmers actually had to make sure their programs would not use to much ram, making sure they didn't take up more space than needed on a hard drive, and above all, making sure the code runs efficiently and uses as little of the processor as possible.

Now all is see are basic programs that require a shitton of everything.
>>
>>55021445
>opinions of professors on the software industry
>relevant

Pick one.
>>
>>55029472
professors in universities are most of the time bad programmers themselves that could not handle the software industry. There are exceptions. And sure you can learn the basics from a bad programmer, but don't expect them to say the most sensible stuff.
>>
>>55023681
How many times have you poo'd in the loo today, my Pajeet?

111,111,110 x 0?
>>
>>55029447
1. Optimize the algorithm first.
2. Programmer time is more valuable than machine time.
3. Shit software design is shit software design. It doesn't matter if it's Java, C, or a functional language.
4. map/fold/reduce does not necessarily increase any runtime, but abstracts over iteration.
>>
>>55029595
>2. Programmer time is more valuable than user time.
That's what you're really saying.
>>
>>55029639
Nope. Programs should meet design requirements. User time is a design requirement. But the bottleneck in a program isn't a fold. If you think so, you're retarded and should learn about algorithmic complexity.
>>
>>55029725
>User time is a design requirement.
And how do you think you meet that design requirement?

>But the bottleneck in a program isn't a fold.
Allocating instead of reusing storage could be a bottleneck.
>>
>>55029801
>how do you think you meet that design requirement?
By carefully choosing algorithms. Most applications aren't doing cutting edge shit that requires 0% waste.

>Allocating instead of reusing storage could be a bottleneck
>could be
Sometimes, and then you should optimize appropriately. Clojure lets you use transients to fix this.

Also: most applications aren't for desktops these days. If your customer is an enterprise client and the application you're building **has to** scale anyway, then it makes sense to build a scaleable solution in a language you can be more productive in.
>>
>OOP
>dead

kek. just because retard shitters graduating from school can't design for shit doesn't make OOP dead.
>>
>>55022794
>state

so if your meme paridigm has no sense of state, how do you solve state problems?

with shitty retarded monads which are LITERALLY IMPERITIVE?
>>
>>55030211
State is inherently complex, complexities ought to be minimized, therefore state ought to be minimized.

There are several strategies to accomplish this, including the monad.

The big problem with state in traditional imperative languages is that state can be modeled as a pure function relating time to value. Imperative paradigms do not express this, and stateful problem solving is the default.

State should be used where it's necessary, and no place else.
>>
>>55030211
>>55030335
Functional programs have more state. "State" means the entire program and all data.
>>
>>55030530
It is commonly understood that by "state" we mean "mutable state."

You're arguing semantics.
>>
Germanfag here. My son is learning programming using Delphi in school. Why they don't at least switch over to Java is beyond me.
>>
>>55029503
One of the reasons being they could see only the world in highly abstract terms.
>>
>>55031101
>My son
*my wife's son
>>
>>55031101
Delphi is great and the only reason it isn't widespread is clinical retardation of Borland (actively tried to kill it, which made the whole company go bankrupt) and the company that acquired it (charges 5000$ for the IDE)
>>
>>55031570
yeah no fuck you
>>55031579
great because it's easy but it's not really useful with so many better alternatives.
>>
>>55026412
This is a troll, right? It's really hard to tell, since a lot of beginner programmers actually think this way.
>>
>>55021445
>tfw you never really figured out what OOP is supposed to be

I understand the idea of objects as collections of data with methods to manipulate said data, but what made it such a popular paradigm, to the point where one of the biggest languages makes EVERYTHING a class?
>>
File: haskell_0.png (12 KB, 225x321) Image search: [Google]
haskell_0.png
12 KB, 225x321
>>55030211
>>
>>55031101
Over than 10 years ago, when I was in school, I learned Delphi along with another irrelevant language: Clipper.
>>
File: motherfucker.jpg (152 KB, 600x600) Image search: [Google]
motherfucker.jpg
152 KB, 600x600
Teaching kids functional programming is a good start, but it's not enough. ML-style languages are still harmful in their own ways.

I wonder how many more dollars and man hours we're all going to waste before we come to realize that we got it right the first time with Lisp back in the 50s.
>>
>>55033721
It's pretty intuitive in a way. The real world is technically a collection of objects that interact with eachother so it's easy to explain on a superficial level and it makes it much easier for idiots to make cookie-cutter programs without understanding what the fuck they are doing.

What's worse is that OOP is getting into schools and it's shoved down the throats of tons of kids as their first and only programming experience. You ABSOLUTELY CAN NOT start with OOP. It's fucking abhorrent. Kids are using object methods without knowing what a for cycle is, i'm not even kidding. That's what teaching programming in highschool is like, learn a list of methods and then just put them in order like fucking legos. "Put a button here, two text columns there and don't forget to set a nice background color, now make it add numbers ogether when you press a button! look what an amazing program we've made! Good job!"
>>
>>55033883
>we got it right the first time with Lisp back in the 50s.
Dynamic scope, dynamic typing, no GC, and no lambdas?

The one thing Lisp did get right in the 50s was normal mathematics-inspired syntax. S-expressions were a mistake.
>>
>>55022711
> if done right php can be helpful
Literally nothing is more helpful than php
>>
>>55026071
>C#
>patching all the things in which Java was wrong
This.
>>
honestly lisp / sicp is still the best way to introduce concepts once they're past the basics imo.
it's sad to see java/OO/imperative becoming the dominant teaching tools.
obviously it's important to teach more than one paradigm, but imperative is too distant from cs theory to be taught first.
>>
>>55034037
>sicp

get with the times, grandma
>>
File: 1462723491590.jpg (282 KB, 960x720) Image search: [Google]
1462723491590.jpg
282 KB, 960x720
>>55033883
>Lisp

Anyways fully programming FP sucks and will never catch on, a move towards fully imperative programming again will be more likely than FP ever catching on.
FP will never be used for anything more than syntactic sugar to make code more compact/readable, because the only reason FP was picked up to begin with was the because the code made back then in early OOP languages(early Fortran was a massive clusterfuck so Backus tried to shill FP because what he created wasnt really good) was mostly made so shitty that there was a massive performance loss.
>>
>>55034037
>imperative is too distant from cs theory to be taught first.
They've been teaching "theory" wrong ever since the FP "revolution" wiped out the old ways. That's why literally everything in computer science was invented before 1978.

>>55034131
The problem with SICP is that it's too new.
>>
>>55034231
>it's too new

It really is not, especially considering that it's been superseded by even MI fucking T. It's literally meme status at this point.
>>
>>55021445
>some guy's personal WordPress blog site
>all of Carnegie Mellon
okay
>>
>>55021685
Fuck off
>>
>>55021602

>carnegie mellon

its just meh
>>
>>55034273
It's "new" because it's after FP took over academia.
>>
>>55034135
That's from a Lisp book fyi

>FP will never be used for anything more than syntactic sugar to make code more compact/readable
The horror!

>>55033972
>S-expressions were a mistake.
kys
>>
>>55021696
>epic smug frog meme
>>>/facebook/
>>
>>55034037
SICP should be the first thing CS Freshman read. I don't know what you mean by "past the basics"

When I learned Java as a high schooler I remember being told to write a whole bunch of gibberish on top of our hello world program and the professor was like "ignore all that for the time being we'll get to it sooner or later I promise." That + the general verbosity of Java meant that I felt as though I were actually learning a foreign language like Spanish/French rather than focusing on the concepts themselves

compare that to being dropped into a Scheme REPL where your class will probably be writing working functions within the first 15 minutes. I think the latter is far more conducive to learning.
>>
>>55021445
You know, in college I took a few programming classes. Java, .Net, Python, and php.

And from what I've gathered in this thread (and already had kind of figured on my own), it was a complete and utter waste of time that is obsolete now, other than at least now I have a fundamental understanding of programming.

I'm stuck in IT anyway so it's moot.
>>
>>55021701
learn javascript
Thread replies: 131
Thread images: 10

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.