diff options
Diffstat (limited to 'drafts/its-not-rust-vs-go.php')
-rw-r--r-- | drafts/its-not-rust-vs-go.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drafts/its-not-rust-vs-go.php b/drafts/its-not-rust-vs-go.php index 1ec29a8..f423744 100644 --- a/drafts/its-not-rust-vs-go.php +++ b/drafts/its-not-rust-vs-go.php @@ -189,3 +189,31 @@ include($_SERVER['DOCUMENT_ROOT'] . '/includes/head.php'); <p>Everything isn't great in goland either. Gofmt and the go module structure were harsh and annoying for me to use. I don't prefer languages with rigorous whitespace requirements anyways. The opinionated standard library is fickler than I would imagine, and the drama churned up over the introduction of generics (a useful, modern programming concept) is popcorn-worthy</p> <p>The hidden cost of Go: go might be faster to actually type in. But I spend much less time debugging in Rust. The compiler/borrow-checker tells me why I can't write to memory that's already been dropped or borrowed someplace else, and suggests what I need to paste in to fix it. These kinds of bugs take a long time to track down by stepping-through Go code. Some might not even get caught. I don't use a debugger for Rust because I rarely need to step through my code one line at a time to figure out where something became NULL</p> + +<pre> +<code> +panic: runtime error: invalid memory address or nil pointer dereference +[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x17cf291] + +goroutine 52 [running]: +github.com/rclone/rclone/cmd/mountlib.(*MountPoint).Wait.func1.1() + github.com/rclone/rclone/cmd/mountlib/mount.go:256 +0x51 +sync.(*Once).doSlow(0xc00056c7f0, 0xc00057be38) + sync/once.go:68 +0xb9 +sync.(*Once).Do(...) + sync/once.go:59 +github.com/rclone/rclone/cmd/mountlib.(*MountPoint).Wait.func1() + github.com/rclone/rclone/cmd/mountlib/mount.go:254 +0x59 +github.com/rclone/rclone/lib/atexit.Run.func1() + github.com/rclone/rclone/lib/atexit/atexit.go:104 +0x7f +sync.(*Once).doSlow(0x2e19420, 0x1e4ecd0) + sync/once.go:68 +0xb9 +sync.(*Once).Do(...) + sync/once.go:59 +github.com/rclone/rclone/lib/atexit.Run() + github.com/rclone/rclone/lib/atexit/atexit.go:102 +0xac +github.com/rclone/rclone/lib/atexit.Register.func1.1() + github.com/rclone/rclone/lib/atexit/atexit.go:52 +0xf0 +created by github.com/rclone/rclone/lib/atexit.Register.func1 + github.com/rclone/rclone/lib/atexit/atexit.go:44 +0xa5 +</code></pre> |