preview on Lispyscript.pl

41 views
Skip to first unread message

ben

unread,
Oct 26, 2012, 11:57:11 AM10/26/12
to lispy...@googlegroups.com
hi

I'm working on Perl variant of Lispscript. I have lot of questions and
ideas, but I'm tired, so right now I just wanna show you some first
results. I'm interested in your opinion if this is in spirit of
Lispyscript.

echo_pl.ls:
1 (my $echo (sub ($foo $bar)
2 (print $foo $bar)))
3 ($echo "hi" "you")

==> echo_pl.pl:
1 my $echo = sub() {
2 my ($foo,$bar) = @_;
3 return print($foo);
4 };
5 $echo->("hi","you");

notes:
- I tried to stay as close as possible to the JS variant
- decided not to hide Perl's context sensitivity, therefore the sigils
($echo) are needed
- in javascript there is no difference in calling a function or a
closure in perl there is, therefor I added the 'ffi' keyword:
* (print str) is in fact (ffi print (str)), that in turn is wrapped in
macro called 'print'

regards
ben

Santosh Rajan

unread,
Oct 26, 2012, 12:44:26 PM10/26/12
to lispy...@googlegroups.com
Hey,
This is great, and looks good to me. My Perl is kinda rusty, but i think you are doing the right thing. Look forward to seeing more of this.

ben

--
You received this message because you are subscribed to the Google Groups "lispyscript" group.
To post to this group, send an email to lispy...@googlegroups.com.
To unsubscribe from this group, send email to lispyscript...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
Santosh Rajan
@About.Me


Reply all
Reply to author
Forward
0 new messages