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

Comments

2 participants
@iwelch
Copy link

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 JeffBezanson self-assigned this Dec 4, 2018

JeffBezanson added a commit that referenced this issue Dec 4, 2018

JeffBezanson added a commit that referenced this issue Dec 4, 2018

JeffBezanson added a commit that referenced this issue Dec 5, 2018

@JeffBezanson

This comment has been minimized.

Copy link
Member

commented Dec 7, 2018

Done in #30267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.