Hey guys,
I wanted to change the JS statement syntax in amber to free it for pragmas :) I thought about using `return foo`, what do you think? Cheers, Nico -- Nicolas Petton http://nicolas-petton.fr -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Sometimes it is not just return, it can contain full JS code. Or did I not understand something?
Herby Nicolas Petton wrote: > Hey guys, > > I wanted to change the JS statement syntax in amber to free it for > pragmas :) > > I thought about using `return foo`, what do you think? > > Cheers, > Nico > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Hi Nico, I thought about that issue, too. What would you think of turning JS statements into Pragmas? Something similar to <JS: here be Javascript code>?
Best, Manfred On Mon, Sep 9, 2013 at 4:49 PM, Herby Vojčík <[hidden email]> wrote: Sometimes it is not just return, it can contain full JS code. Or did I not understand something? You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
I think that is a neat idea. Maybe, at some point in the future, one might return other types within pragmas e.g. <SVG: ... > etc. Cheers Andy On Mon, Sep 9, 2013 at 10:54 AM, Manfred Kröhnert <[hidden email]> wrote:
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Nicolas Petton
Nicolas Petton wrote: > Hey guys, > > I wanted to change the JS statement syntax in amber to free it for > pragmas :) > > I thought about using `return foo`, what do you think? Ah, you mean the backticks. Well, they are used in ES6. I think either use pragme <js> and treat all the rest of method as JS code, or something like <[ return foo ]> or <{ return foo }>. Or other alternatives, but all of "open/close" solutions have problem with escaping the ending should it appear in JS code. > Cheers, > Nico Herby -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Andy Burnett
Andy Burnett wrote: > I think that is a neat idea. Maybe, at some point in the future, one > might return other types within pragmas e.g. <SVG: ... > etc. No need to have pragma for SVG (nor HTML for that matter), you can use snippets for pieces of HTML (or inline SVG). > Cheers > Andy Herby -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
OK, that is good. Out of curiosity would the same apply if one wanted to include e.g. <DART: ...>. Obviously, that would only apply - at the moment - for specific Chromium builds, but it might offer interesting possibilities. Cheers Andy On Mon, Sep 9, 2013 at 10:59 AM, Herby Vojčík <[hidden email]> wrote:
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Herby Vojčík
I like the pragma idea, but then it's a 2 steps change, first change the
JS inlining syntax to something else, then implement pragmas, then use them for inlining JS code. Nico Herby Vojčík <[hidden email]> writes: > Nicolas Petton wrote: >> Hey guys, >> >> I wanted to change the JS statement syntax in amber to free it for >> pragmas :) >> >> I thought about using `return foo`, what do you think? > > Ah, you mean the backticks. Well, they are used in ES6. > > I think either use pragme <js> and treat all the rest of method as JS > code, or something like <[ return foo ]> or <{ return foo }>. Or other > alternatives, but all of "open/close" solutions have problem with > escaping the ending should it appear in JS code. > >> Cheers, >> Nico > > Herby > > -- > You received this message because you are subscribed to the Google Groups "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. > For more options, visit https://groups.google.com/groups/opt_out. -- Nicolas Petton http://nicolas-petton.fr -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Nicolas Petton wrote: > I like the pragma idea, but then it's a 2 steps change, first change the > JS inlining syntax to something else, then implement pragmas, then use > them for inlining JS code. > > Nico > > Herby Vojčík<[hidden email]> writes: > >> Nicolas Petton wrote: >>> Hey guys, >>> >>> I wanted to change the JS statement syntax in amber to free it for >>> pragmas :) >>> >>> I thought about using `return foo`, what do you think? >> Ah, you mean the backticks. Well, they are used in ES6. Now that I think about it, it is still possible to use backticks, if you accept the fact that you must double it inside (the same as with strings, like 'Don''t'). All in all, lots of options to choose from. :-/ Herby -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |