3 ms·
problems should be solved by describing a linear sequence of steps (as opposed to logic/declarative programming) Linear sequences of steps processing data arra
by neumann_alfred 14y ago
problems should be solved by describing a linear sequence of steps (as opposed to logic/declarative programming)
Linear sequences of steps processing data arrayed in some linear fashion or others is what computers do. It is certainly what a single core does.
So you would rather have someone else write a C program for you that abstracts it away and calls it a new way to program? That's k, just know that you'll still have those pesky linear steps under the hood. You know, at some point the neat source you write actually has to get converted into stuff CPU can make the slightest bit of sense out of.
Of course it's nice to try to "get the computer think like the programmer instead of the other way around" (kind of the motivation for the inventor of the compiler IIRC, in times when people really had to "speak binary" to the computer), but it also kinda sucks when people completely loose track of the machine they're programming, and think their abstraction layers du jour grow on trees or something.
a variable can have different values at different times in the execution of a program (in contrast to standard mathematical conventions)
Your problem is nomenclature? Why not simply declare constant variables where you need them and move on? And are you really trying to twist C giving you the choice into "forcing preconceived notions" on programmers? That is hilarious, I will give you that much.
a function can return different results when called multiple times with the same arguments (again, in contrast to the standard mathematical meaning of the term)
"Function" can also mean a lot of people coming together for a wedding or something. I think that's why you would call them "C function" if you wanted to be precise.
there is random access storage of information (with constant time access and update)
Again, that's just how "the world" works. But C hardly came up with that, which is why all languages have it.. yes, all of them. Some abstract it away from you, sure, but they still have it. So you pay overhead and control "tax" in return for convenience and and expressiveness; that's not a bad thing per se, often it's the sane and productive choice, but to me dissing C is just shitting where you eat. The only reasons I can imagine for it are jealousy or ignorance.
- kscaldef 14y ago> Linear sequences of steps processing data arrayed in some linear fashion or others is what computers do No, it's what some computers do. It's almost certainly not what the computer you are using currently does. It's quite possible it's not what any computer you've ever used does. > So you would rather ... I'm not expressing a preference. If you think I was, you've misunderstood my comment. I'm making observations, not judgements. I'm not anti-C, it's a fine language for many things; however I do think that the articles author is not being as even-handed as he claims when it comes to some of the short-comings of C. > Your problem is nomenclature? Again, I'm not making a judgement. C exists in a paradigm where writing x = 3 x = 4 makes sense. In other paradigms it would be logically inconsistent. >>there is random access storage of information (with constant time access and update) >Again, that's just how "the world" works. That's absolutely not how "the world" works. Again, you've probably never even used a computer where it was true. > dissing C is just shitting where you eat. The only reasons I can imagine for it are jealousy or ignorance. I don't think I've made any statement anywhere in this discussion that's "dissing C".
- neumann_alfred 14y agoHow does this computer right here not consist of a whole lof of linear sequenceS?(notice the plural btw? and the fact that "linear" does say nothing about "serial" vs "parallel", either?) How is data not arrayed linearly? Please elaborate, "because I said so" is not enough.