4 ms·
Programming is an exercise in manipulating semantic objects which is why stuff like blueprints in unreal engine are so easy to use. It will just get better and
by unixbane 4y ago
Programming is an exercise in manipulating semantic objects which is why stuff like blueprints in unreal engine are so easy to use. It will just get better and text will become an obsolete vestige, regardless of whatever idea you have of this being "harmful". I really don't think a character encoding with 30 ways to control the terminal (and now extended to encode emojis) is the be all end all way of writing and editing programs.
Consider that if text had an advantage, it would be that you could cut some string in half as some sort of manipulation that saves time. What do I cut in half? Change >= to = ? There's basically no advantage of text. I don't want half of an if statement, that's what text allows me to do, it's a pointless feature that makes inputting programs harder. The basic element on the screen should be the if statement itself.
There is no advantage to a 1D language. Text is a 1D language. If you have
if (x) {
if (y) {
}
}
You are just reading it as a 2D language, but it's not. It could be
if (x) {
if (y) {
}}
}
and mean something else. (Yes I'm sure you can catch this one, but not all in general). The only way to be sure is read it from start until end, which nobody does. This is a security issue too, which I discovered when I was 12 years old reading perl scripts from milworm. By formatting text you are already conceding that 2D is better.
- thrown_22 4y agoSo what happens when you have a 10 deep nested if tree? Your answer would be to not do it because it doesn't fit nicely in a 2d page. My answer would be to put it in a 1d line and not bake semantics into presentation. But you can't pretend that the space of programs isn't infinite dimensional when the space we work in is only 3d. Regardless of how clever you are using a medium with a dimensionality higher than 1 for semantics will always result in expressions you can't express. This is why we've stuck with text. It's 1d, but we can make it 2d to help understand what is going on visually in the simple cases humans can understand intuitively. Yet it is complex enough to represent any possible object.
- unixbane 4y agoJust switch back and forth between box representation and graph. It's still far better than text. Text fails far faster. Have you ever used IDA? It shows a graph view of assembly based on jump flow instead of a linear assembly listing. Of course you can't magically understand all programs just with a simple algorithm to format them a certain way, but it's still immediately obvious that this is better. Most code is immediately understandable just using a C#/Java decompiler or gofmt without the programmer needing to format it. I just see variable names and formatting as spam and red herrings. Anyway you can't audit code by taking the programmer's word that he formatted it a certain way, so this whole "text for writing a poem of comprehension" idea is moot and outdated at least 30 years ago anyway.
- preseinger 4y agoSemantic objects are non-dimensional. In fact they are probably best understood as simply ideas. Humans have been effectively incepting ideas in each other since the birth of language and writing. Text is, demonstrably, the best way to convey semantic ideas among human beings.
- unixbane 4y agoWoah there, it appears as if you are implying that text is demonstrably the best way to convey computer programs. Surely that's not what you're saying?
- preseinger 4y agoIt's certainly proven true so far?
- barrysteve 4y agoUE blueprints fail spectacularly when you try to do a simple for loop processing some input data. Editing all the vertices on a procedural mesh kicks you back to C++ almost immediately. Blueprints (army of interconnected squids) works best on parallel code like GPU shaders. For general branching logic, it becomes a nightmare quickly. Image blocks, code icons or blueprints do save you from syntax errors and highlight relationships between code blocks, but they crush customizability and lose the ability to absorb and abstract complexity.