3 ms·
I think that programming is the most confused discipline there is. I've mentioned this in previous posts. In any other field there is usually an established bod
by blippage 5y ago
I think that programming is the most confused discipline there is. I've mentioned this in previous posts. In any other field there is usually an established body of knowledge, either in science of professions like accountancy.
In programming we're still arguing about whether the debits should go on the left and credits on the right, or vice versa. By that I mean, facetiously, we're still arguing about what programming language to use.
Most new sciences - e.g. electronics - gather a mature body of knowledge relatively quickly. We know exactly how transistors work and how to use them, for example. Nobody argues about how to calculate the current flowing through a wire.
This, to some extent, happened in programming, especially early, but the matter still seems far from settled.
Some poster on here once noted that there are no new paradigms in programming. Their argument is that not functional, OO, or other invention, as good as they are, constitute a paradigm shift. A paradigm shift is so fundamental that it uproots our whole conceptions about how the universe works; like the shift away from using epicycles to describe the motion of planets to using a theory of gravitation.
I've been tinkering around with microcontrollers lately, and it has given me a perspective that I suspect many don't have. I like C++, and I think it's suitable for high-level programming, due to things like deterministic garbage collection and niceties like strings and vectors.
But I've come to the conclusion that C++ is marginal, at best, on microcontrollers. Things tend to be far more static, so these niceties do not bulk large. But C++ also needs extra fiddle if you start from scratch. Things like exceptions need effort to implement.
C is low-level. You get to build things block by block. If your microcontroller supports some nifty hardware acceleration feature, then you can use that.
And that's the thing. A high-level language is an abstraction. It can't decide what should happen at a very low level. So you have a convenience, but you also take a hit.
So perhaps looking for a better language is a chimera, because how you do something is dependent on what it is you're trying to do. It also means that C is never likely to go away as a language, and that C++ was a clever idea in that it built on C.
- hnfong 5y ago> Most new sciences - e.g. electronics - gather a mature body of knowledge relatively quickly. We know exactly how transistors work and how to use them, for example. Nobody argues about how to calculate the current flowing through a wire. Ever since we made computers fast enough to implement basic things in the 1980/1990s, the debate has never been a "scientific" one. It's all about programmer preference and psychology. Equations about electricity is relatively simple. Yet we don't have equations about programmer brains. The only way we can "scientifically" experiment with programming languages is to invent new languages/features and see how programmers react. Do they make fewer mistakes? Do they see increased productivity? Do they "like" it or even swear by it? To a very large extent (more-so than most would imagine), trying to pin down "programming best practices" is like trying to set a standard for writing novels. You have common tropes and literary devices (aka "design patterns"), but the expressiveness of languages (both human and computer) makes it hard to make final, scientific conclusions. The electricity on a wire thing is really much more simpler.