He still uses for-loops

>he still uses for-loops

Attached: opening-pic-friends-laughing.jpg (450x300, 55K)

Other urls found in this thread:

channel9.msdn.com/Events/GoingNative/2013/Cpp-Seasoning
twitter.com/NSFWRedditImage

Not me, I use for-comprehensions.

Jokes on you I only use lookup tables

care to explain what's wrong with them?

Iterators and sequences are better. You should use more functional means to evaluate a set.

>Iterators and sequences are better.
show me some assembly (no opti and -O2) and benchmarks.
Link me papers on the subject.
>You should use more functional means to evaluate a set.
again, why?
You're spouting opinions like they're facts but nothing to back them up.

Because I said so. Now get back to your cubicle.

>He's still doing OOP

It's not about benchmarks. It's about immutability.

I only use if loops.

Since this is a shitposting thread:
What the fuck is wrong with mods? Telling other anons to sage is NOT the same as announcing sage. Fucking faggets.

>he doesn't use labels

>he is still a he

For loops are still the best and give you the most control.

b-but for loops can and are used with iterators

>not using goto

> It's not about performance. It's about applied autism about muh style

Get out Haskellfags.

Trips wasted by a Haskellfag.

If it does not generate better assembly, then it's worthless.
for loop are already simple enough to debug in every language even fucking asm.
Yet again functional fags failed to prove their technics are better than good old imperative ones.

there's a certain beauty to a for loop that mutates 4 int variables and manages to iterate the data structure in just the right way without any overhead.

>he uses functions, iterators and compound statements
>not having your program consecutively execute in a straight order regardless of any condition

checked

Attached: 4eights.jpg (1600x1067, 134K)

Fuck you.

>immutability.
What does that even mean? It's a fucking loop.
You want like "for each" or something? Is that immutable?
Iterators? Those are immutable? In your dreams?
Or by immutable, do you mean some bs abstract californian cult mantra you learned in some talk or overpriced book or something?

What do you mean by "immutable"? Do you mean "not changing"?

crazy!

Attached: 67E30B6E-C8BE-4F6A-875A-BE115BAB1F43.gif (256x282, 21K)

>Virgin compilers
>Chad JE

>>he still uses for-loops
Of course, I'm a professional OCaml developer.

>muh immutability
there's nothing immutable
why should I fucking care?

based and redpilled

Anything more complex than "I need to do something to every element of a collection" and you go back to for loops.

I use forEach myself.

>he doesn't comment every line of his code
think of the children

What is this... For-loops? Oh, are they like recursion?

I only use while loops like a true genius.

Attached: 1534242687988.jpg (1400x1399, 712K)

quads speak the truth

>he doesnt use While true for everything and just breaks when needed

Pleb

they are biological females

Indeed.
Ifs and gotos are the way to go.

>write a program that lists the elements of an array in an enumerated way like this
>0. 184
>1. 75
>3. 0
>etc.
Oh that's right you can't have both the index and element with iterators. Have a good day, we'll take Rajesh instead of you. :^)

channel9.msdn.com/Events/GoingNative/2013/Cpp-Seasoning

Touched a nerve, huh?

understated

low iq detected

Jokes on you, I only use recursion

I just use conditionals and goto, that's what a loop basically is.

>If it does not generate better assembly, then it's worthless.
How does someone get to this point, where they know how to program but don't have the faintest clue what programming is actually about?

>Oh that's right you can't have both the index and element with iterators.
You can.

In Python:
enumerate(iterator)

>he uses loops

for(;;)
{
}
best loop

In Haskell this is just
zip [0..] [1, 2, 3, 4, 5, 6]

for index,element in enumerate(iterator):
print(str(index) + ". " + str(element))


In Haskell
showline index element = show index ". " show element
showTable elements = traverse_ print $ zipwith displine [1..] elements

(slightly shit naming for the second function, printTable would be more descriptive)

For and for each loops are the greatest thing in programming and the most important.

Prove me wrong.

Why are you so ass blasted

I do in bash for quick scripts, not in any other language.

I map everything, bitch

>Oh that's right you can't have both the index and element with iterators
let a = [184, 75, 0];
for (i, e) in a.iter().enumerate() {
println!("{}. {}", i, e);
}

for(;;);
better loop.

for (int count = 1; count

there are no other loops in go
fuck you

1 CLS
10 FOR i = 0 TO 99
11 IF post MOD 2 = 0 THEN
12 PRINT "This post isn't gay"
13 ELSE
14 PRINT "This post is gay"
15 END IF
16 NEXT
100 END

Theyre fucking with you dude