void legacy_main() {
char *name = malloc(1024); // Heap allocation?
printf("Name: ");
scanf("%s", name); // Buffer overflow risk
// Forgot to free(name) -> Memory Leak
}#include <camelot.h>
void main() {
// 1. RAII Workspace (Auto-free)
Workspace ctx = arena.create(1024);
// 2. Buffer-Safe Input (Slice)
io.print("Name: ");
String name = io.scan(&ctx, 0);
// 3. Type-Safe Output
io.print("Hello, %S\n", name);
} // Memory released automatically here.