News for hackers. Stuff that matters.
Re:The paradigms of programming by kqr on Monday January 29, 2018 @03:01AM (#16256064)
It lacks coherence and overview and structure. I'm sure you'd agree that taking related "and thens" and wrapping them up in a procedure would be helpful. The next step after that is coming up with more informative relations than "and then".

A description like

"I went off the platform and then on the train and then I looked at the nearest seat and then I saw it was occupied and then I looked at the next seat and then I saw that was occupied too snd then I repeated that and then I saw an empty seat and then I walked toward it and then I sat down and then ..."

is begging for structure by wrapping up into procedures

"I boarded the train, and then I located the closest free seat, and then I sat down in it ..."

with the obvious definitions. That can in turn can be further improved to

"After boarding the train I sat down in the first free seat ..."

where the relations between the things are more useful than "and then".

Re:The paradigms of programming by Terr_ on Monday January 29, 2018 @06:23AM (#16256845)
That reminds me of some humorous optional dialogue in Psychonauts, where one of the characters is a stultifying raconteur.

https://youtu.be/-iZWAsRyQl4

Re:The paradigms of programming by jstimpfle on Monday January 29, 2018 @03:09AM (#16256096)
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.
Re:The paradigms of programming by akvadrako on Monday January 29, 2018 @04:54AM (#16256520)
How 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.

Re:The paradigms of programming by LeonB on Monday January 29, 2018 @05:39AM (#16256690)
I 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 (look for the words ‘decision table’)

Re:The paradigms of programming by jstimpfle on Monday January 29, 2018 @07:26AM (#16257058)
Any 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...
Re:The paradigms of programming by vram22 on Monday January 29, 2018 @06:45PM (#16261658)
>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.