「C言語でプログラミングする際の覚書」の誤訳箇所


C

C




What follows is ...
 


×
 



 

"What follows" 




But they've been accumulating in my head, if not on paper until now, for a long time, ...
 


×
 



 

"if not on paper until now" "in my head" "for a long time"  "they've been accumulating in my head" 




I've yet to see a good essay on how to plan the whole thing,
 


×
 



 

"yet to" 




a clear program is not made any clearer by such presentation
 


×
 



 

"not made any clearer" 




... is more to type (or calls upon your text editor)
 


×
 



 

"call (up)on" 




if you consistently use a naming convention from which np means ``node pointer'' is easily derived
 


×np "node pointer" 使
 


np  "node pointer" 使
 

"from which"  "which"  "naming convention" 




As in all other aspects of readable programming, consistency is important in naming. 



×
 



 

 "As in all other aspects" 




I prefer minimum-length but maximum-information names
 


×
 



 






They jangle like bad typography.
 


×
 



 

 "typography" 




Pointers are sharp tools
 


×
 



 

使




If we want the next element's type
 


×
 


 type 
 

 type 




less effort is expended by the compiler and computer
 


×
 



 

"expend" "expand"




which allows some helpful compile-time error checking that array indices cannot share
 


×
 


便
 

"array indices cannot share"  "share" 




As a rule
 


×
 



 






expressions that evaluate to elements of a data structure
 


×
 



 

 "evaluate to" 




Consider what ... would look like using a compound expression for p
 


×p 使
 


p使
 

pnode[i] 使




Sometimes it's worth a temporary variable (here p) or a macro to distill the calculation. 



×p使使
 


p使
 






Procedure names should reflect what they do; function names should reflect what they return.
 


×
 



 






A delicate matter, requiring taste and judgement.
 


×
 



 






a symbol table might be implemented ...
 


×
 



 

"might" 




Algorithms, or details of algorithms, can often be encoded compactly, efficiently and expressively as data rather than, say, as lots of if statements.
 


×if
 


if
 






A classic example of this is parsing tables, which encode the grammar of a programming language in a form interpretable by a fixed, fairly simple piece of code.
 


×
 



 

"parsing tables" -"interpretable" 




Finite state machines are particularly amenable to this form of attack
 


×
 


使
 

"amenable" 使




can be constructed profitably as a data-driven algorithm
 


×
 



 

"profitably" 




One of the reasons data-driven programs are not common, at least among beginners, is the tyranny of Pascal.
 


×Pascal
 


Pascal
 

"at least among beginners" 




This flies in the face of the theories of Turing and von Neumann
 


×
 



 

"fly in the face of" 調




I cannot recommend an implementation style more highly
 


×
 



 

"highly recommend" "recommend ... more highly" 




Maybe that's it:
 


×
 



 

 ":" 




by construction
 


×
 



 






but it's usually done wrong in practice
 


×
 



 

"in practice" "done wrong"