Why does ClojureScript support string interpolation for js* and not regular
clojurescript strings? Interpolation would be very useful.
(def x hi)
(js* alert(~{x});) = hi
(js/alert ~{x}) = ~{x}
--
--
You received this message because you are subscribed to the Google
Groups Clojure group
string interpolation for js* and not
regular clojurescript strings? Interpolation would be very useful.
(def x hi)
(js* alert(~{x});) = hi
(js/alert ~{x}) = ~{x}
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email
to implement some operators and the
interpolation helps there. I don't think js* is really meant to be used too
much outside of core. Any reason to not just use str?
(def x david)
(str hello x)
2013/2/8 da...@dsargeant.com
Why does ClojureScript support string interpolation for js
)
2013/2/8 da...@dsargeant.com
Why does ClojureScript support string interpolation for js* and not
regular clojurescript strings? Interpolation would be very useful.
(def x hi)
(js* alert(~{x});) = hi
(js/alert ~{x}) = ~{x}
--
--
You received this message because you are subscribed
* is used internally in cljs to implement some operators and the
interpolation helps there. I don't think js* is really meant to be used
too much outside of core. Any reason to not just use str?
(def x david)
(str hello x)
2013/2/8 da...@dsargeant.com
Why does ClojureScript support string
reason to not just use str?
(def x david)
(str hello x)
2013/2/8 da...@dsargeant.com
Why does ClojureScript support string interpolation for js* and not regular
clojurescript strings? Interpolation would be very useful.
(def x hi)
(js* alert(~{x});) = hi
(js/alert ~{x}) = ~{x
Thanks Mike. This is what I was looking for.
On Nov 20, 8:31 pm, Mike K mbk.li...@gmail.com wrote:
Check out the macro from clojure.contrib.strint.
http://clojure.github.com/clojure-contrib/strint-api.html
--
You received this message because you are subscribed to the Google
Groups
2010/11/21 HiHeelHottie hiheelhot...@gmail.com:
I think ruby has nice string interpolation. You can put the following
in a textfield that a user can modify
This is a #{adjective} string.
Then, you can take that string, put it in quotes and have ruby
evaluate it as a string. What
I think ruby has nice string interpolation. You can put the following
in a textfield that a user can modify
This is a #{adjective} string.
Then, you can take that string, put it in quotes and have ruby
evaluate it as a string. What is the clojure way of doing something
similar. Presenting
has nice string interpolation. You can put the following
in a textfield that a user can modify
This is a #{adjective} string.
Then, you can take that string, put it in quotes and have ruby
evaluate it as a string. What is the clojure way of doing something
similar. Presenting something like
://www.gettingclojure.com/cookbook:sequences#commas
Have all good days,
David Sletten
On Nov 20, 2010, at 6:00 PM, HiHeelHottie wrote:
I think ruby has nice string interpolation. You can put the following
in a textfield that a user can modify
This is a #{adjective} string.
Then, you can take
Check out the macro from clojure.contrib.strint.
http://clojure.github.com/clojure-contrib/strint-api.html
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members
Check out the macro from clojure.contrib.strint.
http://clojure.github.com/clojure-contrib/strint-api.html
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members
Wow, David, that's a nice little demonstration of cl-format. I hadn't
seen that before.
But as Mike points out, clojure.contrib.strint/ is more precisely
what the poster is asking for: true ruby-style string interpolation.
It has occurred to me to extend cl-format to do real string
interpolation
Check out the macro from clojure.contrib.strint.
http://clojure.github.com/clojure-contrib/strint-api.html
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members
Thanks for the macro. =)
The str function is really a good replacement for interpolation.
Yes, thank you for the macro. I anticipate using this approach (I'm
accustomed to it from Ruby, Perl and JScheme), but wanted to support a
way of stopping the parser (by backslashing the opening brace:
On Wed, Oct 29, 2008 at 1:27 PM, Kyle R. Burton [EMAIL PROTECTED] wrote:
Thanks for the macro. =)
The str function is really a good replacement for interpolation.
Yes, thank you for the macro. I anticipate using this approach (I'm
accustomed to it from Ruby, Perl and JScheme), but wanted
On Mon, Oct 27, 2008 at 11:38 PM, Islon [EMAIL PROTECTED] wrote:
Is there any chance closure will get string interpolation?
Do things like (prn Hi ${someone}, my name is ${myname}) is nice, not
crucial of course, but nice.
I'm personally not fond of string interpolation either.
But for fun
On Tue, Oct 28, 2008 at 7:27 PM, Graham Fawcett
[EMAIL PROTECTED] wrote:
But for fun, here's an (i ...) macro, that will give you ${}
interpolation in strings (if it works at all, I test it very
thorougly!).
Haha, nor did I spell- or grammar-check very thoroughly!
I meant: I didn't test the
19 matches
Mail list logo