ProgrammerHumor

breakOperator

breakOperator
https://i.redd.it/ipahyhyb9sbf1.jpeg
Reddit

Discussion

riztazz
:cp:

This meme gets reposted so often, it feels recursive

3 days ago
Bright-Tear9755

Ikr I just saw it here

3 days ago
SupernovaGamezYT
:m:

(Me clicking the link, scrolling down, and clicking it again to make the joke continue)

2 days ago
zeocrash

While(true)

{

RepostMeme();

SleepDays(random.next());

}

2 days ago
charliesname
:cs:

This meme gets reposted so often, it feels recursive

2 days ago
Octupus_Tea
:cp:

This meme gets reposted so often, it feels recursive

2 days ago
FjellaTheBirb

This meme gets reposted so often, it feels recursive

2 days ago
Tuafew

Say that again 🤨

2 days ago
fiskfisk

break is not an operator. It doesn't operate on anything.

It'll usually be documented as a statement. 

If you're going to repost, it's time to clean up the meme. Refactor it a bit. Leave it nicer than you found it. Run the tests. 

2 days ago
alexanderpas
:p::py:

technically, break can be considered a nullary operator, as it operates on the current loop, by ending it, without accepting any arguments.

2 days ago
fiskfisk

I wouldn't consider it a nullary operator since it doesn't return a value either. You can argue that "it modifies PC so it's an operator on that register" - but that's a stretch in my view. 

2 days ago
skywalker-1729
:py::cp::rust::hsk::gd:

If you called it a control flow operator, then I think it would be correct. But yes, operator sounds a bit strange.

1 day ago
ridicalis

I didn't know we were allowed to fix stuff; I thought it was just technical debt that Dave was going to fix one of these days.

2 days ago
Surprise_Cross_Join

Endless loop != recursion…

2 days ago
Searbh

 A man walks into a bar and says "I'll have a joke a bout recursion please". The bartender says "Sure: A man walks into a bar and says "I'll have a joke a bout recursion please". The bartender says "Sure: A man walks into a bar and says "I'll have a joke a bout recursion please". The bartender says "Sure: A man walks into a bar and says "I'll have a joke a bout recursion please". The bartender says "Sure: ...

2 days ago
Ronin-s_Spirit
:js:

Technically a recursive function without a guard clause == while (true) even if recursive function without a guard clause !== while (true).

2 days ago
Saelora

depends on the language, ina. lot of languages a recursive function will crap out when the call stack maxes out while a while true will just keep going till killed.

2 days ago
knightress_oxhide

what language doesn't crap out when the memory runs out?

2 days ago
Saelora

none, but some of them have infinite loop protection.

2 days ago
alexanderpas
:p::py:

If the language supports tail recursion optimisation, it won't crap out, since the next iteration is made only after the previous iteration has concluded.

2 days ago
Ronin-s_Spirit
:js:

That's why I said it's not exactly equal.

2 days ago
ohdogwhatdone

Embedded devs: where's the joke?

3 days ago
SunshineSeattle

You know what I saw browsing some code for a dev board was this:

``` for(;;) {    // Stuff }

```

And I don't know how to feel about it.

2 days ago
Mast3r_waf1z

I've seen for(;;); before, accompanied by an interrupt

2 days ago
Mediocre-Advisor-728

Was it cube ide for stm32?

2 days ago
ohdogwhatdone

Not a big fan, I call it the depressed endless loop ;-;

2 days ago
SunshineSeattle

Accurate lol

2 days ago
Taletad

You’re confusing a recursive function without an exit clause, with an infinite loop

2 days ago
EsotericLife

Who needs a break? Use redefine true to == false, duh.

3 days ago
monsieurlouistri

Op did not write a line of code of his entire life, change my mind

2 days ago
jhill515
:c::cp::py::bash::m::snoo_trollface:

int main(int, char**) { while(true) { laughInMainLoop(); repostBullshit(); refreshDay(); }; }

2 days ago
_Alpha-Delta_
:py::cp::c::asm::bash::snoo_trollface:

Nah, just put a "go to" instruction.

Or use it with purpose to trap a microcontroller program after putting your contraption in a safety mode. 

2 days ago
MrHyd3_

This is reposted so often I fixed it

2 days ago
Giocri

I would have added a few More iterations but yeah much better

2 days ago
SuckMyAlpagoat

wait there is a end to the meme so he did write a break statement

2 days ago
Global-Tune5539

Maybe he used return?

2 days ago
schewb

I feel like the meme would be super long if it was a while loop instead of recursing on itself and just be Padme saying her line over and over.

2 days ago
batatatchugen

Standard practice for microcontrollers.

2 days ago
JackNotOLantern

You can throw an exception or kill the thread/process instead

2 days ago
navetzz

Return

2 days ago
Disciple153
:rust: :c: :cp: :cs: :py: :ts:

2 days ago
Vallee-152
:py::js::vb::gd:

DW, when the user wants to exit, it just crashes itself instead.

1 day ago
MountainRub3543

Lets just wrap a function and call that same function within it while we are at it…

Function wont_stop(){ while(true){ wont_stop() } }

23 hours ago