News for hackers. Stuff that matters.
Re:Continuous Unix commit history from 1970 until today by ktpsns on Tuesday March 19, 2019 @09:03PM (#19437871)
Interestingly, this way of function definitions is "still" the way subroutines/functions are defined in (modern/all time) Fortran (if one ignores the syntactic differences). Also, at "old" C, declarations only may come at the beginning of a block -- just as it still is with Fortran. Out of curiosity, is there any reason for the similiarity?
Re:Continuous Unix commit history from 1970 until today by ethhics on Wednesday March 20, 2019 @10:12AM (#19442344)
At least for the declarations at the beginning of the block, that allows for very simple compiler design as it is very easy to split the code and data sections. Start off allocating space for all the variables it sees, and then when it reaches something not a declaration or definition, start emitting assembly.