Programming languages without garbage collection send us down a long path of design decisions that lead to slow compile times and fragile runtime performance cliffs.
-
-
Unfortunately, most languages missed this opportunity. The C family including C# and Java are overly imperative and lost variance due to wrongly-scoped mutability. And functional languages have generally chosen type systems lacking subtypes, covariance, and contravariance.
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
If you are happy with the cost of the indirect call, what stops you from creating this wrapper in a statically compiled language without GC on stack? I don't think these are related. The big issue *is* the indirect call, which can be prohibitively expensive.
-
If a subtyping relationship is implemented by a conversion like vector<t>(const vector<u>&) that works by holding a reference to its input, then the dangling reference issues will be explosive. This led C++ down the string_view path to distinguish epemeral things.
- Još 1 odgovor
Novi razgovor -
-
-
How is this different from Java etc (since we have no existing language to point to as an example)? And unless you have some impressive optimization in mind, this will end up ~10x slower than the highly specialized code C++/Rust emit, which is a high cost for "proper" subtyping.
-
And agree with
@Jonathan_Blow that specialization based typing is possible without excessive compilation cost or crazy errors (at least I am attempting so in http://strlen.com/lobster/ ). It can be super expressive without needing type classes etc. - Još 7 drugih odgovora
Novi razgovor -
-
-
You're thinking in the context of a strict type system though. It's not entirely clear to me that we should bother, i.e. I am not persuaded (or more importantly, have seen strong empirical evidence) of the usefulness of overly strict enforcement of types in real-world code.
-
My experience with the value of strict typing is very different from yours!
- Još 2 druga odgovora
Novi razgovor -
-
-
I think that’s more a property of having a JIT than a GC. C++ and Rust can instantiate wrappers just fine, but they rely on monomorphization to get good performance. C# and Java can base everything on abstractions like IEnumerable because they can devirtualize hot paths on demand
- Još 1 odgovor
Novi razgovor -
-
-
You need gc for that? As opposed to managing reference to that wrapper?
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
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.