Move on to some real language. Multiparadigm languages like Python, Ruby or Lisp should be good.
Name:
Anonymous2006-06-10 16:24
>>4
Given that he knows about passing functions as arguments, I'd assume that >>1 is a functional programmer who is being forced to use Java for some reason. You, on the other hand, are just a random Java basher who hasn't written anything more complicated than 100.times { print "JAVUR SUX LOL" }
i'm now using switch statements that call methods
oh well at least it's better than the original 'if' puzzle >>6 is not me
>> 9 what do you mean
Name:
Anonymous2006-06-12 13:35
>>9 gave you an awful, ugly solution, if it is one. Do not listen to him from now on. The switch that calls methods is a good idea.
Name:
Anonymous2006-06-13 5:46
Every time you need to do:
switch (lol) {
case 'harbl': harbl(); break;
case 'rofl': rofl(); break;
case 'fap': fap(); break;
}
type things, you realize the language you're working with is shit.
Name:
Anonymous2006-06-13 5:49
this is why i posted here >>13
in other languages i am able to either put methods inside arrays or even pass them. see >>2
Name:
Anonymous2006-06-13 15:24
Why would you need such a braindamaged concept like making functions variables? You don't call variables, they are values, while functions are code. Don't mix code and data, stupid, that leads to exploits. Learn to code.
Name:
Anonymous2006-06-13 15:34
>>15
for efficiency, dumbass. sometimes it's faster to call a function via a function-pointer array than to do a series of "if-then"'s or "switch"'s.
Name:
Anonymous2006-06-13 15:50
>>15 make some valid points instead of insulting me?
at least know what you're talking about?
exploits? what are you talking about?
Name:
Anonymous2006-06-13 15:57
>>16 WTF is wrong with if-else? It's how a lot of languages handle branching code, not just C and JAVA. Also, anything can be "sometimes faster" when used right.
If you really want an array of function pointers learn C/C++; it can do that without a problem.
Name:
Anonymous2006-06-13 17:30
>>16-17
Sheesh, people, don't you realize I was trolling? Lol, c'mon, my >>15 was a good troll, I intentionally mixed concepts and shit.
Name:
Anonymous2006-06-14 0:45
>>19
Fuck you, dumbass, mixing concepts and shit. Can't you make logical statements that concentrate on one thing at a time. I swear, you must be a Eurofag.
Name:
Anonymous2006-06-14 8:48
oh i didn't realise you were trolling, i thought you were being honest, i just didn't understand what you meant
Bringing /prog/ back to its people
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 boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy