gt; much outside of core. Any reason to not just use str?
>>
>> (def x "david")
>>
>> (str "hello " x)
>>
>>
>> 2013/2/8
>> Why does ClojureScript support string interpolation for js* and not regular
>> clojurescript stri
wrote:
>>
>> js* 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")
>
"david")
>
> (str "hello " x)
>
>
> 2013/2/8
>
>> Why does ClojureScript support string interpolation for js* and not
>> regular clojurescript strings? Interpolation would be very useful.
>>
>> (def x "hi")
>>
>>
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
> Why do
js* 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
> Why does
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
2010/11/21 HiHeelHottie :
>
> 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. Wh
Thanks Mike. This is what I was looking for.
On Nov 20, 8:31 pm, Mike K 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 "Clojure" group.
To p
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 membe
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 t
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 membe
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 membe
ial plus links here:
http://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
you could use format or cl-format?
http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/format
http://clojure.github.com/clojure-contrib/pprint-api.html#clojure.contrib.pprint/cl-format
On Sat, Nov 20, 2010 at 5:00 PM, HiHeelHottie wrote:
>
> I think ruby has nice
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
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
> 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:
Thanks for the macro. =)
The str function is really a good replacement for interpolation.
On Oct 28, 8:29 pm, "Graham Fawcett" <[EMAIL PROTECTED]> wrote:
> 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 $
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
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
I've always preferred a function like str to either of these options
anyway.
(str "Hi " someone ", my name is " myname)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send ema
Hi Islon,
On 28 Okt., 04:38, 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.
There is format.
user=> (def someo
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.
Islon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
23 matches
Mail list logo