News for hackers. Stuff that matters.
Re:Writing a register based VM in less than 125 lines of C code by ativzzz on Thursday December 09, 2021 @03:23PM (#29502444)
When you're optimizing for a metric like lines of code written, then abbreviations make sense. If you're optimizing for readability you could do something like (I'm not a C programmer so IDK if this is syntactically correct C):

` memory_write(

  processor.register[0],

  memory_read(

    memory_read(processor.register[1])

  )
) `

To me, multiline statements are much more readable than single line nested statements regardless of abbreviations used.

Re:Writing a register based VM in less than 125 lines of C code by johnisgood on Thursday December 09, 2021 @06:42PM (#29504692)
I do this sometimes when the line gets too long due to long names. I do not like it.