Hacker News new | ask | show | jobs
by parhamn 989 days ago
Well its a different access pattern. As the underlying library points out:

> It is used in programming environments that do not allow calling C API functions.

Also I guess which one is easier will be subjective. The steps are sorta similar:

Step 1) install sqlite or squinn on the base system (the latter might be harder)

Step 2) if sqllite use cgo, if squinn just use go (the former might be harder but more performant)

1 comments

Which programming environments that do not allow calling C API functions also let you build/ship arbitrary C executables, though? (Genuinely curious what scenarios this unlocks.)
I use it for SQLite Database access in Go and Java. Java lets you theoretically interface with C code, but it's a lot of JNI/DLL/SO work. It's much easier for me to just os/exec (or Runtime/exec in Java) and send data back and forth. Your mileage may vary, of course.