r/programming • • 4d ago

Java4Shell is a reason to use Java

https://mccue.dev/pages/11-18-26-java4shell
44 Upvotes

50 comments sorted by

View all comments

Show parent comment

1

u/simon_o 3d ago

That doesn't make C# unsafe or dangerous.

No, just less safe and more dangerous then Java, which is the point OP wanted to make.

--enable-native-access works transitively, and at runtime, which means the person executing the code sees if anything shady might be going on and where, and needs to explicitly acknowledge it.

This is way more useful than a compiler option like AllowUnsafeBlocks that is only relevant at build time.