ssqq wrote:In newLISP, lexical symbol is declare with *let*, *letn*, *letex* and *args expression*.
No. You are misusing the term "lexical". In Perl parlance, it means "static(ally) scope(d)." This also means "lexically scoped." Now, the problem is that you are comparing apples to oranges, as newLISP "variables" are all dynamically scoped.
ssqq wrote:If it is possible that add *Perl-lish* style lexical declare function like *my*(expr scope) in newLISP?
No, not short of re-writing variable scoping rules in newLISP or writing your own interpreter in newLISP. Why? Because to implement lexical scoping, you have to have the evaluator carry around (keep track of) the current lexical environment (which also means that you have to implement closures). Thus, a mere set of macros is not going to accomplish it.
ssqq wrote:Although this style declaration could implement with *let*, but when transfer perl (or other language) code to newlisp line by line, too much nest *let expression* would be write that would greatly reduce readable of code.
That's only your opinion. I'm of the opposite opinion: that newLISP code in general is MUCH easier to read than Perl code.
However, I believe that, beyond even variable scoping rules, the bottom line is that Perl and newLISP (or, Perl and ANY Lisp, for that matter) are so far away from each other, with regard to many concepts of programming languages, that it is unreasonable to hold that either should be made to easily "transfer ... code ... line by line" from one to the other. Again, apples and oranges. My two cents.
(λx. x x) (λx. x x)