Re:Pattern matching accepted for Python
by singingfish on Wednesday February 10, 2021 @03:43AM
(#26086855)
I've always viewed javascript as verbose crippled perl with good vendor support. I mean, `"use strict";` ...
Re:Pattern matching accepted for Python
by ghshephard on Wednesday February 10, 2021 @03:11AM
(#26086678)
Oh my goodness kbenson - we had this identical conversation 7 years ago on HN. https://news.ycombinator.com/item?id=7869603
The simple answer that probably would have solved almost all your problems is that you can use the reference syntax for defining things and it will look like and function the same as JavaScript 95% or more of the time, and the only time you'll need to do anything is when passing it to something that expects an actual array or hash. I mean, you can get away with taking JSON and changing colons into fat arrows and booleans into 0 and 1 and it will just work as a Perl data structure as is like 99.99% of the time. Data structure manipulation works similarly as well for the most part.