frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•1y ago

Comments

zoezoezoezoe•1y ago
I dont know if I fully agree. Sure, there is definitely an argument the be had about whether or not `continue` is the best word to use in this instance, but why avoid it entirely? Every programmer is able to easily understand what code like this would do:

``` for (Node node : nodeList) { if (node.isBad()) { continue; } processNode(node); } ```

Every keyword in any programming language is largely arbitrary in my opinion let's take a look at the beginning of the codeblock `for (Node node : nodeList)` also completely arbitrary, though it's clear to anyone who's ever written C++ that it is equivalent to saying "for every node in nodeList".

Continue is not meant to read as "continue execution" it's meant to be "continue to the next item of the list", and I think avoiding it entirely is a pointless effort.

Ukv•1y ago
I feel `skip` may have been a better name, but disagree with it being logically difficult to parse beyond that.

If I'm reading a loop and see

    for x in y {
        if exclusions.contains(x) { skip; }
        if x.children.length == 0 { skip; }
        if os.file.exists(x.name) { skip; }
        ...
I instantly know that processing for those elements is skipped, and they won't be relevant for the rest of the loop.

Whereas if I see

    for x in y {
        if !exclusions.contains(x) {
            if x.children.length != 0 {
                if !os.file.exists(x.name) {
        ...
I feel like there's still mental overload with not knowing where those `if` blocks end, and so having to keep the conditions in mind. It doesn't immediately tell me that the rest of the loop is being skipped.

The `log()` mistake seems no less likely to happen using early-returns in function instead, and I'd argue nesting checks actually introduces more room for that kind of error overall, where you append something at the end within the wrong set of brackets, compared to a flatter structure.

FuturePost Unlock – Create time-locked QR codes that unlock your message later

https://www.haoqibit.com/futurepost-unlock
1•Popang•8m ago•0 comments

We probed every remote server in the official MCP registry (15,329 URLs)

https://fetchgate.dev/blog/mcp-registry-audit-2026
1•chiefgrowth•14m ago•0 comments

Answers to questions about upstreaming patches

https://www.thomas-huehn.com/answers-upstreaming/
1•Tomte•20m ago•0 comments

I tried vibe-coding a memory tool for AI and stared into the abyss of philosophy

https://arbustoemchamas.substack.com/p/i-naively-tried-vibe-coding-a-memory
1•milon•23m ago•1 comments

Beyond the Editing Canvas: Evidence Divergence in Ooxml-to-LLM Ingestion

https://arxiv.org/abs/2608.25880
1•sbulaev•25m ago•0 comments

Samsung's Processing-in-Memory (PIM)

https://chipsandcheese.com/p/hot-chips-2026-samsungs-processing
1•ingve•26m ago•0 comments

Fileon – Find any local file with natural-language search on Mac

https://www.haoqibit.com/fileon
1•Popang•33m ago•0 comments

Czech Court Awards Heureka 10M EUR from Google for Market Exclusion

https://www.ceskenoviny.cz/zpravy/2867023
1•Markoff•39m ago•1 comments

The Making of Panther Lake: Intel Core Ultra Series 3 – Behind the Scenes [video]

https://www.youtube.com/watch?v=Wifx6GtsVmI
2•thushanfernando•40m ago•0 comments

America Strikes Back Against Foreign Censors with the Rulli Granite Act HR 10174

https://prestonbyrne.com/2026/08/28/rulligranite/
1•NewCzech•43m ago•0 comments

How to Keep Thinking

https://www.seangoedecke.com/how-to-keep-thinking/
1•gfysfm•43m ago•0 comments

Show HN: Visits.Report – analytics you can publish and prove

https://visits.report/
1•nadermx•44m ago•0 comments

What is Oxide's thinking around GPUs? FAQ Friday #56 [video]

https://www.youtube.com/shorts/3y5DwFJH3ho
1•ryandotsmith•47m ago•0 comments

America's data center revolt is getting a boost from China-linked bots

https://www.axios.com/2026/08/28/china-ai-data-center-backlash-bots
3•jnord•50m ago•0 comments

Chunky Agents

https://ianbarber.blog/2026/08/28/chunky-agents/
1•matt_d•51m ago•0 comments

LaneGate – Git-native worktree orchestrator for AI agents

https://github.com/sudheerdvn/lanegate
1•dvenkat9•56m ago•0 comments

Show HN: AMC Stocks Hub – asset-manager profiles, 13F holdings, and co-holdings

https://assetmanagementcompany.net/
1•lzyuan1006•56m ago•0 comments

US Military uses laser to down three Mexican cartel drones near border

https://www.reuters.com/business/aerospace-defense/us-military-uses-laser-down-three-mexican-cart...
5•bushwart•59m ago•0 comments

OpenAI to end agreement with SpaceX's AI coding tool Cursor

https://www.reuters.com/business/media-telecom/openai-end-partnership-with-spacexs-cursor-2026-08...
1•tartoran•1h ago•0 comments

Survival Lessons from the Great Depression – The Horrifying Things Americans Did

https://johnwalter25.substack.com/p/50-survival-lessons-from-the-great
1•bushwart•1h ago•0 comments

Taiwan prosecutors search Unimicron in suspected China fraud case

https://www.reuters.com/world/asia-pacific/taiwan-prosecutors-search-unimicron-suspected-china-fr...
2•tartoran•1h ago•0 comments

Dimethyl Mercury Exposure Incident at MIT

https://twitter.com/andrew_n_carr/status/2093524390390694232
3•notRobot•1h ago•0 comments

Explainer: What is visual verification and why does Reuters practice it?

https://www.reuters.com/business/media-telecom/what-is-visual-verification-why-does-reuters-pract...
1•1659447091•1h ago•0 comments

Global Trade and United States Navy

https://acoup.blog/2026/08/28/collections-global-trade-and-united-states-navy/
1•Tomte•1h ago•0 comments

DoD confirms 'refrigeration disruption' at military commissaries

https://www.militarytimes.com/news/your-military/2026/08/28/dod-confirms-refrigeration-disruption...
4•everybodyknows•1h ago•1 comments

Yes, We're in an AI Bubble. Just Look to 1980s Japan

https://foreignpolicy.com/2026/08/28/nvidia-earnings-quarterly-report-ai-economic-bubble-japan-hi...
2•CaptainZapp•1h ago•2 comments

AI Stock Research Assistant · Streamlit

https://ai-stock-research-kiaan.streamlit.app
1•KiaanKothari•1h ago•0 comments

Nvidia Starts Pac as AI Chip Maker Builds DC Influence Force

https://www.bloomberg.com/news/articles/2026-08-27/nvidia-starts-pac-as-ai-chip-maker-builds-dc-i...
2•dagmx•1h ago•0 comments

Venezuelan opposition up in arms over reports US wants big stake in oil and gas

https://www.theguardian.com/world/2026/aug/28/us-venezuela-oil-gas-stake
3•fittingopposite•1h ago•0 comments

Are these 13 free AV and Robotics engineering calculators are useful?

1•dlimbu•1h ago•0 comments