Remix.run Logo
hnlmorg 4 days ago

grep is half a century old now.

If we can’t progress our ecosystem because we are reliant on one very specific 50+ year old line parser, then that says more about the inflexibility of the industry to move forward than it does about the “new” ideas being presented.

account42 4 days ago | parent | next [-]

We still use grep because its useful. And it's useful precisely because it doesn't depend on syntax so will work on anything text based.

hnlmorg 3 days ago | parent [-]

grep is great. My point isn’t that we shouldn’t use it. My point is that we shouldn’t be held back by it.

komali2 4 days ago | parent | prev [-]

The things all being described are way beyond non trivial to solve, and they'd need to be solved for every language.

Grep works great.

hnlmorg 3 days ago | parent [-]

> The things all being described are way beyond non trivial to solve, and they'd need to be solved for every language.

Except it already is a solved problem.

If languages compile to a common byte code then you just need one tool. You already see examples of this with things like the IR assembly produced by LLVM, various Microsoft languages that compile to CLR, and the different languages that target JVM.

There are also already common ways to create reusable parsing rules like LSP for IDEs and treesitter.

In fact there are already grep-like utilities that are based on treesitter.

So it’s not only very possible to create language agnostic, reusable, tools; but these tools already exist and being used by a great many developers.

The problem raised in the article is that we just don’t push these concepts hard enough these days. Instead relying on outdated concepts of what source code should look like.

> Grep works great

For LF-separated lists it does. But if it worked great for structured content then we wouldn’t be having this conversation to begin with.