News for hackers. Stuff that matters.
Re:Memory Safe Languages in Android 13 by pclmulqdq on Thursday December 01, 2022 @02:31PM (#33821442)
Ada seems to fit.
Re:Memory Safe Languages in Android 13 by burntsushi on Thursday December 01, 2022 @02:37PM (#33821524)
Ada has no "unsafe"? Ada has no ffi? Ada has no escape hatches or unchecked APIs whatsoever? Does it have any pragmas that can disable safe checking? Because if it does, it's not "entirely" memory safe.
Re:Memory Safe Languages in Android 13 by thesuperbigfrog on Thursday December 01, 2022 @02:57PM (#33821832)
Ada has "unchecked" operations:

Unchecked Access (unsafe pointers): http://www.ada-auth.org/standards/22rm/html/RM-13-10.html#I5...

Unchecked Deallocations ("free"): http://www.ada-auth.org/standards/22rm/html/RM-13-11-2.html#...

Unchecked type conversions (unsafe casting): http://www.ada-auth.org/standards/22rm/html/RM-13-9.html#I57...

Ada has FFI:

C / C++: http://www.ada-auth.org/standards/22rm/html/RM-B-3.html

COBOL: http://www.ada-auth.org/standards/22rm/html/RM-B-4.html

Fortran: http://www.ada-auth.org/standards/22rm/html/RM-B-5.html

Ada has pragmas to both enable more security measures or relax security measures:

http://www.ada-auth.org/standards/22rm/html/RM-L.html

Just like in unsafe Rust, sometimes in Ada you need to turn off some security features or tell the compiler "I know what I am doing for this part" when interfacing with some hardware or similar low-level stuff.

Re:Memory Safe Languages in Android 13 by pcwalton on Thursday December 01, 2022 @02:37PM (#33821526)
Ada has an FFI.
Re:Memory Safe Languages in Android 13 by modshatereality on Thursday December 01, 2022 @03:00PM (#33821872)
As well as address clause, unchecked_conversion and address_to_access_conversion. Extremely useful tools that give you the choice when to write risky code, and generate a compiler note exactly where such risk lives.
Re:Memory Safe Languages in Android 13 by insanitybit on Thursday December 01, 2022 @03:11PM (#33822031)
A simple heuristic that I expect to work universally is "could I write a program that prints to my terminal on a linux machine?" and if the answer is "yes" then it does not fit.