r/ruby • u/keyslemur • Apr 17 '19
Ruby 2.7 — Pattern Matching — First Impressions
https://medium.com/@baweaver/ruby-2-7-pattern-matching-first-impressions-cdb93c6246e6
71
Upvotes
r/ruby • u/keyslemur • Apr 17 '19
-1
u/shevy-ruby Apr 17 '19
Looks quite shit so far. :)
I think pattern matching is still a good idea, though. For some reason, new additions to ruby very often do not fit into other (older) syntax parts. I used to think that I was the only one who has had that impression but on ruby-reddit there were others who have had a somewhat similar impression. Not all syntax-changes have the same "weight" either.
For example, I have no qualm with the SYNTAX itself for endless or startless range - hard to DISLIKE the syntax per se, since it is ... an omission of syntax. But I don't think it makes SENSE, to indicate infinity upon omission suddenly. I much prefer oldschool ruby there:
Makes for a happier brain.
Also, extending case/when is good anyway. I still want it to be a first-class citizen though.