Reminder: unless your entire compiler toolchain is formally verified (it's not), you have no guarantees that the code it emits is memory-safe. Language builtin collections in memory-safe languages are no different from rust's unsafe-using stdlib collections.
-
Show this thread
-
Replying to @Gankra_ @ManishEarth
Don't most memory safe languages implement most of their collection libraries in the language itself, thus avoiding this problem?
2 replies 0 retweets 2 likes -
Replying to @samth @ManishEarth
I... don't think that's true? It would be very difficult to implement most languages' notion of an array without circularly appealing to the notion of an array. (aiui Java is relatively exceptional for having "fixed sized array" as a distinct concept to appeal to here)
3 replies 0 retweets 2 likes -
Replying to @Gankra_ @ManishEarth
I think most languages have a small number of simple collection types with a few operations provided by the runtime (which, as you say, might have bugs) and other data structures as well as most operations are built on that.
1 reply 0 retweets 1 like -
Replying to @samth @ManishEarth
This is mostly true for Java-like languages, but less true for scripting languages in my experience. Perl/Python/Ruby/JS/etc. tend to implement all collections in C or C++. Lisp and Scheme are the exception, following Java here.
3 replies 0 retweets 4 likes
It’s rare enough in scripting languages that you see packages advertising themselves as “in pure Python” (etc.), since the default is to write the guts of the package in C
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.