3 ms·
For me, the nicest way to program is to use imperative code that executes from top to bottom and deals with elements one by one. With other approaches, I don't
by cousin_it 8y ago
For me, the nicest way to program is to use imperative code that executes from top to bottom and deals with elements one by one. With other approaches, I don't feel as comfortable growing the program incrementally, because they require large changes to the program when the problem statement changes slightly. James Hague said it well in "Puzzle Languages": https://prog21.dadgum.com/38.html https://prog21.dadgum.com/38.html
- avmich 8y agoA relevant quote from J for C Programmers: Writing code in a scalar language makes you rather like a general who gives orders to his troops by visiting each one and whispering in his ear. That touch-of-Harry kind of generalling can achieve victorious results, and it has the advantage that the orders can be tailored to the man, but its disadvantages are significant: the general spends much mental energy in formulating individual orders and much breath in communicating them individually; more significant, his limited attention is drawn toward individuals and away from the army as a whole. Even the great Rommel was overtaxed at times. The J programmer is, in contrast, a general who stands before his army and snaps out orders to the army as a whole. Every man receives the same order, but the order itself contains enough detail for the individual men to act appropriately. Such a general can command a corps as easily as a platoon, and always has the 'big picture' in mind.