Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wait, you're saying Lisp is simpler than Perl and then you use "use" and "require" as examples? How are "use" and "require" different from "(eval-when :compile-toplevel ..." and "(eval-when :load-toplevel ..." and "(eval-when :execute"?

Lisp and Python aren't as simple as you think they are, and Perl isn't as complicated, either.



different keywords passed to a well understood form: "eval-when". what each opt does can be horrendously complicated if you so chose. however i understand the evaluation rules and can just focus on learning what each option does. require on the other hand can take a string, but it can also take a VERSION expression that will then be compared to $]. but wait, there's more. it can also be a literal v5.6.1 - that works too. otherwise it will look for a library. if the expression is a bare word require will conveniently add the .pm for you, however notice that $lib = 'somelib' require $lib is not a bare word therefore you need to add the '.pm' ...

i'm tired already.


The original post was about Perl 6, though.


eval-when is black magic :-P




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: