1,521 karma · joined August 13, 2015
type noCopy struct{}
func (*noCopy) Lock() {}
func (*noCopy) Unlock() {}Local mutability is probably one of the most common uses of mutability. A lot of it is using local state to build up a more complicated structure, and then getting rid of that state. Getting rid of that use-case is just giving up performance.
Coming up with an original design for OSes is like a 3rd project thing.
Everyone's different. The problem with parsing isn't the difficulty, but rather the potential for endless bikeshedding. You're having to make a ton of opinionated decisions that in turn produce more questions about your syntax. If your personality is like mine in that it's a bit obsessive "completing" a phase, then parsing feels like an endless quagmire. In comparison, AST -> type inference -> codegen feels more structured and straightforward.
- Explicit lifetimes are what make rust what it is. It would have surely failed had they not been introduced.
- I disagree about having a first-class module system instead of traits. Coherence and implicit instance resolution are a core value of Rust. `Send / Sync` are key examples of that.
- Green threads probably wouldn't been viable for rust, given the kind of programs it's targeting.
- Pretty much everything else however, I agree with.
- If there is no concrete type that you can infer for the given literal, throw a type error.
- If there is no concrete type that you can infer for the given literal, fall back to a default, e.g. Int.
But this sort of situation is why backtracking during type inference can lead to pathological behavior.
Layering a CRDT on top of an existing schema might not be very efficient though. You'd likely need to modify the db's internals. I have no evidence for this statement though :)
In Plan 9, processes are sandboxed by default, so they only see what is exposed to them. You utilize mounts to attach filesystems to processes, and since all APIs are done through the filesystem, you can trivially wrap/extend/replace those APIs with different implementations.
Essentially, everything-is-a-filesystem + 9p gave you a kind of capability-based security.
Libraries are underdocumented and unavailable. The build system and package management is arcane. SML feels like a toy language compared to working in OCaml.
This is why their compiler essentially only works on pure functions whose inputs have a statically known size.