There are cases where the error is so obvious that the compiler recovers from it while still emitting an appropriate error with a suggestion for the correct code.https://mobile.twitter.com/Sunjay03/status/1032863433362825216 …
U tweetove putem weba ili aplikacija drugih proizvođača možete dodati podatke o lokaciji, kao što su grad ili točna lokacija. Povijest lokacija tweetova uvijek možete izbrisati. Saznajte više
There are cases where the error is so obvious that the compiler recovers from it while still emitting an appropriate error with a suggestion for the correct code.https://mobile.twitter.com/Sunjay03/status/1032863433362825216 …
I've seen this described very eloquently as the "negative space" of the language, code that isn't correct but that *could* work if the language's constraints where different.https://mobile.twitter.com/ManishEarth/status/863839506771791872 …
Other times the compiler has to guess a bit, but are common enough errors it is worth it to try. In this case the parser actually makes sure that the suggested code would correctly parse as suggested.https://mobile.twitter.com/b0rk/status/954366146505052160 …
In other cases, the compiler knows there's a problem but can't suggest a way to fix it. We should then give enough information that the programmer will have as much context as possible.https://mobile.twitter.com/eevee/status/957524005686149120 …
There are some common typos that we all make all the time, those can be accounted for by the compiler as well.https://mobile.twitter.com/sallar/status/1014861933281935361 …
Not only that, but every error is an opportunity! We can teach nuances of the language right then and there!https://mobile.twitter.com/sugarpirate_/status/1070235873751388161 …
Of course, there's room for improvement...https://mobile.twitter.com/mycoliza/status/1120813337426534400 …
But I really want people to think of the compiler as a pair programmer, or a tutor, or a helpful friend, saving us time from silly mistakes.https://mobile.twitter.com/matthiasendler/status/946880964726226944 …
And keep this feeling to a minimum...https://mobile.twitter.com/mgattozzi/status/1063969778992336901 …
...having your back as much as it can.https://mobile.twitter.com/InsanityBit/status/1086809791794634752 …
After all, Ferris is friendly. https://mobile.twitter.com/hushcoil/status/987662850385686528 …
I want to make clear though that my objection to the paper is small and I can see how they arrived at it in a language with fewer syntactic flag poles. Racket's negative space is smaller, which makes it harder to derive meaning from incorrect code.
Which is ironic, because a lot of people enjoy writing code in languages with very little syntactic fuzz, but those extraneous not strictly necessary markers make code easier to parse anf interpret, even when incorrect, not I it for compilers but for humans too!
So you can have a language like Python or Ruby with minimal syntax that is nice to write but has to rely on a lot of magic to allow that...
...or languages like JS, Perl and Scala that have a lot of flexibility, making parts of the syntax optional even, but because of that they are hard to interpret, even when correct...
...and finally languages like Java and Pascal, where the syntax is rigid and can be verbose, but because of that verbosity have excellent tooling and are easy to pick up for humans.
I believe Rust walks a tightrope between the latter two design spaces, defaulting towards the later when the trade offs would go counter speed/safety (think APIs to read files that require you to pass in a mutable buffer)...
...relying on the compiler to minimize the pain introduced ("Hey! I know what you wanted. We couldn't do it that way because of reasons, but here's how you do it. Cheerio!")
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.