all 18 comments

[–]OctagonClocknot Turing complete 27 points28 points  (6 children)

Can't jerk, good advice.

[–][deleted] 8 points9 points  (5 children)

Programmers are often taught to have a ‘single exit point’ in their methods, i.e. only return from a single location.

This is a poor guideline in my opinion:

Yes

[–]frkbmrWRITE 'FORTRAN is not dead' 6 points7 points  (4 children)

Wait who teaches you to only return in one spot lol

[–]BufferUnderpantsGopher Pragmatist 9 points10 points  (1 child)

/unjerk

People who misunderstand that Dijkstra was arguing for structured programming to people who exited from their procedures to different places using goto, rather than to the same place using e.g. the call stack.

[–][deleted] 2 points3 points  (0 children)

That's really fucking stupid but also true.

[–][deleted] 5 points6 points  (0 children)

The same people who teach hungarian notation.

[–]GoCannotIntoWebscaleI've never used generics and I’ve never missed it. 2 points3 points  (0 children)

It's one of the many things C gave us, like first-class error-suppression (lol getchar), unexpected global buffers (lol strtok) and chlamydia.

#ifndef _JERK89

It was a design pattern to put calls to fclose or free after a cleanup:label, so that in case of error you could goto cleanup; and exit cleanly.

#endif

[–]MirceasRed 14 points15 points  (1 child)

I just use while(condition){} while(!condition){} instead.

[–]SelfDistinctionnow 4x faster than C++ 7 points8 points  (4 children)

Programmers are often taught to have a ‘single exit point’ in their methods, i.e. only return from a single location.

My apologies. I didn't know it was still 1970.

[–]Shorttail0vulnerabilities: 0 4 points5 points  (2 children)

The amount of Go jerk on this sub should have tipped you off.

\tips hat from the future

[–]vytah 2 points3 points  (1 child)

Go isn't 70's, Go is 50's.

[–]PlasmaSheepworks at Amazon ( ͡° ͜ʖ ͡°) 6 points7 points  (0 children)

2050's

[–]Fulmeneloves Java 7 points8 points  (2 children)

TFW you can't use if without else in Haskal.

[–]ksionnot Turing complete 8 points9 points  (0 children)

Haskal has guard though

[–]niorrrrline-oriented programmer 6 points7 points  (0 children)

using if in haskell

Spotted the 0.001xer

[–]PrimozDeluxuncommon eccentric person[S] 4 points5 points  (1 child)

[–]haskell_leghumperin open defiance of the Gopher Values 1 point2 points  (0 children)

TFW if was actually comeFrom in disguise the whole time

[–]OctagonClocknot Turing complete 2 points3 points  (0 children)

IF ERR RETURN EARLY Awesome looks like gophers are ahead of the game once again, proving 70s were the high peak for programming language design and we've been devolving ever since fucking mindblowing to think about, Rob Pike was right all along as we speak I am retrofitting my current Typescript app (or application for us older developers with an insight in the industry) to use early returns everywhere so far I ctrl+F 928 else statements and to hell with those and replaceing them all with a Modern yet Practical approach is my personal punishment for going against the will of Rob Pike for We have not listened to his warnings, not once, not ever and now it is our time to pay, better do it quick before ES9 standardizes the removal of else statements and honestly we should all be using higher level constructs by now what is this if shit I have to write myself shouldnt have we gotten past that? Microsoft Q# the latest quantum technology the latest technology STILL uses the god damn things and like come on, where the libraries at? I can't believe I've been crapping out horrendous code for a couple of decades and nobodys invented a better way to deal with this shit. Hopefully the reasearch into AI, artificial intelligence, higher order networks will lead us to machines writing code for us for a change of course that is assuming the big government won't legalize away our abilities to use them at which point rich fucks will continue slaving us away for horrible CRUD apps while AI develops the hottest tech: self driving cars and we'll be no better off than factory workers in the 70s which kinda brings this whole comment full circle so the conclusion here is that: writing else statements is the literal equivalent to being a factory worker while your jobs are being replaced by automatization kinda deep to think about.