Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate TryInsert methods for C# modules #2234

Open
joshua-spacetime opened this issue Feb 9, 2025 · 1 comment
Open

Generate TryInsert methods for C# modules #2234

joshua-spacetime opened this issue Feb 9, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@joshua-spacetime
Copy link
Collaborator

joshua-spacetime commented Feb 9, 2025

C# doesn't generate TryInsert methods. See module-test-cs.

@gefjon
Copy link
Contributor

gefjon commented Feb 9, 2025

This is part of the intended design (for what that's worth; it's totally fair to criticize the intended design). My belief is that try_* methods are only necessary in Rust, where panicking is distinct from returning an error; in C#, both are encompassed by throwing an exception, so you only need one method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants