Common Lisp’s open function to me is very intuitive. Rust’s API IMO is also excellent. Still, I need to reread the API reference every few months to ensure I understood it correctly. In contrast, I’m confident about the behavior of this Common Lisp program without rereading the manual.

std::fs::OpenOptions::new() .create(true) .write(true) .append(true) .open("foo.txt")

Common Lisp

(open #p"foo.txt" :direction :output :if-exists :append :if-does-not-exist :create)

Follow

@veer66 So it's just creating/opening a file in append mode? That seems a bit far from great. Lua/C

io.open("foo.txt", "a")
fopen("foo.txt", "a")

· · Web · 1 · 0 · 0
@applejack IMO C-style is the best for one who is familiar with it because they can remember exactly what is a, a+, w, etc. However, it is the worst for one who don't.
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.