News for hackers. Stuff that matters.
Re:Loop Exits and Structured Programming: Reopening the Deba... by Symmetry on Monday June 12, 2017 @05:11PM (#14541154)
At a hardware level all control flow is made up of gotos. But by writing them as 'for' or 'break' or 'if' in our programs we make them easier to read by letting the reader know that the jump is restricted in certain ways.
Re:Loop Exits and Structured Programming: Reopening the Deba... by woliveirajr on Tuesday June 13, 2017 @10:49AM (#14545129)
Yes, I know :) . Having learnt to program some microprocessors, I love how everything is evaluated in terms of jump-if-zero, jump-if-not-zero. Well, even some cracks to copy-protection from older games (dating myself here) was just a single change from a hex 74 to a hex 75 somewhere in the code.

And, sometimes, even in small programs, knowing where you are after some jumps is a messy thing.

I just don't have all that rant against jumps (or goto's). I know where they live, what they eat, when they are useful and when are not. :)

Re:Loop Exits and Structured Programming: Reopening the Deba... by nickpsecurity on Monday June 12, 2017 @11:40PM (#14542724)
Nah, hardware is more like dataflow or flow-based programming. Maybe functional programming, too. Goto is jumping to arbitrary, imperative code in RAM with an address and no regard for current state. There's possibly something in hardware like it but default stuff I saw in books were more like FSM model focused on data flows.
Re:Loop Exits and Structured Programming: Reopening the Deba... by Symmetry on Tuesday June 13, 2017 @01:56PM (#14546963)
You're right that I should have said "At the level of the software as understood by the hardware" or something instead.