-
Notifications
You must be signed in to change notification settings - Fork 23
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
[RFC] partial generic deduction #86
Comments
I think that partial generic deduction unnecessarily complicates the language for the user. I would be very confused to see a call like Which parameter gets bound to |
@andreaferretti agreed and disagreed.
disagreed: man, the users are programmers, not the next idiot, they are used to rules and stuff done by the compiler. If C++ and D does it, you can assume that's probably not an unreasonable feature. When the tutos/manual/book are correctly written then the behavior is understandable and usable. The issue left is readability; that can either, be left as a style choice to the "user", to name or not his leftover explicit parameters; or be forced as stated in previous paragraph. |
|
@siliconvoodoo I like I know there are rules and people can follow them, but this is not a good reason to make them unnecessarily confusing. |
ah ? ok, I don't know enough about Nim, can you show me a snippet that'd do it ? |
They are spelled out in this issue |
This RFC is stale because it has been open for 1095 days with no activity. Contribute a fix or comment on the issue, or it will be closed in 7 days. |
@Araq @dom96 @siliconvoodoo
Nim should support partial generic deduction.
this matters, eg for allowing
"true".to[bool]
(otherwise it's not DRY, eg:"true".to[bool, string]
), cf https://github.com/nim-lang/Nim/issues/7430 and other use casesif partial generic deduction is not on the roadmap, it will cause https://github.com/nim-lang/Nim/issues/7517 ([RFC] guidelines for when to use typedesc vs generics) to be in clear favor of using typedesc, which, as discussed there, is not ideal.
in C++ this works:
in D this works and used extensively
The text was updated successfully, but these errors were encountered: