Hacker News new | past | comments | ask | show | jobs | submit login

One glaring problem with perl in this day and age (apart from pass by value by default) is a lack of built-in generators. Python has them. Javascript has them. Go has goroutines. Bet Rust has some macros or something.

Yes, I’m aware of some rotting modules on CPAN that half-assedly implement them, but given that they exactly bolt it on, they are full of gotchas, like Try::Tiny, with which it’s quite easy to forget that a return statement in the try block will do exactly the wrong thing.




> like Try::Tiny, with which it’s quite easy to forget that a return statement in the try block will do exactly the wrong thing

Try::Tiny does its best without manipulating the parser itself; it's been superseded by Syntax::Keyword::Try (which alters the parser to make flow control work as you'd expect), and in the last few years of releases there is a native `try` keyword right in the language (which can be used in older versions via Feature::Compat::Try, which is a shim on top of Syntax::Keyword::Try in old versions and a no-op in new versions).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: