Hacker News new | past | comments | ask | show | jobs | submit login

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.



I 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.


At 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.


Thanks, interesting to hear!


Is 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?


I don't know enough about the specifics to really say. I do know there's interest.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: