News for hackers. Stuff that matters.
Re:Why Perl 6 is different by jules on Tuesday April 20, 2010 @02:42PM (#1280231)
Very close from what I gather from the web. It has macros similar to Lisp. They take an AST and return an AST. http://perlcabal.org/syn/S06.html#Macros

Do you think that Lisp style languages with sexps are the end in language design, or do you think that something better will be invented? (or has been invented)

Re:Why Perl 6 is different by pg on Tuesday April 20, 2010 @05:20PM (#1280637)
I would never say never, but I haven't been able to think of a better way to represent programs than s-expressions despite many years of thinking about the problem.

I wouldn't be surprised if sexprs are the end in the sense that the integers are. I.e. you might go on to discover new things but they'd ultimately reduce to sexprs.

Is there a textual representation for ASTs? Could you write programs directly in ASTs?

Re:Why Perl 6 is different by jules on Tuesday April 20, 2010 @05:32PM (#1280665)
To your question: yes, the Perl syntax (the macro system supports quasiquotation). This is exactly the same as in Lisp. The difference is that Lisp syntax looks more like how the data structures are represented in memory. I think you can also build up your programs with data constructors (i.e. like doing (list 'lambda (list 'x) (list '+ 'x 1)) in Lisp). But note that I haven't used Perl6, this is information from the web.
Re:Why Perl 6 is different by jey on Wednesday April 21, 2010 @03:41AM (#1281604)
"AST" is actually just compiler lingo for "tree representation of s-expr representation of parsed code".

In other words: sure, you can write code directly in {ASTs, s-exprs}; it's called "Lisp". ;-)