frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Who else thinks they should add GOTO statements to Python?

2•n1xis10t•6h ago

Comments

tocs3•6h ago
I do not have strong opinions, except to ask why? I use python a lot (recreational these days) and do not miss a GOTO. Maybe though, you have a case I do not run into often.
n1xis10t•6h ago
Well, I suppose I just like them. There has been once or twice when I thought “This would be so much easier with a GOTO” but unfortunately I have no idea what those situations were, and I don’t think I wrote them down anywhere.
ggm•5h ago
I don't think the "considered harmful" says much to the current coder, but I do think throwing out from deep/loop state to a target is an ugly code method which leaves all kinds of problems behind in it's wake.

Early termination of loops, assumptions about the values present, locality of reference, mutated state.

If your problem is speed, I don't think it necessarily is actually more runtime efficient. If your problem is die early, then it loses information an assert() would preserve. If your problem is a dislike of if-elif-elif- then I think you argue more for a case: statement than a GOTO.

I used them enough in the past to suffer the consequences of debugging around them. I don't miss them, they haven't consciously been in my back pocket armory for some time. I'd rather find other ways to fall through/out-of code to a fixed point.

Jtsummers•1h ago
What would be the behavior of goto in Python? Would you have it jump across functions, modules, stay within a particular scope (file or function scope)? How would you ensure it's well-behaved when jumping into a loop body, or out of it? Saying you want it communicates nothing, explain how it would (or could) work so people can judge your idea.

I love boring business ideas

https://bytesauna.com/post/i-love-boring-business-ideas
1•mapehe•1m ago•0 comments

The APM paradox: Too much data, too few answers

https://www.honeybadger.io/blog/apm-paradox/
1•todsacerdoti•2m ago•0 comments

The Heart of the Matter

https://rodgercuddington.substack.com/p/the-heart-of-the-matter
1•freespirt•3m ago•0 comments

We used AI to personalize financial planning for everyday users

https://www.sideprojectors.com/project/67099/wealthai
2•asaws•6m ago•0 comments

Ask HN: How long until solid decentralized alternative to Instagram?

2•zanellia•8m ago•0 comments

Orcas Repeatedly Attack Young Great White Sharks, Drone Footage Reveals

https://www.scientificamerican.com/article/orcas-repeatedly-attack-young-great-white-sharks-drone...
1•quapster•10m ago•0 comments

Show HN: Chess but you make your own starting position

https://chess39.com/
1•chess39•12m ago•1 comments

The 1B Token Challenge: Finding the Perfect Pre-Training Mix

https://huggingface.co/blog/codelion/optimal-dataset-mixing
1•codelion•17m ago•0 comments

Spy gondolas on WWI German zeppelins

https://twitter.com/RealAirPower1/status/1984971965065531810
1•Michelangelo11•18m ago•0 comments

Being "Seen" and Feeling Part Of

https://growingfearless.substack.com/p/on-being-seen
1•josmor•22m ago•0 comments

The Seifert–Van Kampen Theorem in Homotopy Type Theory (2016) [pdf]

https://home.sandiego.edu/~shulman/papers/vankampen.pdf
1•measurablefunc•22m ago•0 comments

ByViewer – Watch Instagram Stories Anonymously, No Login Needed

https://byviewer.com/
1•cui511511•23m ago•1 comments

Powerful 6.3 quake kills at least 20 in Afghanistan, hundreds injured

https://www.reuters.com/business/environment/magnitude-63-earthquake-hits-afghanistans-hindu-kush...
2•teleforce•26m ago•0 comments

FerroElectric RAM

https://en.wikipedia.org/wiki/Ferroelectric_RAM
1•brudgers•26m ago•0 comments

De-escalating Tailscale CGNAT conflict

https://ysun.co/tscgnat/
1•birdculture•27m ago•0 comments

High-Quality Branded Envelopes for Business Mail

1•skyprint•27m ago•0 comments

Beyond Start and End: PostgreSQL Range Types

https://boringsql.com/posts/beyond-start-end-columns/
2•radimm•31m ago•0 comments

Intuitive UIs support user habits

https://blog.julik.nl/2025/10/what-does-intuitive-even-mean
1•julik•34m ago•0 comments

Show HN: Face Fusion is a fun way to blend faces using AI

https://deepfacefusion.com
2•artemisForge77•35m ago•0 comments

Text Fragments Enable Deep Linking on Web Pages

https://tidbits.com/2025/04/23/text-fragments-enable-deep-linking-on-web-pages/
1•hexage1814•36m ago•0 comments

Cave Rescue That Captivated the Nation

https://www.mentalfloss.com/history/1925-cave-rescue-that-captivated-the-united-states-floyd-collins
1•jameslk•37m ago•0 comments

Thinking Clearly

https://lemire.me/blog/2025/10/26/thinking-clearly/
2•kiyanwang•39m ago•0 comments

The Authoritarian Stack: How Tech Billionaires Are Building a Post-Democratic US

https://www.authoritarian-stack.info/
2•negativelambda•41m ago•1 comments

Cartography of Generative AI

https://cartography-of-generative-ai.net/
1•giuliomagnifico•42m ago•0 comments

I Ask AI for Permission Now (and I Hate Myself for It)

https://www.codecabin.dev/post/i-ask-ai-for-permission-now
1•rebelchrisycom•44m ago•0 comments

CEO Andy Jassy says Amazon's 14,000 layoffs weren't about cutting costs or AI

https://fortune.com/2025/11/01/ceo-andy-jassy-amazon-layoffs-about-culture-not-ai/
1•hansmayer•45m ago•0 comments

Show HN: Easy Text Tools – 130 text utilities that run in the browser

https://easytexttool.com/
2•msdg2024•48m ago•0 comments

A New Faster Algorithm for Gregorian Date Conversion

https://www.benjoffe.com/fast-date
5•benjoffe•48m ago•1 comments

FSF40 Hackathon

https://www.fsf.org/events/fsf40-hackathon
2•salutis•48m ago•0 comments

Installing a MW of nuclear on land is 2x as expensive as on a Aircraft Carrier

https://twitter.com/andercot/status/1984847618489651636
1•MrBuddyCasino•52m ago•0 comments