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

Pages: 1-

Sepples is bad for your brain

Name: Anonymous 2014-12-12 21:11

Holy fuck, why are sepples coders so stupid

Note that instead of adding virtual methods to the ExprAST class hierarchy, it could also make sense to use a visitor pattern or some other way to model this. Again, this tutorial won’t dwell on good software engineering practices: for our purposes, adding a virtual method is simplest.
visitor pattern
good practices
bloated shit that exists only to mitigate the utter uselessness and weakness of COP
good practices

http://llvm.org/docs/tutorial/LangImpl3.html

Bring me that fucker so I can smash his balls and shove his bloody semen down his dipshit lying throat

Name: Anonymous 2014-12-12 21:17

The visitor pattern requires a programming language that supports single dispatch and method overloading. Under these conditions, consider two objects, each of some class type; one is called the "element", and the other is called the "visitor". An element has an accept() method that can take the visitor as an argument.

Wait a minute, Mr. Sepples, you just said that I won't have to modify the existing classes. Turns out I must add the accept() method to all of them? So I must bloat all my classes with an additional method just for the possibility that somewhere downstream someone might want to add a visitor for them?

Fucking sepples numbskulls die just die and take your shit language with you

Name: Anonymous 2014-12-12 21:22

And I also have to add a separate accept() method for every operation I want to implement? acceptFold(), acceptTraverse(), etc? And sepples idiots call that a "good software engineering practice" and say that it "lets you define a new operation without changing the classes of the elements on which it operates"? Dear YHVH, just kill them all please, and erase all traces of C++ from human history. Please.

Name: ol skool 2014-12-12 21:37

>>1

"Come on Peter," Sally said, "ditch class and play with me."

Nearby, coffee beans erupted from out James Gosling's anus.

I tell you, when a homosexual is sucking your cock, a lot of strange thoughts go through your head: How the hell did this happen? Where did this fairy ever get the idea that I was gay? And where did he get those fantastic boots?

Name: Anonymous 2014-12-12 21:48

>>4
Java is only simplified Sepples. They took away pointers, multiple inheritance, watered down the templates, and voila. A simplified Sepples for slaves to spew in cubicles for corporate pennies.

Name: Anonymous 2014-12-13 5:09

>>3
I'm don't follow. What are you trying to do?

Name: Anonymous 2014-12-13 10:29

>>6
Yes, I did go a little over the top there. The visitor pattern does not require one to add a method for every visitor operation, only to add new classes like Fold, Traverse etc, each with the visit() method.

It is still bloat and boilerplate, though. COP is shit, C++ must die and be rejected like a blight upon humanity.

Name: Anonymous 2014-12-13 15:18

Name: Anonymous 2014-12-13 19:13

>>7
The usual C++ way is to write an iterator for your class. Then you can fold and traverse the iterator with a for loop.

Name: Anonymous 2014-12-13 19:25

>>9
But that's still a modification of the class itself. The visitor pattern is supposed to add functionality without class modification. Except that it can't.

Name: Anonymous 2014-12-13 19:38

>>10
You write one iterator associated with your class. Now the same iterator can be used for traversal, folding, etc. Visitor pattern is more restrictive than an iterator in terms of flow control. To implement the visitor pattern, you still need to ``modify the class'' to add a method that will call the visitor on the elements of the data structure.

But these generic traversals aren't appropriate for the example in >>1. A syntax tree isn't a generic set of objects. It has structure and the traversal needs to be aware of this structure.

Name: Anonymous 2014-12-13 19:58

>>8
OOP is cancer of the mind.

Name: Anonymous 2014-12-13 20:09

(defgeneric visit (visitor node))
Wow that was hard.

Name: Anonymous 2014-12-13 20:39

>>13
That's not the purpose of the "visitor pattern", it's more like

(defgeneric foo ((obj1 class1) (obj2 class2)))

which sepples retards can't do because they only have single dispatch.

Name: Anonymous 2014-12-14 3:42

>>14 is an IO nigger.

* (defgeneric foo ((obj1 class1) (obj2 class2)))

debugger invoked on a SB-INT:SIMPLE-PROGRAM-ERROR in thread
#<THREAD "main thread" RUNNING {AB1F741}>:
Required argument is not a symbol: (OBJ1 CLASS1)

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.

((LAMBDA () :IN SB-C:COMPILER-ERROR))
0]

Name: Anonymous 2014-12-14 4:23

>>15
Common lisp is shit.

Name: Anonymous 2014-12-14 6:39

>>16
You're point?

Name: Anonymous 2014-12-14 8:05

just use asm, c, and lisp(your own) for everything and fuck the rest

Name: Cudder !MhMRSATORI 2014-12-14 12:12

Welcome to the world of ENTERPRISE bloat.

We had "multiple dispatch" in Asm long before it was called "multiple dispatch". It's called a fucking lookup table.

Name: Anonymous 2014-12-14 12:40

lol @ mental neanderthals who need "abstractions" to hide the details of their code

Name: Anonymous 2014-12-14 13:06

>>17
No, I'm anonymous.

Name: NSAnon 2014-12-14 13:23

>>21
Nope, sorry.

Name: Anonymous 2014-12-14 19:45

>>19
By that measure any language that provides some way of dealing with pointers to code supports multiple dispatch.

Name: Anonymous 2014-12-14 22:47

>>23
Pointers and real macros are enough to implement multiple dispatch at the language level.

Name: Anonymous 2014-12-15 0:52

>>24
By definition any feature that must be implemented using another primitive isn't part of the language. The real question is whether multiple dispatch needs to be part of a general purpose language. Given how rarely people in languages that lack it bother to implement it I'm leaning toward the negative position.

Name: Anonymous 2014-12-15 1:16

>>25
Visitor pattern wouldn't be a ``pattern'' if it could just be done with a language feature, like multiple dispatch. Patterns are evidences of lack of language features. These features can be added by extending the language. The more malleable a language, the more patterns it can come to accommidate.

Name: Anonymous 2014-12-15 1:42

The fuck is a pattern?

Name: Anonymous 2014-12-15 1:52

>>27
Something only ENTERPRISE programmers use.
Real programmers don't play by their rules and write code freestyle.
This results in much greater efficiency and maintainability in non-ENTERPRISE code.

Name: Anonymous 2014-12-15 10:04

>>27
Do you remember the idiots from your maths classes who solved everything by trying a few predefined solution schemes? Well now some of them are programmers and this is basically the equivalent.

Name: Anonymous 2014-12-15 13:37

>>27
Something infants spend their time colouring in while real programmers do real work

Name: Cudder !MhMRSATORI 2014-12-15 14:39

>>27
Something that allows copy-pasting code monkeys to perform poor emulations of real programmers. The ultimate form of cargo-cult programming.

Name: Anonymous 2014-12-15 17:51

>>18
this guy ... hearts and kisses to him

Name: Anonymous 2014-12-15 18:42

#*#*#*#*# check 'em #*#*#*#*#

Name: Anonymous 2014-12-15 19:54

>>33
I checked 'em!

Name: Anonymous 2014-12-16 4:33

>>31

why do they call u cunts weeaboos? why not woonies? I think woonies are weeaaboos who live specifically in the US, so you don't get those japanees 'hunkydorey' cunts, yeah fuck off cudder you fucking woony

Name: Anonymous 2014-12-16 4:44

Name: Anonymous 2014-12-16 5:15

>>35
Because you don't paddle woonies, you paddle weeaboos.

Name: Anonymous 2014-12-16 11:10

Seppuru is my favorite nipponese beer

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