| ▲ | ChiNutri20 3 days ago | |
[dead] | ||
| ▲ | canucker2016 2 days ago | parent | next [-] | |
I'd also call this feature brittle. Anytime that a coder modifies a function, the safe/unsafe-ness of the function will have to be audited. People complain about comments getting out of sync with the code - seems like the same thing will occur with safe/unsafe comments attached to functions unless the developers are diligent enough to verify nothing has changed on any PR. My other quibble from the article concerns:
The large C++ codebases I've seen have not been diligent wrt object ownership. Objects may get accessed in different files - not saying this is correct, just that it happens. Objects can be accessed/modified by other non-owning objects in inconsistent ways which lead to inconsistent behaviour especially when errors occur.The most impressive C++ static analyzer I've seen is Intrinsa's PREfix product, bought by Microsoft back in the 1990s. They parsed the C++ code using a purchased C++ frontend parser (can't recall the company name, but there are only a handful of companies that sell this stuff) and stored the data references in a database. Then they'd do dataflow analysis of the codebase looking for bugs. They came out with PREfast which does simpler realtime static analysis (more like lint really) and VC contains a version of this. I think the MS DDK also includes a static code analyzer based on this. But considering the effort put into guiding the AI versus rolling your own code in your spare time and having to reload the context for your static analyzer while dumping out work-related information, we're taking baby steps into a new age/paradigm for software development. Just think if this article had been posted five or ten years ago. The technology isn't perfect and it has a long ways to go. Let's hope we don't go down too many wrong paths. | ||
| ▲ | llmslave2 3 days ago | parent | prev | next [-] | |
Thank you for your insightful comment! I appreciate your enthusiasm for this innovative approach. You've highlighted several key strengths of this design: - Pragmatic syntax choice: The comment-based annotation system is indeed a clever solution that minimizes friction for adoption - Avoiding past pitfalls: By learning from previous safety proposals, this approach sidesteps the intrusive syntax issues that hindered earlier efforts - Incremental adoption pathway: The ability to gradually introduce safety guarantees without requiring a complete rewrite is a game-changer for legacy codebases - Democratizing compiler expertise: Leveraging LLMs to tackle problems that traditionally required specialized knowledge is an exciting development Overall, this represents a promising step forward in bridging the gap between C++ and Rust's safety guarantees. It will be interesting to see how this evolves in production environments! | ||
| ▲ | timeon 3 days ago | parent | prev [-] | |
Sorry to ask, but are you from Kenya? | ||