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

Add more immutability-friendly APIs #116

Closed
knocte opened this issue Mar 20, 2015 · 2 comments · Fixed by #117
Closed

Add more immutability-friendly APIs #116

knocte opened this issue Mar 20, 2015 · 2 comments · Fixed by #117
Labels
enhancement New feature or request

Comments

@knocte
Copy link
Contributor

knocte commented Mar 20, 2015

When using MimeKit & MailKit from F#, some things look weird, because of how F# programs you to think in immutability all around.

For example, I would prefer that MimeMessage ctor not be parameterless, and accept subject, body, and arrays for From & To parameters (to avoid using the setters of properties).

This way an F# developer could use this API without the need of using the evil assignment operator that we're now allergic to :-)

Would you be willing to add such a constructor? If the answer is "Yes, patches welcome", I'll happily do it when I've some time in my hands.

Thanks

@jstedfast
Copy link
Owner

Someone actually did this for classes like MimePart, TextPart, etc.

I'd be willing to have this type of API available for MimeMessage as well.

Give me a proposal and/or PR and we can work out the details.

@knocte
Copy link
Contributor Author

knocte commented Mar 20, 2015

Thanks, will do.

knocte added a commit to knocte/MimeKit that referenced this issue Mar 20, 2015
knocte added a commit to knocte/MimeKit that referenced this issue Mar 20, 2015
knocte added a commit to knocte/MimeKit that referenced this issue Mar 20, 2015
knocte added a commit to knocte/MimeKit that referenced this issue Mar 20, 2015
@jstedfast jstedfast added the enhancement New feature or request label Mar 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants