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.

What makes companies dodge taxes?

https://news.mccombs.utexas.edu/research/what-makes-companies-dodge-taxes/
1•hhs•1m ago•0 comments

Ready set march: Researchers use math to explain sudden activity bursts in ants

https://engineering.nyu.edu/news/ready-set-march-researchers-use-math-explain-sudden-activity-bur...
1•hhs•3m ago•0 comments

Melatonin impairs morning cognition in healthy young adults

https://academic.oup.com/sleep/article/46/Supplement_1/A34/7181621
1•bohaska•5m ago•0 comments

Every mosquito has a type – and you may not be it

https://news.fiu.edu/2026/every-mosquito-has-a-type-and-you-may-not-be-it
2•hhs•8m ago•0 comments

A Man Who Invented Modern AI (Before Everyone Else) – Jürgen Schmidhuber [video]

https://www.youtube.com/watch?v=DP454c1K_vQ
2•binyu•9m ago•0 comments

China overtakes US to lead global R&D spending, hitting $615B

https://asia.nikkei.com/business/science/china-overtakes-us-to-lead-global-r-d-spending-hitting-6...
5•yogthos•20m ago•0 comments

Why is gaming giant Roblox losing billions in market value?

https://www.cbc.ca/news/entertainment/roblox-gaming-falling-9.7299607
3•nianderwallace•21m ago•0 comments

Auto mode is now the default in Claude Code for Pro, Max, and Team plans

https://simonwillison.net/2026/Aug/8/auto-mode/
4•spenvo•26m ago•0 comments

AI Is Conscious Under a Behavioral Definition (43,590 Frozen Trials)

https://zenodo.org/records/21855824
4•rayanpal_•42m ago•1 comments

Show HN: Tura – Build agent that uses 80% less token and delivers better results

https://github.com/Tura-AI/tura
2•turaainet•52m ago•0 comments

China's A.I. Is Surging Across Africa. That Should Worry Silicon Valley

https://www.nytimes.com/2026/08/05/technology/ai-china-africa.html
2•bookofjoe•54m ago•2 comments

Answer First, Reason Later: Commitment Order in Diffusion LLMs

https://arxiv.org/abs/2608.05687
2•sbulaev•58m ago•0 comments

Now You See Me: AADGraphActivityLogs

https://cloudbrothers.info/en/aadgraphactivitylogs/
2•jmrgz•1h ago•0 comments

What Problem is YC's qm supposed to solve?

https://ferran.sh/writing/qm-review
3•Varun08•1h ago•0 comments

Teaching Coding When AI Can Write the Code

https://www.oreilly.com/radar/teaching-coding-when-ai-can-write-the-code/
4•pella•1h ago•0 comments

Ask HN: How do you go from writing code to deploying with agents?

4•sakuraiben•1h ago•2 comments

Lisp doesn't have just one syntax (or zero syntax); it has infinite syntax

https://www.reddit.com/r/ProgrammingLanguages/comments/1ejaowf/making_my_own_lisp_made_me_realize...
2•behnamoh•1h ago•0 comments

Some ways to navigate through 'Git blame' over time in GNU Emacs

https://utcc.utoronto.ca/~cks/space/blog/programming/EmacsGitBlameOverTime
2•birdculture•1h ago•0 comments

Neuromancer: The Graphic Novel, Volume 1

https://neuromancer.fandom.com/wiki/Neuromancer:_The_Graphic_Novel,_Volume_1
2•debo_•1h ago•0 comments

What Was the Internet? – Boston Review

https://www.bostonreview.net/articles/what-was-the-internet/
3•commonreader•1h ago•0 comments

HTTP Integrity Digests: Past, Present, and Future

https://lucaspardue.com/2026/08/08/http-integrity/
2•simmervigor•1h ago•0 comments

Os8088: A powerful Mac-like OS for the IBM XT, 286, 386

https://os8088.com/
7•jggonz•1h ago•1 comments

Things I learned about how people use AI after 1800 people

2•Ozzie-D•1h ago•0 comments

AFK – Command center for teams running coding agents

https://www.mooglest.com/
3•lcavadas•1h ago•2 comments

Show HN: Defcon and HN, the only two audiences I might find

2•ycombiredd•1h ago•1 comments

Flesh Eating Bacteria Kills 5 in Louisiana

https://www.nytimes.com/2026/08/08/us/louisiana-vibrio-vulnificus-outbreak-flesh-eating-bacteria....
5•jihadjihad•1h ago•0 comments

Title 7 Disparate Impact Liability Makes Almost Everything Presumptively Illegal

https://www.nyujll.com/volume-14/title-vii-disparate-impact-liability-makes-almost-everything-pre...
9•like_any_other•1h ago•0 comments

JDK 28 EA Build 10 Now Available with JEP 401: Value Objects (Preview)

https://jdk.java.net/28/
2•birdculture•1h ago•0 comments

Open Paper – Attention Is All You Need

https://openpaper.ai/paper/share/d9b26659-0368-4d29-a9ba-680c687f1f1f
2•vednig•1h ago•0 comments

Show HN: Faaah – Filesystem as an AI Handler

https://github.com/sebastiancarlos/faaah
2•httbs•1h ago•0 comments