Re: Proposed feature: die on compile with undefined functions
[email protected] (Evan Carroll)
| Newsgroups | perl.perl5.porters |
|---|---|
| Message-ID | <CAAiePB7e_Z0Bb_mH+FRf5txGvtg7uHtMwmdb45Tk3zu7m3Gzkw@mail.gmail.com> |
This is a very bad proposal but the idea is solid. You can't change language dynamics like this. But what we could do is provide an operator for strict compile time symbol resolution. I think it's a glaring omission in the language not to have such operators for resolution. And it makes everything slow and error-prone. Rather than totally changing the dynamic of the language. Consider Foo:: will die if the package Foo doesn't exist at compile time. We could do `::->` which preserves that characteristic and resolves the function name strictly too.. # Checks for namespace Foo with function bar in compile time. Foo::->bar(1,2); # Checks for namespace Foo with function bar in compile time, without symbol resolution on Foo. "Foo"::->bar(1,2); This question comes up all the time. It just takes many different forms. -- Evan Carroll - [email protected] System Lord of the Internets web: http://www.evancarroll.com ph: 281.901.0011 <+1-281-901-0011>