3 ms·
This code is using that allocator, that's part of the issue. He wants there to be no panics, not to have the panics handled in a special way.
by steveklabnik 6y ago
This code is using that allocator, that's part of the issue. He wants there to be no panics, not to have the panics handled in a special way.
- davidhyde 6y agoI see, so anything that can possibly fail should return a result instead of "maybe" panicking as a side effect? So no panics at all in the language? That may adversely affect the ergonomics of the language for user space applications. Perhaps it would be better to build a completely fallible version of the standard library and use linting to enforce no panics.
- steveklabnik 6y agoAt the very least, no panics for allocations. Methods that return Result exist, the issue is that while they do, the panic-ing ones also exist. There are plans to address this, they just haven't been implemented yet.
- davidhyde 6y agoThanks, interesting to hear!
- jononor 6y agoIs a deny(panics) lint-rule feasible, now or in the short term? Something that would make a project fail to compile if anything use in it could panic?
- steveklabnik 6y agoI don't know enough about the specifics to really say. I do know there's interest.