Skip to content

u/lisbonant

In this archive from Jul 2014 to Jan 2023

10
posts
105
comments
6
media
823
score

Yeah, style thing. I generally only see an explicit return if you're returning early. Otherwise, cleaner to just implicitly return the last expression in the block. This way, return is always an indicator that a certain path doesn't go through the whole function. Works if you have an if/else or match at the end too, each branch can just implicitly return.

Edit: i think cargo clippy has a lint for exactly this. Definitely recommend using it, great way to learn the style.

1 points

Nah, just something to learn like anything else. What's hard is using tools that don't verify memory safety at compile time, with all the extra boilerplate and testing and debugging...

1 points

Gentoo isn't about performance, it's about configurability. That Gentoo offers more than Arch in this regard is it really up for debate on either side. If you just need a standard desktop, yeah, Arch will do you just fine. But the universe of possible valid Gentoo setups is quite vast.

5 points

Personally, I'd stick with Gentoo. Arch is slightly more idiosyncratic, and the only real downside to Gentoo over Arch is the compile times, which can be mitigated with PORTAGE_NICENESS and by running world updates overnight.

5 points

Yup. Not denying any of that. Good Python will outperform shitty C, that's not a huge surprise. But there are numerous domains in which the runtime checks/gc pauses that come with choosing Python will make your life harder than it needs to be to get to the next frame or tick on time. Front loading that task back to the programmer and dealing with type checking at compile time is really the only feasible solution in those situations. Use both, choose for the problem. Case in point, numpy.

Edit: I should say, I'm pretty sure we're both making the same point, more or less.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.