Live data from Hacker News

Stroustrup's Rule (2024)

buttondown.com

11–20 of 37 posts

Re: Stroustrup's Rule (2024)

#12
> as they become experts, they prefer terse syntax.

In my experience, the man-hours of expertise may be less than you'd think: I've probably spent more hours (or at least subjective frustration) being the beginner in different things than I have spent hours being able to enjoy expertise after earning it in a language/framework/convention/tool. Sometimes it's even the same subject, years later.

I propose that catering to "beginners in language" is under-valued, since it's not the same as "new in career".

Re: Stroustrup's Rule (2024)

#13

I would modify Stroustrup's rule like so: * For new features, people insist on LOUD explicit syntax. * For established features [that turned out to be used disproportionately often], people want terse notation. So, I argue, it's not really people getting used to the feature that allows it to be terser. It's that enough time passes that you figure out what features are used enough that they warrant the terse syntax (l…

Right, and the exact same thing happens in all human languages. The reason we have words for things is they are common enough ideas to warrant one. There is probably no word for "the feeling one gets when floating in a sea of beans", although I am, of course, able to express this explicitly. If this feeling became important enough we'd probably start getting a word for it, possibly starting with a portmanteau like "beanfloat".

Ultimately we're just lazy and don't like having to use lots of words over and over again.

Re: Stroustrup's Rule (2024)

#14
Having observed that this is true, a good designer would see Rust's Editions and seize upon this as a useful, even necessary idea for a language intended to last for more than a few years.

In 2019 P1881 "Epochs" https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p18... was instead given the usual treatment by WG21, Vittorio was told it would be very difficult, numerous obstacles were identified and he was told to go away and solve them (implied: and if you come back we'll find more).

That paper was written after Rust's 2018 Edition (and of course the Rust 1.0 "2015 Edition" implied by the implementation of editions) but since then 2021 Edition and 2024 Edition both landed significant further improvements.

Re: Stroustrup's Rule (2024)

#15
>At the beginning of a language's life, everybody's a beginner. Over time the ratio of experts to beginners changes, and this leads to more focus on "expert-friendly" features, like terser syntax.

Hence why so many shell classics are so short. You don't type R-I-P-G-R-E-P, you type R-G and get on with it, which itself probably evolved from something like the author's own `alias eg="grep -r"` pattern back in the day (that's me spitballing, I don't have proof of that claim).

Re: Stroustrup's Rule (2024)

#16
post #12

> as they become experts, they prefer terse syntax. In my experience, the man-hours of expertise may be less than you'd think: I've probably spent more hours (or at least subjective frustration ) being the beginner in different things than I have spent hours being able to enjoy expertise after earning it in a language/framework/convention/tool. Sometimes it's even the same subject, years later. I propose that caterin…

More concretely, as many as half of the users of a popular programming language will have less than four years of experience: https://entropicthoughts.com/python-programmers-experience

Re: Stroustrup's Rule (2024)

#17
I guess in this AI age, verbose language features may burn more tokens than terse versions. In that sense, it's probably more economical for the AI to consume and produce terse code. But of course, if the code is to be read by humans eventually, then maybe there could be a service to help explain the terse code if the human reader is confused, or automatically expand the terse code to verbose code at the human reader's comfort level.

Re: Stroustrup's Rule (2024)

#18
post #12

> as they become experts, they prefer terse syntax. In my experience, the man-hours of expertise may be less than you'd think: I've probably spent more hours (or at least subjective frustration ) being the beginner in different things than I have spent hours being able to enjoy expertise after earning it in a language/framework/convention/tool. Sometimes it's even the same subject, years later. I propose that caterin…

This is why I think the "AI agents are useless for seniors" framing is misleading.

Unless you're doing something very niche and specific, you will constantly encounter new libraries, new domains, new protocols, new things you're not that familiar with. Very few people are an expert in CORS, Postgresql query optimization, advanced Typescript generics, setting up Blue-green deployments on Kubernetes, and modeling the domain of labor union disputes in the automotive industry. It is not impossible for one software engineer to need to touch all five within a week.

AI isn't really an expert in any of them either, but if it's something you need once and expect to never need again, it can often get you past whatever hump you're facing right now.

Re: Stroustrup's Rule (2024)

#19
post #8

Another thing in that vein is features that were built because the previous approach was obtuse. For instance, find it harder to explain async/await in JS to people who never experienced callback hell, or why there is a borrow checker in Rust to people who never tried C++.

In well thought out C++ software lifetime rarely becomes an issue because deciding on ownership and object lifetime is unavoidable as part of the design process.

Re: Stroustrup's Rule (2024)

#20
Human knowledge is abstraction piled upon abstraction.

For the AI lovers, human brains run natural compression algorithms to maintain the context window small, which allows us to abstract further. The problem with

  err := function()
  if err != nil {
    return err
  }
in Go is that is such a common pattern it goes against our natural drive to simplify it so we are able to view more of the program.
Post reply on HN