Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Inheritance is self-updating copypasta

Name: Anonymous 2007-03-02 6:58 ID:hE1rFeBJ

Pros and cons of inheritance:
+ Self-updating
- Spaghetti
- Copypasta

Discuss

Name: Anonymous 2007-03-02 14:50 ID:GfkrBBY3

>>1
-> Spaghetti has nothing to do with a specific piece of technology.
-> Inheritance is about NOT copying-pasta-ing, it's about reusing.

Name: Anonymous 2007-03-02 14:56 ID:VBQ+V/j7

>>2
When you want to copypasta, which you may not need to, you can either copypasta and keep the flow of reading, or inherit, producing more spaghetti jump there jump here.

Inheritance it's like a hard link. In other words, self-updating copypasta.

Name: Anonymous 2007-03-02 15:12 ID:GfkrBBY3

>>3
When you copypasta in 50 different places, you need 50 different modifications each time you change just one line.

BTW, you forgot the "polymorphism" part, but that's OK if you don't know what it is...

Name: Anonymous 2007-03-02 19:05 ID:VBQ+V/j7

>>4
When you copypasta in 50 different places, you need 50 different modifications each time you change just one line.
>>1 already counted it:
+ Self-updating

And polymorphism? How'd that be related to inheritance? Oooh, you use static languages. Then it matters. I use a language where it does not matter WTF are you doing things to as long as they work. So with dynamic languages, the static languages feature called polymorphism is granted from the start, and classes don't even need to be related, nor it's restricted to functions which are bound to objects or dictionaries of some kind. For example, map(function, list) → list is a form of polymorphism: as long as f is a function (stuff) → stuff, it'll work. Oh and stuff can be anything as well (and needless to say, the list can be heterogeneous).

Name: Anonymous 2007-03-02 19:06 ID:VBQ+V/j7

BTW, for the record I'll say I was trolling when I wrote >>1. Of course I'll take inheritance (or mixins) over copypasta.

Name: Anonymous 2007-03-03 9:45 ID:CBev4azF

inheritance is godly.

Name: Anonymous 2007-03-05 2:35 ID:9XCKMTTn

Late binding is a great way to make your programs harder to read. This goes for function pointers in C as much as for virtual methods in C++ and non-final methods in C# and Java. However, in the latter 3 it's far more common to have loads of virtual methods whereas in C you have maybe a couple of function pointers and they generally go like "one invocation site, many potential call destinations" making the confusion at least manageable.

Of course the point could be made that C++'s virtual methods should be used with discipline, and I totally agree with that.

Name: Anonymous 2007-03-05 8:59 ID:6oV5yJQd

- All methods should be virtual
- No method final
- No class abstract
- No properties private
- All types dynamic
- All collections heterogeneous
- No polymorphism or casting rules - everything works as long as it works
- All code is thus generic
- Multiple inheritance
- Mixins and realtime class, object, object's class and object's inheritance manipulation at will
- Lazy evaluation whenever possible
- Abuse of first-class functions
- Abuse of anonymous closures
- Macros a welcome feature

That's the vet's way of programming. If you don't like dynamic languages, then I suggest you stick with today's special: Java.

Name: [spoiler]AAAAAAAAAAA[/spoiler] 2007-03-05 13:50 ID:/L7jUe8x

AAAAAAAAAAAAAAAAAAA

Name: Anonymous 2007-03-05 15:27 ID:cpk4IQMS

░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░███░░░░░░░░
░░░░░░░░███░░█░░░░░░░
░░░░░░░█▓▓▓█░░█░░░░░░
░░░░░░█▓▓▓▓▓████░░░░░
░░░░░░█▓▓▓▓▓█░░▓█░░░░
░░░░░█░▓▓▓▓▓▓██▓█░░░░
░░░░░█░▓▓▒░░░▓▓░█░░░░
░░░░░█░▓▒░░██▒█░█░░░░
░░░░░░█▓▒░░██▒█░█░░░░
░░░░░██▓▒▒░░░▒░▒█░░░░
░░░██░░█▓▒████▒███░░░
░░█▓░░░░█▒▒▒▒▒█░░▓█░░
░░█▓▓░░░░█████░░▓▓█░░
░█▓▓▓░█░░░░░░░█░▓▓▓█░
░█▓▓███░░░░░░░███▓▓█░
░█▓▓▓██░░░░░░░██▓▓▓█░
░█▓▓▓██▓▓▓▓▓▓▓██▓▓▓█░
░░███░█▓▓▓▓▓▓▓█░███░░
░░░░░█░░▓▓▓▓▓░░█░░░░░
░░░░█▓▓░░░█░░░░▓█░░░░
░░░██▓▓▓░█░█░▓▓▓██░░░
░██▓▓▓▓▓█░░░█▓▓▓▓▓██░
█▓▓▓▓▓▓▓█░░░█▓▓▓▓▓▓▓█
█████████░░░█████████

Name: Anonymous 2007-03-06 3:01 ID:DHz1nezO

>>9
Enjoy ur ASM

Name: Anonymous 2009-02-04 16:31

Name: Anonymous 2010-11-15 23:52

Name: Anonymous 2012-03-23 23:40

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

Name: Sgt.Kabu拞kiman쾣잙 2012-05-28 22:53

Bringing /prog/ back to its people

Don't change these.
Name: Email:
Entire Thread Thread List