News for hackers. Stuff that matters.
Re:Rust Dependencies Scare Me by notnullorvoid on Friday May 09, 2025 @09:05PM (#43942426)
I don't think you need to get very complex to design a language that protects libraries from having implicit system access. If the only place that can import system APIs is in the entry program, then by design libraries need to use dependency injection to facilitate explicit passing of capabilities.

One can take just about any existing language and add this constraint, the problem however is it would break the existing ecosystem of libraries.

Re:Rust Dependencies Scare Me by loglog on Saturday May 10, 2025 @03:03AM (#43943756)
If you want this today, Haskell might be the only choice.
Re:Rust Dependencies Scare Me by tome on Saturday May 10, 2025 @08:54AM (#43945240)
Yes, there is a sense in which Haskell's "effect systems" are "capability systems". My effect system, Bluefin, models capabilities as values that you explicitly pass around. You can't do I/O unless you have the "IOE" capability, for example.

https://hackage.haskell.org/package/bluefin