←back to thread

203 points dahlia | 2 comments | | HN request time: 0.001s | source
Show context
yakshaving_jgt ◴[] No.45153163[source]
I've noticed that many programmers believe that parsing is some niche thing that the average programmer likely won't need to contend with, and that it's only applicable in a few specific low-level cases, in which you'll need to reach for a parser combinator library, etc.

But this is wrong. Programmers should be writing parsers all the time!

replies(4): >>45153317 #>>45153402 #>>45153520 #>>45153674 #
1. WJW ◴[] No.45153317[source]
Last week my primary task was writing a github action that needed to log in to Heroku and push the current code on main and development branches to the production and staging environments respectively. The week before that, I wrote some code to make sure the type the object was included in the filters passed to an API call.

Don't get me wrong, I actually love writing parsers. It's just not required all that often in my day-to-day work. 99% of the time when I need to write a parser myself it's for and Advent of Code problem, usually I just import whatever JSON or YAML parser is provided for the platform and go from there.

replies(1): >>45153397 #
2. yakshaving_jgt ◴[] No.45153397[source]
Do you not write validation? Or handle user input? Or handle server responses? Surely there’s some data processing somewhere.