News for hackers. Stuff that matters.
Re:Maintain It with Zig by pjmlp on Wednesday September 08, 2021 @03:35PM (#28461945)
All systems programming languages need the ability to do unsafe stuff, the big difference between C , C++, Objective-C and all the remaining system programming languages since JOVIAL and NEWP, is the explicit unsafe code blocks that make that visible.

It is a big difference to have it on your face that something might need to be properly double checked and having each line of code as possible security exploit.

Re:Maintain It with Zig by jhgb on Wednesday September 08, 2021 @04:44PM (#28462811)
> the big difference between C , C++, Objective-C and all the remaining system programming languages since JOVIAL and NEWP, is the explicit unsafe code blocks that make that visible.

Would you consider Oberon to belong in the former or latter category? On one hand, there's no explicit code blocks as such (syntactically). On the other hand, unsafe primitive operations are limited to the SYSTEM module, so functions calling operations in the SYSTEM module can be considered doing unsafe things.

Re:Maintain It with Zig by pjmlp on Wednesday September 08, 2021 @05:08PM (#28463089)
If you read Oberon documentation, modules importing SYSTEM are tainted and considered unsafe.

Just like Modula-2 already does it.

Re:Maintain It with Zig by jhgb on Wednesday September 08, 2021 @05:19PM (#28463204)
Well...that's what I meant. But which one is it, then?
Re:Maintain It with Zig by pjmlp on Thursday September 09, 2021 @02:06AM (#28466808)
Just like the languages that have unsafe code blocks it is relatively easy to track down unsafe modules, same thing.

And just like languages with unsafe code blocks, there are compilers that have switches to forbid the use of tainted modules unless explicitly allowed.

In any case, way better than what C, C++ and Objective-C offer, regarding security per line of code.