2021-10-4 6:50 Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> wrote: > > *smartmatch* — We have resisted removing this failure for years, as > > we want to replace it with something else. My take: we should just > > rip this out and later, *maybe*, put something else in. #13173 > > <https://github.com/Perl/perl5/issues/13173> > > I'm hoping eventually to make match/case into core syntax: > > https://metacpan.org/pod/Syntax::Keyword::Match > > which would be able to replace almost all of the current uses of > given/when, without needing to bother thinking about smartmatch. > > Alternatively, somewhat ironically, the strong splitting of PV vs IV/NV > as achieved by Nicholas et.al. recently, may actually be an 11th hour > saviour for smartmatch, in that it will suddenly make at least the > string-vs-number tests it performs somewhat more reliable. It still > won't save the overall "THIS IS CRAZY" feel of whether it even makes > sense to ask such questions as > > %ENV ~~ &is_even > > though. :) > > from CitC earlier this year: > > https://www.youtube.com/watch?v=Kc_bP73xNyM > > (The brief summary begins at 45:20 until 47:10, if you don't fancy > watching the whole ~50minute talk) > > -- > Paul "LeoNerd" Evans > > leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS > http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/ Is it possible to write a pre-RFC with match case syntax? In my opinion, Syntax::Keyword::Match is very well designed. I feel it is kind to prepare an alternative to the current smartmatch first.Thread Previous | Thread Next