News for hackers. Stuff that matters.
Re:Rustc: Add do yeet expressions to allow experimentation i... by girvo on Friday May 06, 2022 @12:34AM (#31281360)
Oh man that's amusing -- I'm not up on Rust internals, but it seems like it's used a funny test case for some other compiler ability?
Re:Rustc: Add do yeet expressions to allow experimentation i... by duskwuff on Friday May 06, 2022 @12:50AM (#31281426)
"yeet" is being used as a placeholder for a keyword which will rethrow errors to a caller. It probably won't actually be called "yeet"; they're just using a deliberately silly keyword to keep discussion focused on the functionality.

https://areweyeetyet.rs/

Re:Rustc: Add do yeet expressions to allow experimentation i... by cormacrelf on Friday May 06, 2022 @04:50AM (#31282923)
I’m puzzled as to why this PR used “do yeet” and not just “yeet”. Are they bikeshed-avoiding the bikeshed-avoidance because just “yeet” would actually be ergonomic and fun and therefore become a candidate if not deliberately sabotaged? Was “yeet” too credible? Is this admission paving the way for actually using “yeet” as the final syntax later? This drama and more, nightly at 7pm.
Re:Rustc: Add do yeet expressions to allow experimentation i... by the8472 on Friday May 06, 2022 @04:58AM (#31282964)
`do` already was a reserved keyword, so it doesn't cause any conflicts with identifiers when parsing
Re:Rustc: Add do yeet expressions to allow experimentation i... by dathinab on Friday May 06, 2022 @09:43AM (#31284981)
> probably

Pretty much guaranteed, as "do yeet" is also rather long. Likely some new edition introduced keyword/syntax or similar will be used.

Also while yeet is "fun" very few want to see it in the language for real ;)

Re:Rustc: Add do yeet expressions to allow experimentation i... by felurx on Friday May 06, 2022 @08:48AM (#31284493)
"yeet is for the people" is a wonderful quote from that page.
Re:Rustc: Add do yeet expressions to allow experimentation i... by radarsat1 on Friday May 06, 2022 @02:42AM (#31282023)
I mean.. "rethrow" sounds fine?
Re:Rustc: Add do yeet expressions to allow experimentation i... by heinrich5991 on Friday May 06, 2022 @03:44AM (#31282464)
Your comment demonstrates why they chose "yeet". People start discussing the name before the feature, and choosing a name that is obviously not the final one lets them say "look, you don't have to discuss this yet".
Re:Rustc: Add do yeet expressions to allow experimentation i... by umanwizard on Friday May 06, 2022 @09:56AM (#31285124)
Well, if they wanted people not to discuss the name, picking a polarizing, very distinctive, extremely annoying name is about the worst thing they could have done, even as a temporary placeholder.
Re:Rustc: Add do yeet expressions to allow experimentation i... by efaref on Friday May 06, 2022 @07:41AM (#31283963)
It's not necessarily a "re-"throw. It could just be a throw of a newly detected error, like:

    try {
        if bad_thing {
            do yeet Error::new(...);
        }
        carry_on()
    }
Just plain "throw" would probably be fine, but I understand not wanting to bikeshed it at this stage.

Weirdly, "yeet" really does convey the sense of "just give up and chuck this thing back instead" that makes it a reasonable nice converse of "try", i.e. "try { yeet }".

Re:Rustc: Add do yeet expressions to allow experimentation i... by fhars on Friday May 06, 2022 @03:17AM (#31282292)
They haven't even decided if this should be a language feature at all, an you are already bikeshedding the name...
Re:Rustc: Add do yeet expressions to allow experimentation i... by rocqua on Friday May 06, 2022 @03:44AM (#31282465)
Bikeshedding from the outside is fine. As long as actual decision makers and productive project members aren't participating, bikeshedding can even be fun.
Re:Rustc: Add do yeet expressions to allow experimentation i... by themulticaster on Friday May 06, 2022 @05:58AM (#31283351)
Be careful with that - some Rust team members are active around HN [1], some are even participating in the comment section for this post. So I guess we need to exclude them from the outsider-exclusive bikeshedding event.

I agree, bikeshedding can be fun, as long as it's not during a meeting.

[1] Steve Klabnik, I know you're going to see this - just wanted to say hi, I hope you're having a nice day :)

Re:Rustc: Add do yeet expressions to allow experimentation i... by steveklabnik on Friday May 06, 2022 @12:37PM (#31287159)
I'm doing okay, thanks! I'm not on any Rust teams, anymore, though.

There are some other folks around so your point isn't incorrect, only about me.

Re:Rustc: Add do yeet expressions to allow experimentation i... by sgtnoodle on Friday May 06, 2022 @04:09AM (#31282640)
It's not really my place to warn you since it's not my problem, but I take exception to your assertion that the poster is in error. I think we should raise the bar, and check ourselves when being too critical. Try not to panic when other folk throw out ideas, even when you find fault in them. I didn't expect this to be a political topic, unlike abortion the last few days. Yeetsh!

I've been recently working on a new system that involves a custom IDL. We ended up adding a "[<=]" syntax, but we were worried it would be confusing to new developers. We realized it would make people happy to have an excuse to type smiley faces, though.

Re:Rustc: Add do yeet expressions to allow experimentation i... by sgtnoodle on Saturday May 07, 2022 @04:19AM (#31292975)
I guess folk here don't like puns.
Re:Rustc: Add do yeet expressions to allow experimentation i... by dathinab on Friday May 06, 2022 @09:49AM (#31285054)
Bikeshedding is a major pain for developing in large projects.

Naming bikeshedding is one of the worst kind of bikeshedding.

By now I'm sure of two things:

- People will not agree on a name.

- People will diverge any technical discussion again and again and again because they need to discuss naming.

So in the end most likely there will be some formal or informal survey and then the language teem will do a top-down decisions for one of the more well liked candidates, it's as far as I can tell pretty much the best way to go. (Theoretically you could have a vote, but then you need a proper not easily manipulated voting system people need to take serious, or it will be named not yeet in the end because people are trolls).

EDIT: Also this is not a developer discussion so I guess it's fine here ;)

Re:Rustc: Add do yeet expressions to allow experimentation i... by TheCycoONE on Friday May 06, 2022 @06:04PM (#31290038)
Oh, if we're bike shedding I propose ¿ as the natural syntax (because it jumps to ?.) /s
Re:Rustc: Add do yeet expressions to allow experimentation i... by oxff on Friday May 06, 2022 @04:17AM (#31282690)
leaving it as yeet sounds fine to me honestly