From: Lucian S. <luc...@gm...> - 2013-10-22 19:00:49
|
Actually, if we're going to copy any other language's syntax for something, that something should almost certainly be Matlab, since that's what our audience will be most familiar with. It looks like matlab has both '&' and '&&', with subtly different meanings between the two. However, the latter is the more efficient term, so I would guess that 'best practices' would use that--does anyone familiar with Matlab models know if people actually do use '&&' more than '&'? Should we add '&' as alternate syntax meaning the same thing? Defining arrays in Matlab is done with square brackets, however, so I would think we definitely want to use that. We could theoretically *also* use {}'s, but I worry about 'stealing' too many characters from people's interpreters that might want to embed SBML infix-y things in it. Antimony is one example--I don't use []'s or {}'s yet, but I have so far tried to keep that to a minimum, so other systems can embed it as needed. -Lucian On Tue, Oct 22, 2013 at 11:27 AM, Chris J. Myers <my...@ec...> wrote: > Remember this is just a libsbml/jsbml issue. Tools are free to have their own parsers with different syntax. Even libsbml has two different parsers now. I just wanted to make sure we get this straight as we just discovered that jsbml and libsbml did not agree on their string parser syntax (they do now). In Lucian's infix parser, he went with C/Java syntax (ex. using "&&" rather than "&" or "and"), so it is best to keep to it, I think. It is not too hard to make alternative ones for people who want different syntax. The mathML in the SBML remains the same. > > Cheers, > > Chris > > On Oct 22, 2013, at 12:20 PM, Nicolas Le Novere <n.l...@gm...> wrote: > >> On 22/10/13 16:48, Andreas Dräger wrote: >>> Braces are >>> more intuitive and also the regular mathematical notation in text books etc. >> >> Huh? In Germany then. In high school in France we used parenthesis. And from university we always used square brackets. Which are the two notations mentioned in the Wikipedia matrix page by the way (the arrays related pages only use square brackets). Braces were used for sets, which are something completely different. Until today If I saw {a, b, c}, I would never have thought of an array, but of an unordered list. Now I realise mathematics is maybe not a universal language after all. >> >> Programming is a different thing. It seems language inventors used everything they could find. >> >> -- >> Nicolas LE NOVERE, Babraham Institute, Babraham Campus Cambridge, CB22 3AT >> Tel: +441223496433 Mob:+447833147074 n.l...@gm... >> orcid.org//0000-0002-6309-7327 http://lenoverelab.org/perso/lenov/ >> Skype:n.lenovere twitter:@lenovere http://nlenov.wordpress.com/ >> >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk >> _______________________________________________ >> sbml-arrays mailing list >> sbm...@li... >> https://lists.sourceforge.net/lists/listinfo/sbml-arrays > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk > _______________________________________________ > sbml-arrays mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbml-arrays |