On Feb 21, 2014, at 3:27 AM, Dmitri Gribenko <[email protected]> wrote:
> On Fri, Feb 21, 2014 at 12:34 AM, Ben Langmuir <[email protected]> wrote: >> >> On Feb 20, 2014, at 4:11 PM, Ben Langmuir <[email protected]> wrote: >>> We could use the YAML version string >>> %YAML 1.2 >> >> Actually, if we go this route we should encode our own version number in the >> same place for compactness. In YAML, we could use a tag for this >> >> %TAG ! tag:vfs-yaml-file,version:1234 >> >> Where 1234 is a made up version number for our vfs format. > > Then we would need to make sure to use this tag, otherwise its > presence or absence should not affect the semantics of the file, I > think. > > But I don't see why is it a big deal to add 'version': 1, since both > of these solutions will increase the size of file by one line. Adding > a field looks simpler, more easily understandable, and keeps > compatibility with JSON. The problem with a simple JSON field is that it is not clear that we are depending on the presence of something at the beginning of the file in order to interpret it as JSON. It is more clear to say the file should have this at the top: %TAG ! tag:vfs-yaml-file… vs the file should have this at the top: { ‘version’: 1 > > Dmitri > > -- > main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if > (j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/ > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
