Re: If this is just an exercise, perhaps a smaller one would do
Re: If this is just an exercise, perhaps a smaller one would do
Posted Dec 30, 2014 21:00 UTC (Tue) by ldo (guest, #40946)In reply to: The Story So Far... by itvirta
Parent article: The "too small to fail" memory-allocation rule
It is the complex cases that demonstrate the scalability of my technique over GOTOs. This is evidenced by the fact that no one can come up with an equivalent using GOTOs that is even correct.
Posted Dec 30, 2014 22:56 UTC (Tue)
by cesarb (subscriber, #6266)
[Link] (3 responses)
Absence of evidence is not evidence of absence.
You posted a large block of source code, without any testcases, written in an unorthodox coding style. To do a decent rewrite, first one would have to understand the code, which is made harder by the uncommon code style and by the fact that it's a mathematical algorithm; experienced programmers tend to "pattern match" the source code visually to skip unimportant details, but this can only happen if one is familiar with the coding style. Then one would have to carefully reformat each function, converting the do-nothing loops into straight code without breaking the do-something loops; this is made harder because the same keyword (break) is being used to exit both. Finally, one would have to refactor the code into a more traditional style, being very careful to not break anything (since there are no testcases).
That's a lot of work for something which would be used solely to score a rhetorical point and then thrown away; the maintainer of the code (you) would not accept the changed code, since you're being so dogmatic about your coding style.
It could be worth doing the exercise if there was any chance that it would not be a wasted effort. Since there isn't, there are better uses for our time, and that's probably why nobody's bothering.
Posted Dec 31, 2014 21:01 UTC (Wed)
by ldo (guest, #40946)
[Link] (2 responses)
Posted Dec 31, 2014 22:25 UTC (Wed)
by bronson (subscriber, #4806)
[Link] (1 responses)
Posted Jan 1, 2015 21:46 UTC (Thu)
by ldo (guest, #40946)
[Link]
Re: If this is just an exercise, perhaps a smaller one would do
*Yawn* More content-free hand-waving hot air. Show us the code!
Re: Absence of evidence is not evidence of absence.
Re: Absence of evidence is not evidence of absence.
Because they’re just not that interesting.
Re: why don't you rewrite the goto-laden kernel examples cesarb posted?