News for hackers. Stuff that matters.
Re:Google Open-Sources Gumbo: C Library for Parsing HTML5 by eliasmacpherson on Wednesday August 14, 2013 @06:26AM (#6210721)
I like programming assert-heavy C. As soon as something is out of wack with my mental model the whole thing explodes. I sure as hell don't want to try handling things I don't already understand.
Re:Google Open-Sources Gumbo: C Library for Parsing HTML5 by foobarbazqux on Wednesday August 14, 2013 @09:46AM (#6211430)
You can use asserts in an exploratory fashion to document code you don't understand too.
Re:Google Open-Sources Gumbo: C Library for Parsing HTML5 by faddotio on Wednesday August 14, 2013 @01:31PM (#6212930)
Not so good for code that runs in servers, since you have no chance to drop requests or degrade gracefully.
Re:Google Open-Sources Gumbo: C Library for Parsing HTML5 by eliasmacpherson on Wednesday August 14, 2013 @01:49PM (#6213058)
If you hit it with enough examples of input as was done here, you can be fairly confident. But you're right, short of that, assert heavy code is going to cause headaches in servers. C is a nice and quick language to run tests on which makes it doable.