-
Notifications
You must be signed in to change notification settings - Fork 21
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
Override ToString
for discriminated unions and records
#429
Comments
@kurtschelfthout I've added you as write-admin in this repo if you want to edit issue descriptions directly, thanks |
@dsyme, will do. Thanks! |
This is now covered by the RFC and has already been implemented. Thanks all! |
Question from the sky: Is this implemented in such a way that it avoids the performance penalties of |
New location of RFC: https://github.com/fsharp/fslang-design/blob/main/FSharp-4.1b/FS-1022-override-ToString-for-discriminated-unions-and-records.md. This was implemented for F# 4.1. |
Submitted by Vasily Kirichenko on 4/15/2015 12:00:00 AM
181 votes on UserVoice prior to migration
It's a pain and dirty to add
override x.ToString() = sprintf "%A" x
to every type in order to makeString.Format()
happy:I think it's very easy to teach the compiler generate this override automatically for all user types.
Response
** by fslang-admin on 6/23/2016 12:00:00 AM **
Marking as planned, though we need to work out the details
Don Syme
F# Language and Core Library Evolution
Original UserVoice Submission
The text was updated successfully, but these errors were encountered: