News for hackers. Stuff that matters.
Re:The future of Clang-based tooling by saagarjha on Saturday July 29, 2023 @12:28PM (#36921818)
I think the bigger point isn’t mentioned but you can guess it by the medium: the author seems to want to do some sort of security analysis which requires them to hook various stages with precise semantics, and most of the API was probably designed around providing autocomplete or basic code intelligence. Not entirely sure that the only solution here is to throw out these representations rather than have them match reality a bit more closely if you ask for it, but I guess this works too.
Re:The future of Clang-based tooling by adestefan on Saturday July 29, 2023 @12:51PM (#36922071)
It was not built around any of that. It was built to facilitate compiler construction and add some introspection to that process. The problem is that building what is a compile and code generation library to cover multiple languages and multiple architectures is really hard. Abstractions start to get leaky. Next thing you know there are a bunch of assumptions and hacks that make you neat library a big ol’ mess.

I’m not faulting any of the llvm maintainers. Other people were hoping the IR and library bits would turn into more than a compiler toolkit. Unfortunately, reality sets in over time.

Re:The future of Clang-based tooling by Ericson2314 on Saturday July 29, 2023 @01:48PM (#36922686)
Yeah the way things are is very naturally when one only compiles end-to-end --- there is little economic incentive to keep the internals modular when the productivity costs of entanglement only show up with a delay (and also programmers are not really compensated for productivity...).

It's really good in this new LSP era good tooling is increasingly "mandatory", and language implementers have to deliver. (See also https://ollef.github.io/blog/posts/query-based-compilers.htm... .) The higher standards of users (and aspirations of DARPA :)) are now providing the missing economic incentive.