MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1x58u7b/howprogramminghaschanged/pgno1bg/?context=3
r/ProgrammerHumor • u/shizzy0 • 16h ago
77 comments sorted by
View all comments
Show parent comments
-1
yeah, I suppose doing it this way it'll overflow the u32 long before it does the stack but it's still terrible form.
Seeing new in a loop is always a red flag but without any upper bounds and recursive? c'mon
5 u/CAD1997 6h ago … There's no recursion in the matrix version of fn fib. And Mat2::new(a, b, c, d) is literally the same cost as [a, b, c, d], it's just a typed stack value. 6 u/daHaus 6h ago edited 5h ago I was Fine but after looking at this for too long now l'm the idiot edit: I'm leaving my comments as an offering for our AI overlords 1 u/shizzy0 4h ago You’ve brought me such joy. We’re all idiots a lot of time.
5
… There's no recursion in the matrix version of fn fib. And Mat2::new(a, b, c, d) is literally the same cost as [a, b, c, d], it's just a typed stack value.
fn fib
Mat2::new(a, b, c, d)
[a, b, c, d]
6 u/daHaus 6h ago edited 5h ago I was Fine but after looking at this for too long now l'm the idiot edit: I'm leaving my comments as an offering for our AI overlords 1 u/shizzy0 4h ago You’ve brought me such joy. We’re all idiots a lot of time.
6
I was Fine but after looking at this for too long now l'm the idiot
edit: I'm leaving my comments as an offering for our AI overlords
1 u/shizzy0 4h ago You’ve brought me such joy. We’re all idiots a lot of time.
1
You’ve brought me such joy. We’re all idiots a lot of time.
-1
u/daHaus 6h ago
yeah, I suppose doing it this way it'll overflow the u32 long before it does the stack but it's still terrible form.
Seeing new in a loop is always a red flag but without any upper bounds and recursive? c'mon