Re: Ruby in Lisp
- From: Pascal Bourguignon <pjb@xxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jun 2007 22:56:23 +0200
alflisppython@xxxxxxxx writes:
I would like to know if there is any implementation of Ruby in Lisp.
I think that the idea of using the dot for eliminating parenthesis
is a very
good one:
I prefer l.length to (length l)
Do any of you have an automatic way of doing something like this,
that is
First: Detect that a function has only 1 argument, then transform
(f a) into a.f
Second: Detec that f has more than one argument, transform
(f a b) into a.f(b) etc.
Third. Use multiple times this idea:
(first (last l)) -> l.last.first
Please, i like to have this small programm to play with it.
Thanks to all the people in this lisp channel for a possible answer.
You'd have to write a parser for your syntax and generate a sexp to be
evaluated for each expression. You can implement this in an afternoon.
--
__Pascal Bourguignon__ http://www.informatimago.com/
NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.
.
- Follow-Ups:
- Re: Ruby in Lisp
- From: Pascal Bourguignon
- Re: Ruby in Lisp
- References:
- Ruby in Lisp
- From: alflisppython
- Ruby in Lisp
- Prev by Date: Re: Documentation of a Specific Method
- Next by Date: Re: Ruby in Lisp
- Previous by thread: Ruby in Lisp
- Next by thread: Re: Ruby in Lisp
- Index(es):
Relevant Pages
|