- doc strings with examples could be more human readable
(defn ^{:examples '[(with-out-str (clipboard (doc distinct)))]
clipboard [x] ...)
Just if a mechanism like this were used more widely... we'd get syntax
coloring for free, and a facility for programatically querying examples.
-
XML, JSON or SQL generation tests become filled with escaped quotes
Again, one can either keep reference to files in the tests, or develop e.g.
a XML-testing DSL.
Even if they were cases were there wasn't a clear alternative to the idea
of raw strings, if such a feature were added, it could be used gratuitously.
For the same reason Clojure offers e.g. limited inheritance possibilities.
I prefer having to eventually resort to Java to write "advanced" classes,
than to use a language which users have it easy to build implementation
hierarchies.
On Monday, March 18, 2013 12:25:07 PM UTC+1, Maik Schünemann wrote:
>
> http://dev.clojure.org/display/design/Alternate+string+quote+syntaxes
>
>
> On Mon, Mar 18, 2013 at 11:50 AM, Dave Sann <[email protected]<javascript:>
> > wrote:
>
>> I'd welcome the ability to change delimiter. I've found it very useful in
>> the past to avoid illegible or hard to read strings.
>>
>>
>> On Monday, 18 March 2013 19:57:06 UTC+11, Luc wrote:
>>
>>> Looks fine to me. If it's an extension to the literal syntax it's also a
>>> narrow scope change.
>>>
>>> The standard escape sequences make things harder even for display
>>> purposes.
>>> We would also benefit from this, we are handling huge amounts of raw
>>> text
>>> and just for debugging purposes we have to mentally handle the \ escape
>>> character... berk.
>>>
>>> Our unit tests also suffer from this escaping mode.
>>>
>>> Using a literal syntax like this one would make life easier.
>>>
>>> Luc P.
>>>
>>> > On Sun, Mar 17, 2013 at 11:23 PM, Softaddicts
>>> > <[email protected]>**wrote:
>>> >
>>> > >
>>> > > I find raw string handling in XML simply ugly :)
>>> >
>>> >
>>> > Agreed.
>>> >
>>> >
>>> > >
>>> > > Do you have a suggestion on how to represent raw strings ? Something
>>> > > concrete
>>> > > we could discuss about ?
>>> > >
>>> > >
>>> > In several languages, they use a sequence of three double-quotes to
>>> mark
>>> > the beginning and the end of the raw string.
>>> >
>>> > In Clojure, I think raw strings would actually enhance the power of
>>> the edn
>>> > format rather than detract, specifically the tagged elements.
>>> >
>>> > Right now, edn supports things like:
>>> > #uuid "f81d4fae-7dec-11d0-a765-**00a0c91e6bf6"and
>>> > #inst "1985-04-12T23:20:50.52Z"and you can create your own. The
>>> built-ins
>>> > happen to not utilize double-quotes or backslashes, so escaping is not
>>> a
>>> > big deal, but if you want your tagged element to use a syntax where
>>> quotes
>>> > and backslashes are natural, you're out of luck and you get a big ugly
>>> > mess. Think how much uglier the above inst element would look if -
>>> and :
>>> > happened to be characters that required escaping. All I want is the
>>> > ability to do something like
>>> >
>>> > *#my/tag """45 \ "a" \ 50"""*
>>> >
>>> > if that's the most natural way to express the element rather than
>>> having to
>>> > type
>>> >
>>> > *#my/tag "45 \\ \"a\" \\ 50"*
>>> >
>>> > which is already starting to look ugly, and looks far uglier the more
>>> > characters are in there that require escaping.
>>> >
>>> > --
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups "Clojure" group.
>>> > To post to this group, send email to [email protected]
>>> > Note that posts from new members are moderated - please be patient
>>> with your first post.
>>> > To unsubscribe from this group, send email to
>>> > clojure+u...@**googlegroups.com
>>> > For more options, visit this group at
>>> > http://groups.google.com/**group/clojure?hl=en<http://groups.google.com/group/clojure?hl=en>
>>> >
>>> > ---
>>> > You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+u...@**googlegroups.com.
>>> > For more options, visit
>>> > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>.
>>> >
>>>
>>> >
>>> >
>>> >
>>> --
>>> Softaddicts<lprefo...@**softaddicts.ca> sent by ibisMail from my ipad!
>>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to [email protected]<javascript:>
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.