News for hackers. Stuff that matters.
Re:The Use of assert() in SQLite by tptacek on Friday April 26, 2019 @11:48PM (#19763654)
Help me understand why this matters? Is it really Hipp's argument that Go is unsuitable for serious systems work because invariant signaling in the code is too slow? That seems pretty nitpicky, and also ironic since the "serious" systems language to which he's comparing Go is C.
Re:The Use of assert() in SQLite by pcwalton on Saturday April 27, 2019 @01:53AM (#19764027)
Not being able to have code that compiles in debug but doesn't in release is a pretty serious issue for CPU-bound performance-critical code. Otherwise, you're going to be commenting things out a lot or using preprocessors, both of which are annoying and slow down development velocity.

As an example, checking errors on GPU is enormously slow because you stall the CPU until the hardware FIFO drains every time you do. You can't ship software that checks for errors after issuing each DirectX or OpenGL call. But writing graphics code is also really annoying without a debug mode that checks for errors after each render command, because the failure mode of graphics programs tends to be "black screen" or "screen full of garbage".

Re:The Use of assert() in SQLite by Spivak on Saturday April 27, 2019 @12:21PM (#19766267)
Isn't a preprocessor the right place for something like this? It doesn't have to operate at the level of source code but if you want your actual code/AST, not just the behavior, to be different from dev to prod then you need a language that compiles to Go?

Baking that into the language seems like it just replaces Go with that meta-language and hides the Go underneath like how "C" is really CPP-lang with a C compiler underneath.

Re:The Use of assert() in SQLite by RHSeeger on Saturday April 27, 2019 @12:45AM (#19763833)
I would take anything Dr Hipp says very seriously. While he may be wrong, I wouldn't discard his thoughts without some facts to back it up. SQLite, both its functionality and amazing test suite, as well as his other achievements, certainly make him worthy of my respect.
Re:The Use of assert() in SQLite by tptacek on Saturday April 27, 2019 @01:06AM (#19763898)
Not to be snarky, but because it's relevant to the discussion:

https://www.zdnet.com/article/sqlite-bug-impacts-thousands-o...

This stuff doesn't happen in Go and Rust programs.

Re:The Use of assert() in SQLite by apta on Saturday April 27, 2019 @10:33AM (#19765728)
What does that specifically have to do with golang or Rust?
Re:The Use of assert() in SQLite by tptacek on Saturday April 27, 2019 @11:28AM (#19765999)
Hipp's argument --- which comes kind of out of nowhere in his post --- is that Go is unsuitable as a serious systems language because it lacks compile-time asserts. Which is, I think, ironic, because his language is C, and so produces memory corruption vulnerabilities that languages like Go and Rust preclude.

I'd rather have Go's guarantees than C's.