Live data from Hacker News

Zig: software should be perfect [video]

youtube.com

11–20 of 141 posts

Re: Zig: software should be perfect [video]

#11

Definitely nice to have tools (compiler warnings, static analyzers) that can keep you from hurting yourself. Of course many projects don’t use them, for various reasons. I wonder: is turning on full compiler warnings, then fixing them - is it making my software better, or just satisfying some type of neuroticism?

It's not neurosis if it has a useful purpose.

Re: Zig: software should be perfect [video]

#12
post #5

Earlier quoted context omitted.

Yeah. Original title is “Zig: A programming language designed for robustness, optimality, and clarity – Andrew Kelley” and “Software should be perfect” is much more sensational.

If you look at the video, you'll see that "Software Should Be Perfect" is the title slide of the talk (you don't even have to click play, it's there at the start). And then the first words out of the speaker's mouth (other than a sound check) are "I'm going to try to convince all you that software should be perfect". The "original title" you're referring to is what the person who uploaded the talk to youtube titled t…

Questioning if someone read the article or, in this case, watched the video is against the Hacker News guidelines. If you feel a commenter is not fully engaged with the topic you should decline to continue the thread.

Re: Zig: software should be perfect [video]

#13

Definitely nice to have tools (compiler warnings, static analyzers) that can keep you from hurting yourself. Of course many projects don’t use them, for various reasons. I wonder: is turning on full compiler warnings, then fixing them - is it making my software better, or just satisfying some type of neuroticism?

It's not neurosis if it has a useful purpose.

Is it useful if it makes no difference to the user?

Re: Zig: software should be perfect [video]

#14
post #8

Oh come on, we already know that logical systems cannot even self reconcile it's own promises, as Gödel proved, now someone claim software should be perfect?! Edit: the original title does not mention perfect.

Come on, a title like that isn’t meant to be taken too seriously. And you’re reaching a bit far. You can write a perfect function that adds two 32 bit integers. There is a subset of code that can be written perfectly. Especially if you don’t need Turing completeness to write it. Zig just tries it’s best to make it easy to write as much as possible of low level code in a perfect way.

> You can write a perfect function that adds two 32 bit integers.

how ? the problem of adding two 32 bits integers is itself imperfect since you may at some point have big integers to sum, so any solution is inherently flawed, too

Re: Zig: software should be perfect [video]

#15

Earlier quoted context omitted.

It's not neurosis if it has a useful purpose.

Is it useful if it makes no difference to the user?

Maybe it will make a big difference once the software is way into its useful life, and it needs to be maintained and evolved.

Re: Zig: software should be perfect [video]

#17
post #8

Earlier quoted context omitted.

Come on, a title like that isn’t meant to be taken too seriously. And you’re reaching a bit far. You can write a perfect function that adds two 32 bit integers. There is a subset of code that can be written perfectly. Especially if you don’t need Turing completeness to write it. Zig just tries it’s best to make it easy to write as much as possible of low level code in a perfect way.

> You can write a perfect function that adds two 32 bit integers. how ? the problem of adding two 32 bits integers is itself imperfect since you may at some point have big integers to sum, so any solution is inherently flawed, too

Simple, operate in the appropriate mathematical ring. Just because there is overflow doesn't mean it failed.

Re: Zig: software should be perfect [video]

#18
post #5

Earlier quoted context omitted.

If you look at the video, you'll see that "Software Should Be Perfect" is the title slide of the talk (you don't even have to click play, it's there at the start). And then the first words out of the speaker's mouth (other than a sound check) are "I'm going to try to convince all you that software should be perfect". The "original title" you're referring to is what the person who uploaded the talk to youtube titled t…

Questioning if someone read the article or, in this case, watched the video is against the Hacker News guidelines. If you feel a commenter is not fully engaged with the topic you should decline to continue the thread.

Meta-discussion is also against the guidelines. Being a rules lawyer is bad enough; don't be a rules hypocrite.

P.S. Yes, I know I'm also engaged in meta-discussion now. I can afford it.

Re: Zig: software should be perfect [video]

#19
There's a certain irony that the presenter quickly dismisses exception-based error handling, and then the first example handles an error by printing a message and exiting -- exactly what an unhandled exception does.

This is more than a small piece of irony with a somewhat artificial example. Often, there simply isn't very much you can do with an error. In a SaaS world, you might not be able to tell the user what wrong, in order to not disclose some private information. You can log the error, but only if the network is available, and you can only log it to disk if the disk isn't full.

And then there are cases where you could try to explain the error to the user, but the reasons are very complicated and/or require intimate knowledge of the architecture to make sense, and/or require intimate subject knowledge to understand, or even obscure legal reasons.

Post reply on HN