<div dir="ltr">While thinking on a new string literal that may support DSL's, the syntax should optionally receive a language specification on opening.<div>The thing that sucks most about DSL's is that the IDE can't syntax hilight them, but if it was provided what language the string was, then a smart IDE could apply syntax hilighting for that language within the scring scope.</div>
<div>Eg, this sort of thing is supported in html, which is usually hilighted correctly by IDE's:</div><div> <script type="text/javascript"> or <script language="javascript"></div><div>
<br></div><div>And exists in many other places too.<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 November 2013 08:26, Timothee Cour <span dir="ltr"><<a href="mailto:thelastmammoth@gmail.com" target="_blank">thelastmammoth@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">actually an important use case of this feature is to help writing domain specific language inputs, eg writing a python file inside D, or config / plain text files.<div>
# is common in many languages (eg python/bash etc) as a comment.</div>
<div><br></div><div>@ would be inside string literal so should cause little confusion from D's side, but for example would force one to escape '@' in email addresses (more rare).</div><div><br></div><div>Frankly, this is bike shedding though; let's assume we pick one in <a href="http://www.ascii-code.com/" target="_blank">http://www.ascii-code.com/</a> and focus on whether we can agree on this feature.</div>
<div><br></div><div>I'm using it extensively for great benefit: more DRY code, less spurious files, cleaner integration with D.</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Fri, Nov 1, 2013 at 12:33 AM, Jacob Carlborg <span dir="ltr"><<a href="mailto:doob@me.com" target="_blank">doob@me.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 2013-10-31 22:47, Timothee Cour wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
$ is another obvious choice (eg in shell expansion)<br>
but # could also be good as it's very much unused in D.<br>
</blockquote>
<br></div>
Yeah, # is only used for #line, which should be less common than $.<span><font color="#888888"><br>
<br>
-- <br>
/Jacob Carlborg<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>