RAII is also possible in GC languages, just done differently.
If the language supports macros or trailing closures, you can somehow have similar approaches to RAII handle classes.
with-database {
// connection is only accessible here
}
// connection is now closed and gone
with-file {
// file is only accessible here
}
// file is now closed
with-mutex {
// mutex guarded resource is now visible here
}
// mutex is now released, regardless of possible errors
with-native-memory {
// able to use an OS memory block
}
// OS got the memory back
That seems like the best approach to me. Plus you can use RAII which is a far bigger advantage than any minor speed differences.