Flowcharts of programming language constructs
progsbase.com
Flowcharts of programming language constructs
1–10 of 88 posts
Re: Flowcharts of programming language constructs
#2Re: Flowcharts of programming language constructs
#3(1) Makes it pretty clear why exceptions are even more of a control-flow nightmare than goto. What a messy graph.
(2) The 'defer' diagram is a big WTF. Couldn't even figure out which box is supposed to represent which statement in the example.
(3) I'd love to see a graph of the control flow when you throw in a few spurious lambdas like "advanced" C++ programmers tend to do (and similar in a few other languages). Might even make exceptions look good.
Re: Flowcharts of programming language constructs
#4A brilliant explanation of why no-one uses flowcharts.
Re: Flowcharts of programming language constructs
#5A brilliant explanation of why no-one uses flowcharts.
Re: Flowcharts of programming language constructs
#6Pretty neat. Three things that occurred to me while reading it. (1) Makes it pretty clear why exceptions are even more of a control-flow nightmare than goto. What a messy graph. (2) The 'defer' diagram is a big WTF. Couldn't even figure out which box is supposed to represent which statement in the example. (3) I'd love to see a graph of the control flow when you throw in a few spurious lambdas like "advanced" C++ pro…
Re: Flowcharts of programming language constructs
#7Pretty neat. Three things that occurred to me while reading it. (1) Makes it pretty clear why exceptions are even more of a control-flow nightmare than goto. What a messy graph. (2) The 'defer' diagram is a big WTF. Couldn't even figure out which box is supposed to represent which statement in the example. (3) I'd love to see a graph of the control flow when you throw in a few spurious lambdas like "advanced" C++ pro…
Exception is a nightmare only if you use it as a general purpose control flow mechanism.
Re: Flowcharts of programming language constructs
#8A brilliant explanation of why no-one uses flowcharts.
...because if they did, they might realize that some of their favorite structures are a hot mess. Seeing things in a new way often leads to learning, which a good developer would welcome. Personally I can't remember the last time I used an actual flowchart, but I do use state machines. Sometimes I'll go through an exercise of re-casting complex logic as a state machine. Often, that leads to a realization that making…
Normal brain: Find the representation that best expresses the structure to discover the hidden simplicity in everything.
Galaxy brain: Use flowcharts to draw out how exceptions work, forget your previous understanding, and then realize that they are too complicated for anyone to use.
Re: Flowcharts of programming language constructs
#9A brilliant explanation of why no-one uses flowcharts.
...because if they did, they might realize that some of their favorite structures are a hot mess. Seeing things in a new way often leads to learning, which a good developer would welcome. Personally I can't remember the last time I used an actual flowchart, but I do use state machines. Sometimes I'll go through an exercise of re-casting complex logic as a state machine. Often, that leads to a realization that making…
Re: Flowcharts of programming language constructs
#10The following could be added to C-style languages without overlapping with the existing syntax:
select(a) {
when 1,2,3 {...}
when 4 {...}
when 5,6 {...}
...
otherwise {...}
}
C# recently added a pattern-matching alternative, but it's still a bit verbose for most needs.