josefx
Of course they also flat out disabled any mechanic their AI hadn't mastered.
Why not? Is it the lack of race conditions? The lack of crashes or memory leaks? Is it the fact that you came up with it in five seconds and it is still a million times better than what we have? Or is it the fact that the holy book of Posix spells out how to do it badly in C and because of that we are never allowed to replace it with something better?
Let me clarify. There is no reason for std::env to be dragged down by UNIX, it could be its own, modern, safe thing with the Unix API living in std::pet_cemetary or some comparably clear namespace for people who have to pass runtime information to a C library through absolutely unsafe ways. Environment variables are usefull, the unix limitations make them less so.
Rust has no reason to touch the original Unix API. Take a snapshot of the values at startup and write an API around that, any runtime modification of the Unix environment is suspect anyway and anyone who wants to deal with that rotten mess can jump through half a dozen hoops.
> Rust is doing everything it can here, these APIs are labelled unsafe
Unix gave us C, clearly Rust should have just labeled every C standard library function like malloc and free unsafe and thrown up their hands instead of introducing ownership semantics and all that messy compiler logic around it. After all Rust can't fix how Unix works, so they shouldn't have tried in the first place.
There are also hardened malloc/free implementations for C based runtimes. Of course none of that is perfect, the famous heartbleed exploit for example bypassed any outside memory protection as the library agressively reused already allocated buffers, none of the languages you named would protect against that.
Code that turns into an unmaintainable mess the moment even one of the types involved contains dynamically allocated data? Yes, seen that thousands of times.
The article creates a type that has typesafety, resource management and basic copy/assignment operations backed in.
And every now and then we have to rescue banks that are too big too fail at the cost of everyone else, because someone dreamed up a way to increase short term profits that involves giving loans to people who will never pay them back.
> neither your car,
Praising a trillion dollar GDP, but can't afford a used car.
That in the same paragraph as Galileo is a bit self contradicting. The church was stuck on an ancient greek model of the universe and the greeks were very much aware that the world was round, they once spend a day or two measuring it.
Is it usual for companies in the UK to just not pay their employees?
Isn't their entire business model build around bypassing the regulations build around the taxi industry? Things like training for new drivers and I think they even refused to do mandatory background checks early on.
> If you want to force Uber to take responsibility for the driver, the simplest thing is to get rid of the driver.
When their driverless car ran over a cyclist they pretended it was too dark to see anything, using a video from a cheap camera as "evidence".
I once heard that the worst thing you can run into is someone who is both well intentioned and bad at their job.
Somehow most of my portability issues seem to be caused by glibc, its symbol versioning and close ties to the dynamic loader. Minor versions aren't compatible, no two Linux distros ship the same version and you can't just provide your own without also patching in your own dynamic loader.
At least as far as the defaults on Linux go I consider C the root of all evil.
I would say there is nothing descriptive about calling something American. America doesn't even refer to a single country, does it operate out of Brazil? Would that even be relevant information to anyone using an Airline?
The code generating the xml text may not be aware of the final encoding used to store/transmit it and a library writing text to an encoded stream might not be aware that the text it is sending contains xml. So I would say allowing xml to be parsed using an externally specified encoding makes at least some sense.
> A document that initially looks like UTF-8 could be almost any of literally hundreds of encodings including all the common ISO 8859 encodings
Your own link shows that those "hundreds of encodings" are all based on ASCII, which is enough to get the concrete encoding from the declaration.
> and then switch to a "parsing" phase after rewinding to the start of the document.
So one call to fseek(stream, 0, SEEK_SET)?
If you are guessing it is because someone failed to properly store or transmit the document.
From what I remember the head of the european commission was picked from a group of people that weren't even up for election after the official candidates that were paraded around during an EU wide election where dismissed.
And the reason for that two language approach is given in the linked source:
> We aimed to provide a “glue language” for the Web designers and part time programmers who were building Web content from components such as images, plugins, and Java applets. We saw Java as the “component language” used by higher-priced programmers, where the glue programmers—the Web page designers—would assemble components and automate their interactions using [a scripting language].
Earlier sources clearly state that Java was intended as the primary language and JavaScript merely acting as glue.
The entire browser ecosystem started out closed source. Even JavaScript was written to interact with closed source Java Applets.
> Flash was a constant embarassment of RCEs vulns
Browsers still are the goto target for contests like Pwn2own. It is almost like inviting the entire world to run untrusted code on your computer is not a great idea, no matter how many security buzzwords browser makers like to throw arround.