- Rust has the same memory problem as C and C++ - 4 Updates
Christian Gollwitzer <auriocus@gmx.de>: Apr 22 11:56AM +0200 Am 20.04.20 um 16:02 schrieb ΓΓΆ Tiib: > typical I/O like gyroscopes, GPS input, touch gestures, cameras, > microphones, speakers and so on inbuilt? No language comes even > close. JavaScript run in the browser. Not to dismiss your other points, though. Christian |
"ΓΓΆ Tiib" <ootiib@hot.ee>: Apr 22 04:52AM -0700 On Wednesday, 22 April 2020 12:56:33 UTC+3, Christian Gollwitzer wrote: > > microphones, speakers and so on inbuilt? No language comes even > > close. > JavaScript run in the browser. Not to dismiss your other points, though. How that JavaScript is special? My experience is different. For example I can use the chrome.bluetooth API from C++ (Wasm) or JavaScript if my target browser is Google Chrome ran on OS X, Windows or Chrome OS. <https://developer.chrome.com/apps/bluetooth> It is no way feature of JavaSript any more than Win32 Bluetooth API is feature of C somehow. <https://docs.microsoft.com/en-us/windows/win32/bluetooth/bluetooth-start-page> |
cross@spitfire.i.gajendra.net (Dan Cross): Apr 22 08:52PM In article <r7hfh7$3rq$1@dont-email.me>, >for a great promise... that they can't keep. >A recent paper shows that Rust has the same problems as C or C++. >https://arxiv.org/pdf/2003.03296.pdf "Unsafe code is unsafe; film at 11." There's not much to see in this paper. It's well-known that Rust gives you an unsafe superset of the language that gives you access to dangerous features; use of that superset is even preceded by the `unsafe` keyword, so the notion of unsafety is built into the language at the syntactic level. "Unsafe" in Rust means two things: first, it allows the compiler to relax its automated checking of some of Rust's guarantees, under the assumption that it's up to the programmer to enforce those guarantees. Second, it's a note to future programmers that, "there be dragons here." In all cases pointed out by this paper, the code in question violated Rust's rules through misuse of `unsafe`. In other words, the programmers messed up. While certainly problems, it's not clear how this is the language's fault. If the programmers could have restricted themselves to the safe subset of the language, it's not clear that any of these bugs would have been arisen. Can Rust do better _in the unsafe superset_? Probably, but I don't think anyone disputes that. Rust helps, but doesn't absolve programmers from knowing what they are doing. FWIW, I do see lots of beginning Rust programmers misusing `unsafe`; in particular, it's often over-used by those getting working with the language for the first time. - Dan C. |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Apr 22 02:13PM -0700 On 4/20/2020 2:51 PM, Melzzzzz wrote: >> Can you get it to run and produce a rendering? ct_plane.ppm > Oh you used complex ;) bingo! Therefore its C++... ;^) |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment