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
<h1>Problem</h1><p>Rich numeric types (longs, bigints, and ratios at least) are good. It would be nice if ClojureScript could enable programming with them without too much pain, in spite of the fact that most JS runtimes only support doubles. Performance is a major concern.</p><p> </p><h1>Design Questions</h1><h2>What type do clojure longs compile to?</h2><p>They could compile to floats to give default performance, closure longs for the closest equivalence, or closure bigints for a simpler cljs-side design.</p><p>If JVM longs are only used for performance, and closure longs aren't native, is there any reason to use them?</p><h2>How should the arithmetic functions be implemented?</h2><p>If nothing else it could be a separate library, with a macro for including numeric literals.</p><p>The arithmetic functions are I think currently inlined; to extend them to all the numeric types we would have to at least also inline a type check on the arguments, and call out to a proper function if the arguments aren't all numbers.</p>
Attachments
Labels
Location
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced