Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

char buf[LINE_MAX]

Name: Anonymous 2008-08-26 6:39

Why do programmers still code in arbitrary limits like these?

It breaks when you do
#define LINE_MAX UINT_MAX

Why not redesign so that you use an O(1) space algorithm, or if it can't be avoided, dynamically allocate as much as needed?

Name: Anonymous 2008-08-26 16:34

>>23
Yes, and after you profile your Python code wondering why the shit it's so fucking slow, you end up rewriting and embedding parts of it in C, you make all your limits exactly what you think is necessary to hold the data it'll contain, and then a month later you post to /prog/ whining about not being able to track down your
Segmentation fault (core dumped)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List