[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

This page is part of the web mail archives of SRFI 110 from before July 7th, 2015. The new archives for SRFI 110 contain all messages, not just those from before July 7th, 2015.

*To*: "srfi-110" <srfi-110@xxxxxxxxxxxxxxxxx>*Subject*: Re: Should we MAY a "curly-write" and "neoteric-write"? Or even "sweet-write"?*From*: "David A. Wheeler" <dwheeler@xxxxxxxxxxxx>*Date*: Wed, 10 Apr 2013 22:26:55 -0400 (EDT)*Delivered-to*: srfi-110@xxxxxxxxxxxxxxxxx*In-reply-to*: <20130410015624.GM18454@xxxxxxxxxxxxxxxx>*Reply-to*: dwheeler@xxxxxxxxxxxx

I've attached a first-cut draft of curly-write and neoteric-write (they're really -simple versions). The code is not so long that it'd be hard to put in an implementation.. but it's long enough that you'd like to have them in an implementation. Below are outputs from curly-write, followed by outputs from neoteric-write, given the same expressions. I think they're reasonable. --- David A. Wheeler 'x (a b c d e f g h i j k l m n o p q r s t u v w x y z) (a b c d e f g h i j k l m n o p q r s t u v w x y z . 2) {a + b} {a + b + c} (+ a b c . improper) (sin (- theta)) (fact {n - 1}) (calculate (pi)) (between current min max) (my-write . rest) (sin x) (- x) (-) (function +) (map + '(2 4 6)) (current-time) (1 2 3) (4 5 . 6) 5 boring-symbol {sqrt(x) + sqrt(y)} `(1 2 ,@{a + b}) #'(a b c) #( v1 v2 {2 + 3} (sin x) ) (define (is-infix-operator? x) (cond ((not (symbol? x)) #f) ((memq x special-infix-operators) #t) (#t (contains-only-punctuation? (string->list (symbol->string x)))))) fin 'x (a b c d e f g h i j k l m n o p q r s t u v w x y z) (a b c d e f g h i j k l m n o p q r s t u v w x y z . 2) {a + b} {a + b + c} +(a b c . improper) sin{- theta} fact{n - 1} calculate(pi()) between(current min max) my-write(. rest) sin(x) -(x) -() function(+) map(+ '(2 4 6)) current-time() (1 2 3) (4 5 . 6) 5 boring-symbol {sqrt(x) + sqrt(y)} `(1 2 ,@{a + b}) #'a(b c) #( v1 v2 {2 + 3} sin(x) ) define(is-infix-operator?(x) cond((not(symbol?(x)) #f) (memq(x special-infix-operators) #t) (#t contains-only-punctuation?(string->list(symbol->string(x)))))) fin

**Attachment:
write.scm**

**References**:

- Prev by Date:
**Re: Should we MAY a "curly-write" and "neoteric-write"? Or even "sweet-write"?** - Next by Date:
**Re: Should we MAY a "curly-write" and "neoteric-write"? Or even "sweet-write"?** - Previous by thread:
**Re: Should we MAY a "curly-write" and "neoteric-write"? Or even "sweet-write"?** - Next by thread:
**Re: Should we MAY a "curly-write" and "neoteric-write"? Or even "sweet-write"?** - Index(es):