On Saturday, June 25, 2016 at 8:04:15 PM UTC+2, Andrew wrote: > > Why are double quotes > <http://tiddlywiki.com/dev/#TiddlyWiki%20Coding%20Style%20Guidelines> > preferred over single quotes for string literals? >
It's just a convention, which is probably active since TWclassic, and discussing it may cause a "religious war" ;) > It means that every time there is a double quote character it takes up > twice the space in the core or in plugins because it has to be escaped. > It's exactly the same problem and argument with 'I don\'t want to escape double quotes'. If I do understand your argument right. > Single quotes don't have to be escaped so why not use those whenever > possible? > See my example above. also see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String > I'm just asking because I'm finding it reduces size, increases speed and > the only exception I can find to using single over double is triple. > I don't understand this statement. ... I think nobody (except the browser programmers) really know, what browsers do with our strings. <https://blog.mozilla.org/javascript/2014/07/21/slimmer-and-faster-javascript-strings-in-firefox/> So trying to optimize speed and memory usage with using ' over " is wasting time. just some thoughts -mario -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/78bf1db3-20bb-4073-b562-6da83c3b8602%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
