Right, so you can’t “enforce” a return from the function.
- 6 Posts
- 19 Comments
shouldn’t Rust enforce returning from function
How do you enforce returning from
exitor a function with a loop that never terminates?
You’re kidding yourself if you think most people in this thread are actually programmers. Most people here wouldn’t know the difference between C and Rust code if they saw it, let alone be able to write anything in either language.
0xDEADBEEFCAFEto
Programming Circlejerk•I no longer think you should learn to codeEnglish
17·1 year agoI also don’t think people should learn to code but that’s because I want to limit the available workforce and inflate my wages.
0xDEADBEEFCAFEto
C++•Crate-training Tiamat, un-calling Cthulhu:Taming the UB monsters in C++English
10·1 year agoWe have already accomplished a great deal. Compile-time C++ is already fully free of UB, which means a huge chunk of real-world C++ is already UB-free today.
This statement is so categorically ridiculous that I have no choice but to assume that Herb Sutter is deliberately trying to mislead people. I would be very surprised if even 5% of “real-world C++” occurred at compile time. In fact, I would be very surprised if even 5% of “real-world C++” was valid
constexprthat just ran at runtime.
0xDEADBEEFCAFEto
GitLab•GitLab 17.10 released with Duo Code Review & Root Cause AnalysisEnglish
2·1 year ago“Duo Code Review” just seems to be AI trash instead of an actually useful feature. I was hoping it would be some new way of code review or something.
0xDEADBEEFCAFEto
Programming Circlejerk•Liking any of these indicates a belief system I don't agree withEnglish
71·1 year agoYou can tell he’s a simple minded idiot because Jabbascript and Go aren’t immediate disqualifiers in all scenarios.
I was more thinking along the lines of having FOSS repos that are primarily used by me but which can accept external pull requests by anybody with a Github account.
I like the idea of running my own machine for CI but I don’t like the idea of having to become knowledgeable about avoiding exploits.
Just self host an open source runner like woodpecker and you’ll never have to move again
How painful is the setup and general maintenance/security?
I’m considering the idea but I just don’t want to deal with people abusing exploits in the actions that give them access to my LAN.
I can’t define jerking but I know it when I see it.
It’s worth considering the original sub rules:
- Original sources only, no manufactured jerk
- No socialjerking (IMO this one is super critical to not just devolve politics spam)
- No crazy people
- No enthusiastic youngsters
- No long unjerk threads
- No implicitly untagged jerk (this will probably be hard to enforce since some replies seem to be serious)
0xDEADBEEFCAFEto
Linux•Rust drivers expected to become more common in Linux kernelEnglish
7·1 year agoI defiantly had a far easier time learning c and apply my existing programming knowledge. Getting my head around the borrow checker was one hell of a pain in the ass.
What specifically was difficult to understand about the borrow checker? Much of what the borrow checker requires you to do are things that you still need to do in C just without compiler support.
I have used cargo ramdisk before with success.
According to this this slideshow:
At a fundamental level, this is the state of terminal emulators today as I saw it. You have fast terminals, feature rich terminals, and native terminals. You can pick at most two properties to have.
Ghostty aims for – and in my opinion already achieves – all properties.
Also, calling out the warning signs, my bar for a native platform experience is that the app feels and acts like a purpose-built native app. I don’t think this bar is unreasonable. For example, I don’t think it’s unreasonable to say that Alacritty is kind of not native because new windows create new processes. Or that Kitty is kind of not native because tabs use a non-native widget. And so on (there are many more examples for each).
Take a look at xtask. It essentially relies on the fact that you can add
cargoaliases in local files in order to execute specific packages.When I create a workspace that has some form of code generation I like to overwrite
cargo gento whatever is doing the generating.
Number 4 is only about not returning
impl Intoand instead just returningT.
0xDEADBEEFCAFEto
commandline•Zellij - a terminal workspace with batteries includedEnglish
9·3 years agozellijis a terminal multiplexer liketmuxwhich for example allows you to have multiple terminals shown in the same window. It works both locally and over SSH. Which GUI would do the same?I’m currently using
zellijafter previously having usedtmux. For mezellijis a direct upgrade in every way, and the defaulttmuxkeybindings are even supported out of the box inzellijwhich makes transitioning incredibly easy. The only downside is that I have no idea how to pronounce the name.
0xDEADBEEFCAFEto
Rust•UniFFI - automatically generate foreign-language bindings targeting Rust librariesEnglish
2·3 years agoThat’s a bummer. I guess what I though was PyO3 type hints was actually just PyCharm guessing at the types.
I tried creating a
.pyifile and it seems to be a pretty big improvement over no type hints, but I don’t know how to add type hints for modules added withPyModule::add_moduleand adding the.pyifile seems to make the type checker not know about my other modules.Would you mind sharing the script for auto generating type hints? Keeping them in sync manually would be pretty annoying.
0xDEADBEEFCAFEto
Rust•UniFFI - automatically generate foreign-language bindings targeting Rust librariesEnglish
6·3 years agoHow is the quality of the generated bindings?
I have previously used PyO3 for Python bindings and it doesn’t seem to correctly generate type hints.



Everything Herb Sutter says about the popularity of C++ should be taken with a huge grain of salt.