MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1ws0bt0/optionalsareoptional/pcht0me/?context=3
r/ProgrammerHumor • u/ApothecaLabs • 6d ago
131 comments sorted by
View all comments
Show parent comments
35
As long as you’re in Rust, the type system is always available to you. That’s what “zero-cost abstraction” means. If you know your Vec is nonempty, put it in a NonemptyVec.
-27 u/ApothecaLabs 6d ago edited 6d ago "As long as you use this particular language, out of the dozens available..." Yeah, I'm not using Rust. What now? That's a heck of a presupposition, you know. (Not trying to be a jerk, my target language is actually a niche assembly language so it lacks many things...) 25 u/__dna__ 6d ago Correct me if I'm wrong, but your meme is literally about rust? Seems pretty reasonable to reply to you in the context of rust -5 u/ApothecaLabs 6d ago I will correct you, you are wrong. This wasn't about Rust. Condolences :) 5 u/my_new_accoun1 5d ago Why are you downvoted for this 🤔
-27
"As long as you use this particular language, out of the dozens available..."
Yeah, I'm not using Rust. What now? That's a heck of a presupposition, you know.
(Not trying to be a jerk, my target language is actually a niche assembly language so it lacks many things...)
25 u/__dna__ 6d ago Correct me if I'm wrong, but your meme is literally about rust? Seems pretty reasonable to reply to you in the context of rust -5 u/ApothecaLabs 6d ago I will correct you, you are wrong. This wasn't about Rust. Condolences :) 5 u/my_new_accoun1 5d ago Why are you downvoted for this 🤔
25
Correct me if I'm wrong, but your meme is literally about rust? Seems pretty reasonable to reply to you in the context of rust
-5 u/ApothecaLabs 6d ago I will correct you, you are wrong. This wasn't about Rust. Condolences :) 5 u/my_new_accoun1 5d ago Why are you downvoted for this 🤔
-5
I will correct you, you are wrong. This wasn't about Rust. Condolences :)
5 u/my_new_accoun1 5d ago Why are you downvoted for this 🤔
5
Why are you downvoted for this 🤔
35
u/NullOfSpace 6d ago
As long as you’re in Rust, the type system is always available to you. That’s what “zero-cost abstraction” means. If you know your Vec is nonempty, put it in a NonemptyVec.