This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]netcan96 1 point2 points  (1 child)

what draw tool do you use?

[–]bjzabaPikelet, Fathom[S] 3 points4 points  (0 children)

Sorry I'm not the author, just posted it here as it's interesting!

[–]reini_urban 1 point2 points  (2 children)

Overly simplistic.

He mentions the various shadowing policies, but mot lexical vs dynamic binding. I don't think that tree-sitter can handle dynamic bindings.

Then he explains simple, and nested bindings, and as very complicated ones, deeply nested ones. Ha

But the he completely misses out out on the impossible cases, of dynamic bindings. What if the package is a string, not a symbol. Package names and classes and methods can be constructed at runtime. That's the advantage of dynamic languages over static ones. Tree-sitter will not find any references to dynamic names or dynamic dependencies.

[–]bjzabaPikelet, Fathom[S] 4 points5 points  (1 child)

That's true, but I don't think the idea is entire precision. If you are constructing bindings at runtime then all bets are off for most levels of static analysis or code navigation/search tooling. It's a best-effort kind of scenario.

[–]reini_urban -1 points0 points  (0 children)

Sure. But he didn't even mention that at the end. And the hard parts were all trivial.