3 ms·
Just how I program after 10 years of practice. Tables and procedures mostly :-). No considerable developments in programming languages needed as far as I'm conc
by jstimpfle 9y ago
Just how I program after 10 years of practice. Tables and procedures mostly :-). No considerable developments in programming languages needed as far as I'm concerned.
- akvadrako 9y agoHow about a language that lets you put your procedures in tables? I often wish for a more rich way to layout a complex 2-level decision tree. Dividing it up into sub-functions/classes scatters the logic, while putting it all together is too heavy. However a 2D decision table would often be perfect.
- LeonB 9y agoI remember reading someone’s proposal for 2D decision tables in code quite a while ago maybe 15 years. I’ve just tracked it down. Here’s something about it by the same author Roedy Green (author of How to Write Unmaintainable Code) http://mindprod.com/project/scid.html http://mindprod.com/project/scid.html (look for the words ‘decision table’)
- jstimpfle 9y agoAny language that lets you put anything in tables lets you put procedures in tables. Most languages do not offer reflection for their own syntactic elements (probably for good reason), however if you need that you might want to make your own language anyways...
- vram22 9y ago>How about a language that lets you put your procedures in tables? How about Python? It lets you put your procedures in tables - dispatch tables, that is: def eat(): print "eating"; def walk(): print "walking" t = {"eat": eat, "walk": walk} # now call the reqd. function via string s read from somewhere: keyboard, file, etc. ... t[s]() # error handling omitted Kidding apart: >Dividing it up into sub-functions/classes scatters the logic What is the issue with scattering the logic? if you break up your problem/solution into different logical units, with good judgement as to the points of breakup (i.e. coupling, cohesion, etc.), then what is the issue? Not clear.