2 ms·
That's a good paper. The studies that involve someone writing a small program aren't too helpful, though. Typing is most useful when the type structure won't f
by Animats 12y ago
That's a good paper. The studies that involve someone writing a small program aren't too helpful, though. Typing is most useful when the type structure won't fit in the programmer's head all at once, or when there are multiple programmers and changes over time. Small scale experiments don't catch that, and are more sensitive to how well the compiler reports errors.
Looking at code on Github is promising. Several people have done that, trying to analyze changes. Of course, you only see the changes that get pushed to the server, so you're only seeing post-test results.
We seem to be converging on a consensus on typing. Within a module, automatic type inference makes life easier and programs less wordy. The newer hard-compiled languages, Go and Rust, have that. Even C++ has that now, with "auto". Program-wide type inference is hard and less helpful. Program-wide inference also means the caller's types drive the callee, which is a mismatch to the concept of libraries. So that hasn't caught on.
Expressing size remains an issue. Is size part of a type? C and C++ struggle with this and lose. Go and Rust make a distinction between arrays and slices, which seems to be working.
Type attributes are still up in the air. Read-only/immutable is common. By value or by ref is sometimes explicit and sometimes implicit. Whether something can be nil is not common, but has been tried. Rust has the "borrow" concept, which is promising but doesn't much mileage on it yet.
There's been real progress in recent years. Until recently, type systems in mainstream languages looked like either C or Pascal. Now they're getting better.