Re: [sqlite] Go & SQLite asserts

2019-05-03 Thread Jens Alfke
> On May 3, 2019, at 3:06 AM, Rowan Worth wrote: > > But there's a very clear > convention set out surrounding the use of panic() - it should never form > part of a module's public API. It's not an error reporting mechanism and > callers should never be expected to invoke recover() just to use

Re: [sqlite] Go & SQLite asserts

2019-05-03 Thread Rowan Worth
On Fri, 3 May 2019 at 16:03, Dominique Devienne wrote: > On Mon, Apr 29, 2019 at 9:49 PM Russ Cox wrote: > > > On Mon, Apr 29, 2019 at 3:28 PM Richard Hipp wrote: > > For what it's worth, it was not clear to me until just now that the > article > > existed to push back on a general "asserts con

Re: [sqlite] Go & SQLite asserts

2019-05-03 Thread Dominique Devienne
On Mon, Apr 29, 2019 at 9:49 PM Russ Cox wrote: > On Mon, Apr 29, 2019 at 3:28 PM Richard Hipp wrote: > For what it's worth, it was not clear to me until just now that the article > existed to push back on a general "asserts considered harmful" notion. I > was reading it as primarily documenting

Re: [sqlite] Go & SQLite asserts

2019-04-29 Thread Russ Cox
On Mon, Apr 29, 2019 at 3:28 PM Richard Hipp wrote: > On 4/29/19, Richard Hipp wrote: > > > > Because assert() can be and is commonly misused, some programming > > language theorists and designers look with disfavor on the whole idea > > of assert(). For example, the Go programming language omit

Re: [sqlite] Go & SQLite asserts

2019-04-29 Thread Richard Hipp
On 4/29/19, Russ Cox wrote: > > Thanks very much for a productive, enlightening discussion, and for making > the changes. > Thanks for bringing up your concerns and helping to make the article better. In case you had not previously noticed, communicating with other humans is not my forte and I c

Re: [sqlite] Go & SQLite asserts

2019-04-29 Thread Richard Hipp
On 4/29/19, Richard Hipp wrote: > > Because assert() can be and is commonly misused, some programming > language theorists and designers look with disfavor on the whole idea > of assert(). For example, the Go programming language omits a built-in > assert(), since the Go developers feel that the h

Re: [sqlite] Go & SQLite asserts

2019-04-29 Thread Richard Hipp
On 4/29/19, Russ Cox wrote: > I were designing a new language, > the question of adding all three - invariant(x), always(x), and never(x) - > as a collective replacement for assert(x) would be an interesting thing to > consider. There are benefits to having invariant(x) as a built-in in the langu

Re: [sqlite] Go & SQLite asserts

2019-04-29 Thread Richard Hipp
On 4/29/19, Russ Cox wrote: > > Because assert() can be and is commonly misused, some programming language > theorists and designers look with disfavor on the whole idea of > assert(). For example, the Go programming language omits a built-in assert, > to eliminate its frequent misuse to mean ALWA

Re: [sqlite] Go & SQLite asserts

2019-04-29 Thread Russ Cox
On Mon, Apr 29, 2019 at 11:49 AM Richard Hipp wrote: > On 4/29/19, Russ Cox wrote: > > > > That page's section 1.1 Philosophy of Assert describes the SQLite > project's > > philosophy about three different kinds of assertions - assert, ALWAYS, > and > > NEVER - which I found very helpful and pri

Re: [sqlite] Go & SQLite asserts

2019-04-29 Thread Richard Hipp
On 4/29/19, Russ Cox wrote: > > That page's section 1.1 Philosophy of Assert describes the SQLite project's > philosophy about three different kinds of assertions - assert, ALWAYS, and > NEVER - which I found very helpful and principled and would consider > pointing other developers at when the to

[sqlite] Go & SQLite asserts

2019-04-29 Thread Russ Cox
Hi all, https://www.sqlite.org/src/wiki?name=Bug+Reports said to send bug reports here; this is a documentation bug report for https://www.sqlite.org/assert.html#philosophy_of_assert_. That page's section 1.1 Philosophy of Assert describes the SQLite project's philosophy about three different kin