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

Suggestion: Serialization Convenience Wrapper String = Filename #30151

Closed
iwelch opened this issue Nov 25, 2018 · 1 comment
Closed

Suggestion: Serialization Convenience Wrapper String = Filename #30151

iwelch opened this issue Nov 25, 2018 · 1 comment
Assignees

Comments

@iwelch
Copy link

iwelch commented Nov 25, 2018

A very common (perhaps most common) use for serialization is saving to a file. If the first argument is a string, it could be interpreted as a filename wlog.

serialize( filename::AbstractString, anything )= open(filename, "w") do ofile; serialize(ofile, anything); end;

deserialize( filename::AbstractString )= ( o=(); open(filename, "r") do ofile; o= deserialize(ofile); end; o );
@JeffBezanson
Copy link
Member

Done in #30267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants