Re: alternate syntax

2009-02-24 Thread Onorio Catenacci
) 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)]     if .contains aeiou (str first-letter)       str word ay       str (subs word 1) first

Re: alternate syntax

2009-02-24 Thread Mark Volkmann
)]     (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 would look like in my alternate syntax. defn pig-latin [word]   let [first-letter (first word

Re: alternate syntax

2009-02-24 Thread Laurent PETIT
-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 word ay str (subs word 1) first-letter ay println (pig-latin red) println (pig-latin

Re: alternate syntax

2009-02-24 Thread Mark Volkmann
)]     (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 would look like in my alternate syntax. defn pig-latin [word]   let [first-letter (first word

Re: alternate syntax

2009-02-24 Thread Michael Wood
On Tue, Feb 24, 2009 at 3:35 PM, Mark Volkmann r.mark.volkm...@gmail.com 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

Re: alternate syntax

2009-02-24 Thread Onorio Catenacci
alternate syntax. 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 (pig-latin orange) The rules for turning this into standard Clojure syntax

Re: alternate syntax

2009-02-24 Thread jwhitlark
(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 would look like in my alternate syntax. defn pig-latin [word

alternate syntax

2009-02-23 Thread Mark Volkmann
)) 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 word ay str (subs word 1) first-letter ay println (pig-latin red) println (pig-latin orange) The rules for turning

Re: alternate syntax

2009-02-23 Thread David Nolen
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 would look like in my alternate syntax. defn pig-latin [word] let [first-letter (first word

Re: alternate syntax

2009-02-23 Thread Christian Vest Hansen
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 word ay str (subs word 1) first-letter ay println

Re: alternate syntax

2009-02-23 Thread Kevin Downey
) (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)] if .contains aeiou (str first-letter) str word ay str (subs

Re: alternate syntax

2009-02-23 Thread Mark Volkmann
On Mon, Feb 23, 2009 at 10:55 AM, Christian Vest Hansen karmazi...@gmail.com wrote: On Mon, Feb 23, 2009 at 4:42 PM, Mark Volkmann r.mark.volkm...@gmail.com 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

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

Re: alternate syntax

2009-02-23 Thread Cosmin Stejerean
On Mon, Feb 23, 2009 at 11:10 AM, Mark Volkmann r.mark.volkm...@gmail.comwrote: On Mon, Feb 23, 2009 at 10:55 AM, Christian Vest Hansen karmazi...@gmail.com wrote: On Mon, Feb 23, 2009 at 4:42 PM, Mark Volkmann r.mark.volkm...@gmail.com wrote: I have an idea I'd like to float to see

Re: alternate syntax

2009-02-23 Thread Phil Hagelberg
Mark Volkmann r.mark.volkm...@gmail.com 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

Re: alternate syntax

2009-02-23 Thread Laurent PETIT
2009/2/23 Cosmin Stejerean cstejer...@gmail.com On Mon, Feb 23, 2009 at 11:10 AM, Mark Volkmann r.mark.volkm...@gmail.com wrote: On Mon, Feb 23, 2009 at 10:55 AM, Christian Vest Hansen karmazi...@gmail.com wrote: On Mon, Feb 23, 2009 at 4:42 PM, Mark Volkmann

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 Dudley Flanders
On Feb 23, 11:29 am, Phil Hagelberg p...@hagelb.org 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

Re: alternate syntax

2009-02-23 Thread Laurent PETIT
)) (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 alternate syntax. defn pig-latin [word] let [first-letter (first word)] if .contains aeiou (str first-letter

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

Re: alternate syntax

2009-02-23 Thread Dan Larkin
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 alternate syntax. defn pig-latin [word] let [first-letter (first word)] if .contains aeiou (str first-letter) str word ay

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 newcomers

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 Vincent Foley
in my alternate syntax. 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 (pig-latin orange) The rules for turning this into standard Clojure syntax

Re: alternate syntax

2009-02-23 Thread Tom Ayerst
-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)] if .contains aeiou (str first-letter) str word ay str (subs word 1) first

Re: alternate syntax

2009-02-23 Thread Stuart Sierra
On Feb 23, 10:42 am, Mark Volkmann r.mark.volkm...@gmail.com 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

Re: alternate syntax

2009-02-23 Thread Joshua Fox
)) (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 alternate syntax. defn pig-latin [word] let [first-letter (first word)] if .contains aeiou (str first-letter) str

Re: alternate syntax

2009-02-23 Thread Cosmin Stejerean
On Mon, Feb 23, 2009 at 2:38 PM, Dan redalas...@gmail.com 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

Re: alternate syntax

2009-02-23 Thread Fogus
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 c-syntax language is not that difficult, even for math expressions

Re: alternate syntax

2009-02-23 Thread Rayne
On Feb 23, 12:01 pm, Laurent PETIT laurent.pe...@gmail.com 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.

Re: alternate syntax

2009-02-23 Thread Michel Salim
(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)] if .contains aeiou (str first-letter) str word ay str (subs word 1