Hacker Newsnew | past | comments | ask | show | jobs | submit | estebank's commentslogin

I used to hate semicolons. Then I started working in parser recovery for rustc. I now love semicolons.

Removing redundancy from syntax should be a non-goal, an anti-goal even. The more redundancy there is, the higher the likelihood of making a mistake while writing, but the higher the ability for humans and machines to understand the developer's intent unambiguously.

Having "flagposts" in the code lets people skim code ("I'm only looking at every pub fn") and the parser have a fighting chance of recovering ("found a parse error inside of a function def, consume everything until the first unmatched } which would correspond to the fn body start and mark the whole body as having failed parsing, let the rest of the compiler run"). Semicolons allow for that kind of recovery. And the same logic that you would use for automatic semicolon insertion can be used to tell the user where they forgot a semicolon. That way you get the ergonomics of writting code in a slightly less principled way while still being able to read principled code after you're done.


Why is ";" different from \n from the perspective of the parser when handling recovery within scopes? Similarly, what's different with "consume everything until the first unmatched }" except substituting a DEDENT token generated by the lexer?

rustc does exactly that keeping the indent level of every unbalanced curly brace. It works OK, but it isn't perfect by any stretch. More heuristics are needed.

Some architectures are made easier by the choice of implementation language.

UV also has the distinct advantage in dependency resolution that it didn't have to implement the backwards compatible stuff Pip does, I think Astral blogged on it. If I can find it, I'll edit the link in.

edit wasn't Astral, but here's the blog post I was thinking of. https://nesbitt.io/2025/12/26/how-uv-got-so-fast.html

That said, your point is very much correct, if you watch or read the Jane Street tech talk Astral gave, you can see how they really leveraged Rust for performance like turning Python version identifiers into u64s.


In my experience Rust typically makes it a little bit harder to write the most efficient algo actually.

That’s usually ok bc in most code your N is small and compiler optimizations dominate.

Would you be willing to give an example of this?

Not OP, but one example where it is a bit harder to do something in Rust that in C, C++, Zig, etc. is mutability on disjoint slices of an array. Rust offers a few utilities, like chunks_by, split_at, etc. but for certain data structures and algorithms it can be a bit annoying.

It's also worth noting that unsafe Rust != C, and you are still battling these rules. With enough experience you gain an understanding of these patterns and it goes away, and you also have these realy solid tools like Miri for finding undefined behavior, but it can be a bit of a hastle.


Has no one written a python! macro for this use case?

Mutating tree structures tends to be a fiddle (especially if you want parent pointers).

The lingua franca has changed before...

He already tried to overturn one election. What makes you think that he wouldn't try again?

There are quite explicit constitutional limits to his ability to be elected to a third term. Short of a mitary-style takeover, there is nothing he can do to change that (discounting the scenario of constitutional amendment).

Who would be enforcing those constitutional limits? I didn't think that a convicted felon could run for president, but here we are.

The same limits he ignored in 2021?

> why were the vampires forced to ask for permission to enter

Part of well established lore.

> and then able to storm the building a few scenes later?

Because the wife who just saw her husband killed invited them in because she wanted revenge.


> Doesn't pay attention to plot

> Claims plot is terrible

People who complain about aspects about movies they didn't like should all be as forthright as GP in explaining why exactly they didn't like that aspect, so I can decide whether to entirely disregard the opinion.


I'd infer that the GP is talking about some time back and they are no longer in school.

> Look I'm writing sdrawkcab

How would that work with Text-To-Speech output?


Good question! Two possibilities:

1. Tell the TTS program that the text is RTOL.

2. If the TTS program can speak Arabic, it can detect RTOL Arabic text.

The only purpose for RTOL English I can think of is to insert hidden text for malicious purposes.


how do you search for strings in the text ? how do you search for half the word ? as you do in autocomplete or in that search box in your browser

If anything, Unicode should have had more disambiguated characters. Han unification was a mistake, and lower case dotted Turkish i and upper case dotless Turkish I should exist so that toUpper and toLower didn't need to know/guess at a locale to work correctly.

Characters should not have invisible semantics.

Ah, yes. You can't throw a rock at produce without hitting a brassica oleracia.

The roots of the young Brachychiton acuminatus can be cooked in ashes and eaten like a sweet potato .. but despite the vast number of rocks in its native habitat .. not a single brassica oleracia will be found by throwing them.

The point is over ... ... ... there, not

here.


So .. self confessed pointless comment?

Meanwhile, back on topic, there is produce all across the globe, not all of it surrounded by brassica oleracia.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: