Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Clojure Design
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
Colour
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Undo
Redo
Keyboard Shortcuts Help
<h2>Alternate string quote syntaxes</h2><h3>Motivation</h3><ul><li>doc strings with examples could be more human readable</li><li><p>XML, JSON or SQL generation tests become filled with escaped quotes</p></li><li>pasting JSON into a string, which could then easily have `read-json` called on it</li></ul><h3>Possible Solutions</h3><h5>Python-like triple quoted strings</h5><p>Pros:</p><ul><li>relatively simple syntax, for humans and parsers</li></ul><p>Cons:</p><ul><li>minor breaking change - """""" which is 3 empty strings would now be interpreted as only one empty string</li><li>have to add reader macro</li><li>breaking change to every other tool that reads Clojure syntax<ul><li>including regexp-based syntax colorers, etc.</li></ul></li></ul><h5>Heredocs</h5><p>Pros: slightly more flexible than triple-quotes</p><p>Cons: more complex syntax</p><h5>String Interpolation / Templating</h5><p>Pros:</p><p>Cons:</p><p>Puzzles:</p><ul><li>is the built-in format function enough?</li></ul><h5>Resource files</h5><p>Pros:</p><ul><li>Already exists</li></ul><p>Cons:</p><ul><li>Separate file for each string</li><li>Can't use for macro-interpreted things like doc strings</li><li>In tests, having the test data separate from the test itself is hard to read</li></ul>
Attachments
Labels
Location
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced