Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Having languages themselves be built like microkernels

What does that mean? Like... small stdlib with everything moved to extra libraries? Languages don't really have a ring 0 so I'm not sure how to read this even though it feels like a maybe-interesting take

 help



Yeah, currently popular languages don't have any separation, internal isolation, any way to limit or monitor authority (and use of that authority) to access and use resources at all. Programs and any part of them usually have full ambient authority, meaning they can just name and use resources (importing libraries by name, opening any files by stating file paths, ...) without restrictions.

Instead, (parts of) programs should be restrictable to pure computation by denying any external resource access by default, unless explicitly granted or approved more (to the minimum they need, following the principle of least authority).

See: https://en.wikipedia.org/wiki/E_(programming_language) or any of the languages listed here: https://en.wikipedia.org/wiki/Object-capability_model#Langua...

Having a microkernel OS isn't really sufficient if you want to "hollow out the attack surface" well, because many programs (including imported libraries) consist of hundreds of thousands of lines of code made by hundreds or thousands of people (and now also AI). So programs should be internally compartmentalizable as well. Only this, imported libraries being able to sandbox their imported libraries and so on recursively truly reduces the possible effects of vulnerabilities to a minimum.

And only programming languages (or virtual machines i guess) can achieve these types of guarantees in a platform independent way.


Oh, you want an object-capability language; I didn't connect those dots. Yes, that would be an excellent compliment and now that you've spelled it out I can see the analogy.

It does not mean anything to me.

What counts is not the mental model programmers build in their minds. It's the machine code that executes inside CPUs.


A language that can monitor and (ideally: provably - the mental model applying exactly at the hardware level, assuming no shenanigans there) limit the effects of a program's components and isolate them against each other is strictly better than one that can't.

Case in point: https://hforsten.com/redefining-the-number-2-in-python.html

Add a zillion past, present and future supply chain attacks as examples too




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: