Interpolation character in Julius

Hamlet, Cassius and (currently) Julius all use a consistent set of characters for interpolation. The dollar sign ($) is for plain scalars, the at sign (@) is for URLs and the caret (^) is for embedding other templates (mixins in the case of Cassius). I like this consistency. Unfortunately, in the case of Julius, the dollar sign is a suboptimal character to use since jQuery uses is so extensively. Currently, to write some simple jQuery Javascript such as: $("h1").hide() you have to use a double dollar sign to achieve escaping, namely: $$("h1").hide() So the questions to the list are: * Is it worth trading consistency for a better choice of interpolation character? * If so, what would be a more optimal interpolation character? I think percent sign (%) might be acceptable. Interpolation is not as important in Julius as it is in Hamlet, so I'm beginning to lean towards replacing the character. Michael

Did you ever make a decision about this? Will the new hamlet syntax affect this? Max On Aug 24, 2010, at 2:12 AM, Michael Snoyman wrote:
Hamlet, Cassius and (currently) Julius all use a consistent set of characters for interpolation. The dollar sign ($) is for plain scalars, the at sign (@) is for URLs and the caret (^) is for embedding other templates (mixins in the case of Cassius). I like this consistency.
Unfortunately, in the case of Julius, the dollar sign is a suboptimal character to use since jQuery uses is so extensively. Currently, to write some simple jQuery Javascript such as:
$("h1").hide()
you have to use a double dollar sign to achieve escaping, namely:
$$("h1").hide()
So the questions to the list are:
* Is it worth trading consistency for a better choice of interpolation character? * If so, what would be a more optimal interpolation character? I think percent sign (%) might be acceptable.
Interpolation is not as important in Julius as it is in Hamlet, so I'm beginning to lean towards replacing the character.
Michael _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

Yes, we use the percent sign now.
On Mon, Dec 20, 2010 at 8:45 AM, Max Cantor
Did you ever make a decision about this? Will the new hamlet syntax affect this?
Max
On Aug 24, 2010, at 2:12 AM, Michael Snoyman wrote:
Hamlet, Cassius and (currently) Julius all use a consistent set of characters for interpolation. The dollar sign ($) is for plain scalars, the at sign (@) is for URLs and the caret (^) is for embedding other templates (mixins in the case of Cassius). I like this consistency.
Unfortunately, in the case of Julius, the dollar sign is a suboptimal character to use since jQuery uses is so extensively. Currently, to write some simple jQuery Javascript such as:
$("h1").hide()
you have to use a double dollar sign to achieve escaping, namely:
$$("h1").hide()
So the questions to the list are:
* Is it worth trading consistency for a better choice of interpolation character? * If so, what would be a more optimal interpolation character? I think percent sign (%) might be acceptable.
Interpolation is not as important in Julius as it is in Hamlet, so I'm beginning to lean towards replacing the character.
Michael _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

is that only with the new syntax thats on github or with julius thats on hackage? In other words, as of which version of hamlet? Thanks, max On Dec 20, 2010, at 3:32 PM, Michael Snoyman wrote:
Yes, we use the percent sign now.
On Mon, Dec 20, 2010 at 8:45 AM, Max Cantor
wrote: Did you ever make a decision about this? Will the new hamlet syntax affect this?
Max
On Aug 24, 2010, at 2:12 AM, Michael Snoyman wrote:
Hamlet, Cassius and (currently) Julius all use a consistent set of characters for interpolation. The dollar sign ($) is for plain scalars, the at sign (@) is for URLs and the caret (^) is for embedding other templates (mixins in the case of Cassius). I like this consistency.
Unfortunately, in the case of Julius, the dollar sign is a suboptimal character to use since jQuery uses is so extensively. Currently, to write some simple jQuery Javascript such as:
$("h1").hide()
you have to use a double dollar sign to achieve escaping, namely:
$$("h1").hide()
So the questions to the list are:
* Is it worth trading consistency for a better choice of interpolation character? * If so, what would be a more optimal interpolation character? I think percent sign (%) might be acceptable.
Interpolation is not as important in Julius as it is in Hamlet, so I'm beginning to lean towards replacing the character.
Michael _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

It's definitely on Hackage right now. I *think* it started with 0.6,
though it might have made it into 0.5.
On Mon, Dec 20, 2010 at 10:22 AM, Max Cantor
is that only with the new syntax thats on github or with julius thats on hackage? In other words, as of which version of hamlet?
Thanks, max
On Dec 20, 2010, at 3:32 PM, Michael Snoyman wrote:
Yes, we use the percent sign now.
On Mon, Dec 20, 2010 at 8:45 AM, Max Cantor
wrote: Did you ever make a decision about this? Will the new hamlet syntax affect this?
Max
On Aug 24, 2010, at 2:12 AM, Michael Snoyman wrote:
Hamlet, Cassius and (currently) Julius all use a consistent set of characters for interpolation. The dollar sign ($) is for plain scalars, the at sign (@) is for URLs and the caret (^) is for embedding other templates (mixins in the case of Cassius). I like this consistency.
Unfortunately, in the case of Julius, the dollar sign is a suboptimal character to use since jQuery uses is so extensively. Currently, to write some simple jQuery Javascript such as:
$("h1").hide()
you have to use a double dollar sign to achieve escaping, namely:
$$("h1").hide()
So the questions to the list are:
* Is it worth trading consistency for a better choice of interpolation character? * If so, what would be a more optimal interpolation character? I think percent sign (%) might be acceptable.
Interpolation is not as important in Julius as it is in Hamlet, so I'm beginning to lean towards replacing the character.
Michael _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel
participants (2)
-
Max Cantor
-
Michael Snoyman