lainchan / λ

OO Language Discussion

Anonymous · 2015-11-07 14:36
What do you think about Object Orientated (OO) languages? What are their pros and cons? Do they add unneeded complexity without any unique advantages or do they empower programmers to think in an abstract way while reusing code?
Anonymous · 2015-11-07 14:42
i think OOP is ok, no big deal. the most efficient and elegant programs i've ever wrote were not OO but i sure followed some sort of OO thinking, using data structures. anyhow, if you were going to do an actual project for a company you're most likely gonna use objects.
Anonymous · 2015-11-07 14:52
>>11650 Kinda offtopic, but the disadvantage of the linked list should be bad random access.
Anonymous · 2015-11-07 14:58
OO is fine. Inheritance is the culprit of most problems with it.
Anonymous · 2015-11-07 15:03
>>11651 yeah, they're most of a university data structures course meme, but trees are my niggas
Anonymous · 2015-11-07 22:52
Nothing wrong with it. It's just that it requires very well trained programmers to make classes and their objects work together without unnescessary complexity. That's because while it does abstract things nicely, programmers need to understand what, how and why it abstracts.
Anonymous · 2015-11-08 00:00
>>11650 >>11651 >>11653 Any recommended resources for learning data structures?
Anonymous · 2015-11-08 00:13
>>11673 The Art of Computer Programming - Volume I - Chapter II
Anonymous · 2015-11-08 00:22
>>11649 works in some contexts, fails in others Really the basic purpose of OOP is to embed the special case manipulations into the data itself (by wrapping it in a class, with uniquely dedicated handlers, when necessary), rather than in the manipulating function. Thus, the meaning of remove_all() can be different for each piece of data, without caring about the particularities of the data (because any peculiarities are handled within the data) If you don't have (many) special cases, there's no real point creating containers to hide nothing. Which is when procedural languages make a lot more sense. And then you have functional languages, where you stop calling the program itself a manipulable piece of data, and thus the global state of your machinery becomes constant. In other words, you have a rigid skeleton, embedded with moving parts
Anonymous · 2015-11-08 00:23
>>11675 by languages, I mean paradigms
Anonymous · 2015-11-08 01:49
>>11674 Is this a serious suggestion? I think TAOCP might be a bit beyond me currently, but I suppose I could do a single chapter. I'd be interested in some beginner friendly resources too though.
Anonymous · 2015-11-08 02:39
Anonymous · 2015-11-08 02:46
>>11677 Just uploaded some in a couple different languages on lainchans volafile https://volafile.io/r/kUFzLJ
Anonymous · 2015-11-08 04:42
>>11678 sorry for being naïve -- is this a real quote? I want it to be true
Anonymous · 2015-11-08 05:08
>>11679 >like 8 books of "data structures in X language" dif guy but i'm pretty much language agnostic if its C-derived (and I think most people are?) which one is actually the most efficient and concise at explaining data structures since they're all dif authors >Little Brother >Wiki: The novel is about four teenagers in San Francisco who, in the aftermath of a terrorist attack on the San Francisco–Oakland Bay Bridge and BART system, defend themselves against the Department of Homeland Security's attacks on the Bill of Rights. anon what
Anonymous · 2015-11-08 10:00
>>11673 >>11677 If you're a complete beginner, Sedgewick, Wayne: Algorithms; TAOCP and CLRS are great as a reference once you get the hang of the basic concepts and want to look something up when working on some problem.
Anonymous · 2015-11-08 12:35
>>11686 it's from "anime was a mistake" meme
Anonymous · 2015-11-19 23:27
>>11697 This guy also has an algorithms book in C. Any thoughts on it? I already have enough languages to learn and I'd rather have to add C than Java.