4 ms·
https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines
by rafram 10mo ago
https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines
- hu3 10mo agoDocumentation to guide devs on safe usage of C++ is enough? So any language should be allowed as long as they instruct developers to be careful.
- creato 10mo agoI don't know if they do this, but those conventions could be enforced by a tool.
- concinds 10mo agoYes, they do this, and it's really not an unreasonable requirement.
- arcanemachiner 10mo agoOf course. It's just a coincidence that they're placing onerous restrictions on competi- I mean alternative browser engines. Restrictions which, of course, they're not obliged to follow themselves. I am sure that Apple will make no other efforts to impede others from unwalling the garden. That would be completely ridiculous, and frankly, un-Apple-esque.
- concinds 10mo agoBoth Chrome and Firefox are already compliant, so I don't see it as onerous, but the full context of the list is indeed an extremely loud and clear "FUCK YOU, WE OWN YOU" to regulators and other browser vendors.
- dagmx 10mo agoWhich of the restrictions do you feel they don’t abide by? It looks like they meet all their own restrictions
- bangaladore 10mo ago> Use memory-safe programming languages, or features that improve memory safety within other languages, within the alternative web browser engine at a minimum for all code that processes web content; There is absolutely zero way to satisfy the latter part here. It's at best non-enforceable. If I'm using C++ and use std::span instead of a c-style array, is that good enough?
- dagmx 10mo agoWhy not? The wording is “features that improve memory safety” It doesn’t say that it needs to provide absolute memory safety. Based on the linked WebKit guidelines, it seems like they meet the criteria.
- bangaladore 10mo agoThat's the commenter, not from the Apple page as far as I can tell. My point is the requirement is too broad. It cannot be meaningfully enforced.
- dagmx 10mo agoIt’s literally from their requirements page https://developer.apple.com/support/alternative-browser-engines/#:~:text=Use%20memory%2Dsafe%20programming%20languages https://developer.apple.com/support/alternative-browser-engi... You have to request explicit permission to be able to be a browser on iOS. You can’t just ship an app. I assume part of that process is that you specifically demonstrate that you try your best to use best safety practices. Again, it’s also not absolute safety. It’s just due diligence review.
- bangaladore 10mo ago
- JimmyBiscuit 10mo agoTheres C++ in military airplanes, they just cut out 90% of the features: https://www.stroustrup.com/JSF-AV-rules.pdf https://www.stroustrup.com/JSF-AV-rules.pdf And heres a nice video about it: https://youtu.be/Gv4sDL9Ljww?si=Z4riPMKAKcIKaU0s https://youtu.be/Gv4sDL9Ljww?si=Z4riPMKAKcIKaU0s
- dmazzoni 10mo agoYes, in WebKit, SaferCPP guidelines are enforced by a static analysis tool.
- jjmarr 10mo agoMy work bans raw new and delete, so we only use unique_ptr. It's not as memory safe as Rust's borrow checker but I've never seen a segfault.
- resonious 10mo agoCompliance often works exactly like this.
- ladyanita22 10mo agoApple's resistance to rust is truly mind-boggling