Live data from Hacker News

Edsger Dijkstra carried computer science on his shoulders (2020)

inference-review.com

61–70 of 229 posts

Re: Edsger Dijkstra carried computer science on his shoulders (2020)

#61
post #15
post #5

Earlier quoted context omitted.

The whole structured programming practically birthed the industry, so it’s hard to say he has less direct impact in the industry though.

It was controversial at the time. Dijkstra advocated "single entry, single exit" for each control block. Programs should be composed of such blocks. Makes for very neat flowcharts. Good for entry and exit conditions. Single entry wasn't that controversial. Single exit, though, means no "break", or "continue" for loops, and no early returns from functions. This forces a rather convoluted style. Try writing a loop of t…

I had always heard that the "single exit" focus on "break" and "continue" was a misunderstanding. When wild GOTOs roamed the earth, with was common for a subroutine to end by jumping to a new part of the code, with the jump location being different depending on conditionals within the code. The "single exit" commandment was that a subroutine should always exit back into the routine that had called it. That makes it less an injunction against a function having early returns and more a rejection of continuation passing style.

Re: Edsger Dijkstra carried computer science on his shoulders (2020)

#62
post #16

Dijkstra is a wonderful source of memorable quotes and hot takes from the early days of software. A sampling: > “The competent programmer is fully aware of the limited size of his own skull. He therefore approaches his task with full humility, and avoids clever tricks like the plague.” (Dijkstra, 1972) > “The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense.” (Dijkstra…

I didn't know the last one. That explains why Alan Kay spent a few minutes of one of his OOPSLA talks roasting Dijkstra[0] "I don't know how many of you have ever met Dijkstra, but you probably know that arrogance in computer science is measured in nano-Dijkstras" Which, I dunno, feels kind of funny coming from him of all people. https://youtu.be/oKg1hTOQXoY?t=342

See https://medium.com/@acidflask/this-guys-arrogance-takes-your...

Re: Edsger Dijkstra carried computer science on his shoulders (2020)

#64

I like Dijkstra's quote: "The question of whether machines can think is about as relevant as the question of whether submarines can swim."

Maybe I'm stupid, but does he mean that as long as the task at hand is solved it doesn't matter how we categorize it. In the submarine case it would be "move through water", for example. Or is it deeper than that?

Yes. He was interested in problem-solving, not philosophizing. The debates about AI going on right now are the kind he’d prefer to avoid.

Re: Edsger Dijkstra carried computer science on his shoulders (2020)

#65

Earlier quoted context omitted.

whats wrong with object oriented programming?

Most real world problems don’t fit into neatly into hierarchical structures. OOP pushes you towards trying to model everything in the world an objects with strictly defined operations that can be performed on, where those actions are determined by the data type itself. You end up being forced to co-mingle your data structure design, with your data processing design. Which tends to be rather unhelpful. Keeping your da…

In OOP you can have data structures and algorithms separated. You can use composition over inheritance without issues.

The fact that a language is strong typed and you get compilation errors if you forgot something is a big plus.

OOP is fundamentally about no static variables.

Re: Edsger Dijkstra carried computer science on his shoulders (2020)

#66

Earlier quoted context omitted.

> Single exit, though, means no "break", or "continue" for loops, and no early returns from functions. Sounds like pretty standard functional programming a la Standard ML or Haskell, or am I missing something?

> a rather convoluted style It may be standard for them, but it's why functional languages are niche while C, C++, C#, Java, JavaScript and Python dominate.

Rust is a quite functional language, C# has been incorporating (aka stealing from F# :)) functional features for years starting with LINQ and ending with advanced forms like pattern matching on sequences (list patterns).

I believe all kinds of Python frameworks too like to incorporate FP into their APIs, and of course, there are list comprehensions.

Re: Edsger Dijkstra carried computer science on his shoulders (2020)

#67

I like Dijkstra's quote: "The question of whether machines can think is about as relevant as the question of whether submarines can swim."

Maybe I'm stupid, but does he mean that as long as the task at hand is solved it doesn't matter how we categorize it. In the submarine case it would be "move through water", for example. Or is it deeper than that?

I think it is about the relevance of anthropomorphizing machines, submarines don't swim.

Re: Edsger Dijkstra carried computer science on his shoulders (2020)

#68

Earlier quoted context omitted.

Smartphones were not even a thing during his lifetime.

OP does say mobile phone. But you're wrong according to Wikipedia.. some 5-10 years of overlap depending on what qualifies as smart

OP said smartphone tho

Re: Edsger Dijkstra carried computer science on his shoulders (2020)

#69
post #16

Dijkstra is a wonderful source of memorable quotes and hot takes from the early days of software. A sampling: > “The competent programmer is fully aware of the limited size of his own skull. He therefore approaches his task with full humility, and avoids clever tricks like the plague.” (Dijkstra, 1972) > “The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense.” (Dijkstra…

whats wrong with object oriented programming?

If you want to write a script, OOP "kind of" nudges you towards making multiple data structures and "function" classes instead of having a simple 100 line function.

And it is the wrong choice, if you need a script and can make that function in python.

OOP, particularly Java, is good when you have a lot of functionality, especially if you can use already existing massive ecosystem.

If I would have to write something from scratch, I would not use OOP, but if you need something fairly complicated, chance is there is already a generic solution available, and you need to costomize it, where Java is pretty good.

Re: Edsger Dijkstra carried computer science on his shoulders (2020)

#70

Earlier quoted context omitted.

Why? Seems completely correct and good. You either have an empty range be -1 .. 0, which is ugly, or 0 .. -1, which is also ugly. Thus, start-inclusive, end-exclusive.

"That is ugly" is what separates math (1-indexing in Fortran, R, SAS, SPSS, Matlab, Mathematica, Julia) from the apes This and column-major order for matrices (a vector is a column, not a row)

I'm not seeing the superior ironcladness in this statement. I must be an ape.
Post reply on HN