this post was submitted on 14 Feb 2025
24 points (68.2% liked)

Ask Lemmy

28505 readers
2846 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected]. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try [email protected] or [email protected]


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS
 

What exactly is the point of Loop? All I ever see is some of the stupidest shit known to man. I could see it if it was half way educational or informative but this just seems like a big bowl of stupid.

you are viewing a single comment's thread
view the rest of the comments
[–] SkybreakerEngineer 47 points 5 days ago (4 children)

Loops are required for any kind of repeating code. Some applications apply the same algorithm many times such as applying a filter to each pixel of an image, others run the same code forever like your thermostat

[–] [email protected] 15 points 5 days ago

Foreach their own.

[–] [email protected] 14 points 5 days ago (1 children)

I think you might be confused.

[–] thenextguy 27 points 5 days ago

Or perhaps very enlightened.

[–] [email protected] 8 points 5 days ago

No, no, that's iteration. Loops are how I get my daily servings of froot.

[–] [email protected] 4 points 5 days ago

I’m happy with my For Loops. They’re just great!