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

It was a problem in Perl, it isn't in Raku.

Part of the problem is that Perl doesn't have as strong of a type system. (Is is an int or a string, or is is both? The runtime certainly doesn't know.)

It was also symmetric in 5.10 (changed in 5.10.1), which didn't help.

---

The major mistake was not making it experimental from the start.

(The smartmatch feature is why marking things as experimental is now a thing.)

---

If it is carefully designed, it should prove to be useful just like it has in Raku.




If it is carefully designed, it should prove to be useful just like it has in Raku.

I don't see how it can be designed well enough. The fundamental problem is that Perl operators are monomorphic and variables are polymorphic. This was the same problem for things like keys and each on references, for example.


I didn't mean in Perl.

If you actually read what I wrote, you'll note that everything I said makes it a difficult to impossible in Perl.

I meant adding the feature to Rust, which doesn't have the same difficulties.




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

Search: