[Swift-devel] readData2

David Kelly davidkelly999 at gmail.com
Wed Jul 6 11:16:38 CDT 2011


Would it make sense to replace readData and readStructured with one flexible
function which could use multiple formats? For example:

foo = read( -type="JSON", -file="myfile.json" );

I think JSON, XML, and CSV would be useful to have in addition to the two
existing Swift formats.

David

On Fri, Jul 1, 2011 at 9:04 PM, Justin M Wozniak <wozniak at mcs.anl.gov>wrote:

>
> fopen(3) is smart enough to know that "r" means read.  Certainly Swift is
> smarter than fopen.
>
> However, I think there is a lot of value in allowing users to read
> unformatted, "one value per line" data and I don't think we should force
> users to convert possibly large text files into Swift format.  So, I think
> there is value in keeping the two functionalities separate.
>
> If we're going to mandate a file format, we should try to be compatible
> with JSON or something.  But I don't think we should mandate a file
> format.
>
>        Justin
>
> On Fri, 1 Jul 2011, Tim Armstrong wrote:
>
> > You could go full unix shell style and call it "rd"
> >
> > On Fri, Jul 1, 2011 at 6:09 PM, Mihael Hategan <hategan at mcs.anl.gov>
> wrote:
> >
> >> On Fri, 2011-07-01 at 18:04 -0700, Sarah Kenny wrote:
> >>> my 2 cents...readStruct...slightly more succinct :)
> >>
> >> 2 more cents: read. Can't get much better than that.
> >>>
> >>> On Fri, Jul 1, 2011 at 4:22 PM, Jonathan S Monette <jonmon at utexas.edu>
> >>> wrote:
> >>>         I am all for dropping readData. writeData would have to be
> >>>         modified to output data for "readData2".
> >>>
> >>>         Do you have a better name? I thought maybe readMapping or
> >>>         readExplicitMapping but Justin said the mapping term maybe
> >>>         should not be used in this case.
> >>>
> >>>
> >>>         On Jul 1, 2011 6:12 PM, "Mihael Hategan" <hategan at mcs.anl.gov>
> >>>         wrote:
> >>>        > On Thu, 2011-06-30 at 13:40 -0500, Jonathan Monette wrote:
> >>>        >> Hello,
> >>>        >> I am going to rename readData2 to something more
> >>>         meaningful. I am
> >>>        >> thinking maybe readStructured? I will keep readData2 as an
> >>>         alias to
> >>>        >> the renamed function as too not break anyones current code
> >>>         but the
> >>>        >> userguide will reflect the renamed function. Any
> >>>         suggestions on the
> >>>        >> name or is readStructured good?
> >>>        >
> >>>        > I think we should drop readData and slowly replace it with
> >>>         readData2.
> >>>        > readStructured doesn't seem to be more illuminating to me.
> >>>        >
> >>>        >
> >>>
> >>>
> >>>         _______________________________________________
> >>>         Swift-devel mailing list
> >>>         Swift-devel at ci.uchicago.edu
> >>>
> >> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Sarah Kenny
> >>> Programmer
> >>> University of Chicago, Computation Institute
> >>> University of California Irvine, Dept. of Neurology
> >>> 773-818-8300
> >>>
> >>
> >>
> >> _______________________________________________
> >> Swift-devel mailing list
> >> Swift-devel at ci.uchicago.edu
> >> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
> >>
> >
>
> --
> Justin M Wozniak
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20110706/3f07cd3a/attachment.html>


More information about the Swift-devel mailing list