frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Avoid Continue

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

Comments

zoezoezoezoe•11mo 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•11mo 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.

Perplexity's "Incognito Mode" is a "sham," lawsuit says

https://arstechnica.com/tech-policy/2026/04/perplexitys-incognito-mode-is-a-sham-lawsuit-says/
1•trashymctrash•1m ago•0 comments

Ten Months with Copilot Coding Agent in Dotnet/Runtime

https://devblogs.microsoft.com/dotnet/ten-months-with-cca-in-dotnet-runtime/
1•truth_seeker•3m ago•0 comments

Rail a self hosting FP language with no C

1•zem0g•4m ago•0 comments

Towards an Amicable Resolution with Ruby Central

https://andre.arko.net/2026/04/02/towards-an-amicable-resolution-with-ruby-central/
1•ingve•5m ago•0 comments

Show HN: Turbo1Bit – Run Bonsai-8B at 65K context in 3.9 GB RAM

https://github.com/jhammant/Turbo1bit
1•tetsuto•6m ago•0 comments

Show HN: SharpSkill – AI writes your code. We teach you to understand it

https://sharpskill.dev/en
1•GiornoJojo•8m ago•0 comments

Iran Says It Hit Oracle Facilities in UAE

https://gizmodo.com/iran-says-it-hit-oracle-facilities-in-uae-2000741785
1•Betelbuddy•8m ago•0 comments

NASA: Artemis II Real time tracking with multiple views

https://www.nasa.gov/missions/artemis-ii/arow/
1•ColinWright•9m ago•0 comments

LegionGo gamepad as a Claude Code controller (Konami code activates voice mode)

https://github.com/pinkpwningclub/legion-claude
1•pinkpwningclub•10m ago•0 comments

Amazon data center in Bahrain attacked by Iranian Revolutionary Guards

https://www.reuters.com/world/middle-east/amazons-cloud-business-bahrain-damaged-iran-strike-ft-r...
3•topherPedersen•11m ago•0 comments

Ask HN: Should there be a temporary ban on new accounts?

1•l33tbro•13m ago•2 comments

Artemis II astronaut reports that two Outlooks are running and neither works

https://old.reddit.com/r/pcmasterrace/comments/1sao0kh/artemis_ii_astronaut_reports_to_nasa_that_...
2•LookAtThatBacon•13m ago•0 comments

Iran attacks Oracle data center in Dubai

https://www.jpost.com/middle-east/iran-news/article-891951
2•topherPedersen•14m ago•0 comments

Hydration Narc – A keyboard-locking water reminder for macOS

https://github.com/Lameda12/hydration-narc
1•Alamedin_ishere•14m ago•0 comments

AWS has officially removed all EC2 instances in Bahrain from their docs

https://twitter.com/astuyve/status/2039777883485254081
3•mirzap•15m ago•0 comments

Agent-Friendly Documentation Spec

https://agentdocsspec.com/
1•nlawalker•16m ago•0 comments

Tehran Accuses Ukraine of Active Participation in Iran War

https://www.kyivpost.com/post/72965
2•alephnerd•17m ago•0 comments

The Path Forward for WordPress 7.0

https://make.wordpress.org/core/2026/04/02/the-path-forward-for-wordpress-7-0/
1•jantissler•17m ago•0 comments

Are you still copy/pasting in GPT to correct your text?

https://rewritecmd.com/
1•Louis9•19m ago•0 comments

ON1 Restore AI Turns Old Family Photos into Grotesque Nightmare Fuel

https://petapixel.com/2026/03/25/on1-restore-ai-turns-old-family-photos-into-grotesque-nightmare-...
1•My_Name•19m ago•0 comments

Show HN: Run Claude Code, Codex, and more with auto-approval in a Container

https://github.com/VibePod/vibepod-cli
1•nezhar•20m ago•0 comments

Spyware Vendor Creates Fake WhatsApp App

https://securityaffairs.com/190276/malware/italian-spyware-vendor-creates-fake-whatsapp-app-targe...
1•lschueller•20m ago•0 comments

Velvetluxbox

https://bdsm-box.com/
1•Velvetluxbox•20m ago•0 comments

Show HN: Hey Aio – Video Editing Assistant You Can Talk To

https://www.heyaio.com/
3•misellu•22m ago•0 comments

Hallucinated citations are polluting scientific literature. What can be done?

https://www.nature.com/articles/d41586-026-00969-z
2•Kaibeezy•25m ago•2 comments

What the FCC router ban means for FOSS

https://sfconservancy.org/blog/2026/apr/02/fcc-router-ban/
1•speckx•26m ago•0 comments

The Friend Compound Field Guide

https://livenearfriends.com/fieldguide
1•cjbarber•27m ago•0 comments

Public Anger Is Rising

https://www.theatlantic.com/politics/2026/04/congress-government-shutdown-tsa/686653/
4•paulpauper•29m ago•0 comments

Open Source 13" E-Ink Spectra Color Display with ESP32-S3

https://www.crowdsupply.com/soldered/inkplate-13spectra
2•car•30m ago•0 comments

Show HN: I built an offline and privacy-first photo sorter

https://photosort-production-d4d1.up.railway.app/
2•Sensotix•31m ago•1 comments