3 ms·
attrs |> bounded('age', 1, 100) |> format('name', /^[a-z]$/i) |> Person.insertIntoDatabase This reminds me of those "Perl Poetry" code
by toni 11y ago
attrs
|> bounded('age', 1, 100)
|> format('name', /^[a-z]$/i)
|> Person.insertIntoDatabase
This reminds me of those "Perl Poetry" code snippets from 2001.
- mbreese 11y agoYes, and we all know how that turned out with Perl. I don't think Perl is necessarily a good model for readable code. This seems to me to be a case of "just because we can, doesn't mean we should."
- toni 11y agoThere are a lot of programmers coming from other functional programming languages to Javascript, bringing a lot of ideas from their own language to "make Javascript better". On top of that, there are also "transpiler folks": Ruby |> CoffeeScript, C#/F# |> TypeScript, etc... The classical Javascript programmer might be the last of a dying breed.