Re: alternate syntax

2009-02-24 Thread jwhitlark
ng to address that. > > > >> Here's a simple example of valid Clojure code. > > > >> (defn pig-latin [word] > > >>   (let [first-letter (first word)] > > >>     (if (.contains "aeiou" (str first-letter)) > > >>       (str

Re: alternate syntax

2009-02-24 Thread Onorio Catenacci
ot;) > >>       (str (subs word 1) first-letter "ay" > > >> (println (pig-latin "red")) > >> (println (pig-latin "orange")) > > >> Here's what that same code would look like in my alternate syntax. > > >> defn pig-l

Re: alternate syntax

2009-02-24 Thread Michael Wood
On Tue, Feb 24, 2009 at 3:35 PM, Mark Volkmann wrote: [...] > As I said, it's not me that has a problem with parentheses. It's not > hard to find developers that say that don't like Lisp because of the > parens. I think the question is whether we should make an effort to > appease those people. C

Re: alternate syntax

2009-02-24 Thread Mark Volkmann
n't like them because of >> >> the parentheses. I'm trying to address that. >> >> >> >> Here's a simple example of valid Clojure code. >> >> >> >> (defn pig-latin [word] >> >>   (let [first-letter (first word)] >> &g

Re: alternate syntax

2009-02-24 Thread Laurent PETIT
r (first word)] > >> (if (.contains "aeiou" (str first-letter)) > >> (str word "ay") > >> (str (subs word 1) first-letter "ay" > >> > >> (println (pig-latin "red")) > >> (print

Re: alternate syntax

2009-02-24 Thread Mark Volkmann
lid Clojure code. >> >> (defn pig-latin [word] >>   (let [first-letter (first word)] >>     (if (.contains "aeiou" (str first-letter)) >>       (str word "ay") >>       (str (subs word 1) first-letter "ay" >> >> (println

Re: alternate syntax

2009-02-24 Thread Onorio Catenacci
ains "aeiou" (str first-letter)) >       (str word "ay") >       (str (subs word 1) first-letter "ay" > > (println (pig-latin "red")) > (println (pig-latin "orange")) > > Here's what that same code would look like in my a

Re: alternate syntax

2009-02-23 Thread Michel Salim
>(if (.contains "aeiou" (str first-letter)) > (str word "ay") > (str (subs word 1) first-letter "ay")))) > > (println (pig-latin "red")) > (println (pig-latin "orange")) > > Here's what that same code woul

Re: alternate syntax

2009-02-23 Thread Rayne
On Feb 23, 12:01 pm, Laurent PETIT wrote: > I know also of gorilla (vim plugin), and certainly emacs (not sure about > enclojure, though) that offer parens colorizing (also named rainbow parens). Enclojure doesn't, yet at least. --~--~-~--~~~---~--~~ You receive

Re: alternate syntax

2009-02-23 Thread Fogus
> +(1 /(6 3) 3) and so on... It required every math expression to be enclosed in parens, but they didn't care; it was a hit. Weird. I am not encouraging an alternate syntax for Clojure (or Lisp), only stating that turning an s-expr based language into something that vaguely resembles a

Re: alternate syntax

2009-02-23 Thread Cosmin Stejerean
On Mon, Feb 23, 2009 at 2:38 PM, Dan wrote: [...] The problem is (+ 1 2) which is unlike how you normally do maths > > Removing parens doesn't solve the problem with (+ 1 2). For writing out math formulas a macro that allows infix notation would be useful (and I'm pretty sure I've seen at least

Re: alternate syntax

2009-02-23 Thread Joshua Fox
latin [word] > (let [first-letter (first word)] >(if (.contains "aeiou" (str first-letter)) > (str word "ay") > (str (subs word 1) first-letter "ay")))) > > (println (pig-latin "red")) > (println (pig-latin "orange")) >

Re: alternate syntax

2009-02-23 Thread Stuart Sierra
On Feb 23, 10:42 am, Mark Volkmann wrote: > What if Clojure had an alternate "surface" syntax that was translated > into standard Clojure syntax by a kind of preprocessor? > > Many people that don't like Lisp dialects don't like them because of > the parentheses. I'm trying to address that. Heh

Re: alternate syntax

2009-02-23 Thread Tom Ayerst
simple example of valid Clojure code. > > > > (defn pig-latin [word] > > (let [first-letter (first word)] > > (if (.contains "aeiou" (str first-letter)) > > (str word "ay") > > (str (subs word 1) first-letter "ay

Re: alternate syntax

2009-02-23 Thread Dan
On Mon, Feb 23, 2009 at 3:32 PM, Vincent Foley wrote: > > I'm opposed to this idea. I don't think we should pander to the > masses by creating a schism between new and experienced users. New > users should be introduced to the real thing immediately and it is up > to the tutorials and community

Re: alternate syntax

2009-02-23 Thread Vincent Foley
    (str (subs word 1) first-letter "ay" > > (println (pig-latin "red")) > (println (pig-latin "orange")) > > Here's what that same code would look like in my alternate syntax. > > defn pig-latin [word] >   let [first-letter (first word)

Re: alternate syntax

2009-02-23 Thread Meikel Brandmeyer
Hi, Am 23.02.2009 um 19:42 schrieb Dan Larkin: But.. but... macros? code is no longer data? It still is. Macros don't work on the String "(foo bar)" but on the data structure (list 'foo 'bar). Whether this is represented as >foo bar<, (foo bar) or implicit via indentation doesn't change this.

Re: alternate syntax

2009-02-23 Thread Matt Revelle
On Feb 23, 2009, at 1:21 PM, MarkH wrote: > > Yes, clojure needs an alternative surface syntax for obvious reasons. > And anybody that brings up Dylan as a counter-example doesn't know > what they're talking about. Dylan died because Apple killed it. > It may be more productive to help newcomer

Re: alternate syntax

2009-02-23 Thread Dan Larkin
ord] > (let [first-letter (first word)] >(if (.contains "aeiou" (str first-letter)) > (str word "ay") > (str (subs word 1) first-letter "ay")))) > > (println (pig-latin "red")) > (println (pig-latin "orange")) > &

Re: alternate syntax

2009-02-23 Thread MarkH
Yes, clojure needs an alternative surface syntax for obvious reasons. And anybody that brings up Dylan as a counter-example doesn't know what they're talking about. Dylan died because Apple killed it. --~--~-~--~~~---~--~~ You received this message because you ar

Re: alternate syntax

2009-02-23 Thread Laurent PETIT
e of valid Clojure code. > > (defn pig-latin [word] > (let [first-letter (first word)] >(if (.contains "aeiou" (str first-letter)) > (str word "ay") > (str (subs word 1) first-letter "ay" > > (println (pig-latin "red")

Re: alternate syntax

2009-02-23 Thread David Nolen
On Mon, Feb 23, 2009 at 12:10 PM, Mark Volkmann wrote: > The parens don't bother me. My concern though is that many people > won't take the time to learn Clojure primarily because of the parens. > The preprocessor would appease those people and not change anything > for those that like Clojure jus

Re: alternate syntax

2009-02-23 Thread Dudley Flanders
On Feb 23, 11:29 am, Phil Hagelberg wrote: > I hate to sound like a Smug Lisp Weenie™, but if people want to learn > Clojure, they're going to have to get comfortable with its > syntax. Parentheses aren't some embarrassing historical accident; > they're part of the reason lisps are so powerful.

Re: alternate syntax

2009-02-23 Thread .Bill Smith
> What if Clojure had an alternate "surface" syntax that was translated > into standard Clojure syntax by a kind of preprocessor? > > Many people that don't like Lisp dialects don't like them because of > the parentheses. Agreed the parentheses take getting used to, and I respect that you want to

Re: alternate syntax

2009-02-23 Thread Laurent PETIT
2009/2/23 Cosmin Stejerean > On Mon, Feb 23, 2009 at 11:10 AM, Mark Volkmann > wrote: > >> >> On Mon, Feb 23, 2009 at 10:55 AM, Christian Vest Hansen >> wrote: >> > >> > On Mon, Feb 23, 2009 at 4:42 PM, Mark Volkmann >> > wrote: >> >> >> >> I have an idea I'd like to float to see if there are

Re: alternate syntax

2009-02-23 Thread Phil Hagelberg
Mark Volkmann writes: > The parens don't bother me. My concern though is that many people > won't take the time to learn Clojure primarily because of the parens. Rule one of programming: never code anything you're not going to use yourself. Unless you're getting paid to do it. Or something. >

Re: alternate syntax

2009-02-23 Thread Cosmin Stejerean
On Mon, Feb 23, 2009 at 11:10 AM, Mark Volkmann wrote: > > On Mon, Feb 23, 2009 at 10:55 AM, Christian Vest Hansen > wrote: > > > > On Mon, Feb 23, 2009 at 4:42 PM, Mark Volkmann > > wrote: > >> > >> I have an idea I'd like to float to see if there are reasons why it's > >> a bad idea. > >> > >>

Re: alternate syntax

2009-02-23 Thread Dan
My opinion is that since Lisp is the programmable programming language, people shouldn't hesitate to try to write code to modify it to their liking. I actually think parenthesis are neat and the new syntax wouldn't be an improvement (and I've been programming in Python for the last 8 years) but don

Re: alternate syntax

2009-02-23 Thread Mark Volkmann
On Mon, Feb 23, 2009 at 10:55 AM, Christian Vest Hansen wrote: > > On Mon, Feb 23, 2009 at 4:42 PM, Mark Volkmann > wrote: >> >> I have an idea I'd like to float to see if there are reasons why it's >> a bad idea. >> >> What if Clojure had an alternate "surface" syntax that was translated >> int

Re: alternate syntax

2009-02-23 Thread Kevin Downey
(first word)] >(if (.contains "aeiou" (str first-letter)) > (str word "ay") > (str (subs word 1) first-letter "ay")))) > > (println (pig-latin "red")) > (println (pig-latin "orange")) > > Here's what that same code

Re: alternate syntax

2009-02-23 Thread Christian Vest Hansen
t;(if (.contains "aeiou" (str first-letter)) > (str word "ay") > (str (subs word 1) first-letter "ay" > > (println (pig-latin "red")) > (println (pig-latin "orange")) > > Here's what that same code woul

Re: alternate syntax

2009-02-23 Thread David Nolen
lojure code. > > (defn pig-latin [word] > (let [first-letter (first word)] >(if (.contains "aeiou" (str first-letter)) > (str word "ay") > (str (subs word 1) first-letter "ay")))) > > (println (pig-latin "red")) > (println

alternate syntax

2009-02-23 Thread Mark Volkmann
er "ay" (println (pig-latin "red")) (println (pig-latin "orange")) Here's what that same code would look like in my alternate syntax. defn pig-latin [word] let [first-letter (first word)] if .contains "aeiou" (str first-letter) str