Arc Forumnew | comments | leaders | submitlogin
Idea about lisp syntax.
3 points by jaujau 3608 days ago | 3 comments
What would have happen if we try to create a lisp with tcl syntax? something like this:

  { body ... } => (let () body ...)   
  let var val => (let ((var val)) ...)  
  set var val => (set! var val)
We will have infix expression using expr

  expr "x+y"   
Condition expression will be something like:

  if "x==y" {   
  ... 
  } else {   
  ...   
  }   
this translate to:

  (if "x==y" (let () ...) else (let () ...))
Function call will be similar to tcl but without the square brackets

  fn arg1 arg2 ... => (fn arg1 arg2 ...)
  fn (fn2 arg1 ...) => (fn (fn2 arg1 ...))


3 points by zck 3607 days ago | link

Feel free to write it, but what's the difference here between your tclisp and original tcl? Why not just use tcl?

-----

2 points by jaujau 3607 days ago | link

In tcl the syntax is build from strings and in tclisp the syntax is build from symbols and cons cells. tclisp could have a better syntax checking and real macros.

-----

1 point by akkartik 3607 days ago | link

Yeah, I'll be very interested to see where this leads.

-----