Re: S-expressions

"Eric Merritt" <cyberlync-/[email protected]> Wed, 06 Aug 2003 19:38:48 -0000
Newsgroups gmane.comp.programming.pragmatic
Message-ID <[email protected]>
 
> For me, the first problem is: What is a function and what is an 
> argument?  
>  
 
 Ah, thats pretty simple. Its a prefix syntax so the first token inside parans is the 
function the remaining tokens the arguments. Its pretty simple. 
 
> The lisp/scheme syntax always looked very strange for me because of 
> the enormous amount of parens. I felt it always hard to match them 
> and to understand which arguments belonged together, etc. 
  
 Your editor should do a pretty good job of matching. As for the arguments this has 
always seemed really strait forward to me. 
  
> Then, what exactly does this make easier? It might be easier to 
> parse (a (b (c (d (e f g h ))))) but so what? I don't care how complex 
> some code is to parse *as long as it is simple to read for a human*. 
 
 It makes it easier to *extend* also. It makes it easier to write and understand 
macros for it. 
 
> Who cares if the parser is complex? At most five persons in the whole 
> world will see this code. But millions of people will see the language. 
  
 The parser complexity has nothing to do with it. 
 
 
> Also a note about macros: When I do C, I need macros. The language 
> is just so limited in what it can do without. 
> 
> When I do Java, I wished I had a preprocessor. And hey, Java 1.5 will 
> have something like that. Makes me wonder, why ;-) 
>  
> When I do Python, I never missed macros. 
 
  C macros are the redheaded bastard step child of macros. They suck and there 
is no way around it. Lisp style macros are much more useful.  
 
Using your python example, much of the special stuff guido has put in the 
language wouldnt have needed direct support if there had been a macro system. 
list comprehensions are a good example of this. 
 
 
> Here are a few things which make macros almost unecessary: 
 
 [snip ..] 
 
 None of this has a single thing to do with macros. Remember we are not talking 
about C style macros. C macros suck a**. We are talking about lisp/scheme/dylan 
style macros which allow you to add language structures after the fact. 
 
> May I suggest that you have a very close look at Python? :-) 
>  
 
 Python has its place. but it still leaves allot to be desired. 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/W4wwlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
pragmatic_lang-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/