There's no denying that for the foreseeable future, I agree.. Although I was not trying to compare C with Javascript. I think each has become more or less a domain specific language: C for systems programming (although C++ is just as good there) and Javascript for the browser.
I thought C's greatest advantage and why it is great is because it provides a nice abstraction over the assembly languages of different physical machines -- which are pretty similiar, after all, and this is what allows the abstraction to work.. I have heard that Javascript offers abstraction over different browsers.
Last edited by MacNilly; 07-08-2016 at 01:25 AM.
What does that even mean, modeling the current hardware? I understand you always take extreme sides on all things in life, a behavior you may learn to control when you decide one day to actually learn anything about programming. But at least when you take your usual extreme bias and force it down our throats, do it with something that is actually thought provoking and worth of a debate, and not another bash-on-Elysia post. You make an easy target with your bs nonsense, but it gets tiring over the years. At least surprise us with something worth our time.
On point, standard C++ is obviously not even close to model hardware. As an higher level language you shouldn't even put it in those terms. It's an abstraction, a high level abstraction, and it stays clear from the hardware systems it depends and operates on as best as it can. It's for this reason that standard C++ memory management is NOT even close to being a model of the kernel memory management, or why accessing the various hardware resources is made as transparent to the developer as it can be made in the context and semantics of the language. For that matter standard C is slightly lower level, closer to the machine if you will, because it lacks many of the semantics and language constructs that allow C++ to increase its high abstraction level; contradicting your assumption that standard C is too simple. Obviously C is a more complex language from the point of view of the developer for the reasons mentioned above. And it is for this reason among others C remains a valuable language, especially in the development of the lower layers of the operating system and many of the top layer utilities too.
And thank goodness C++ is what it is. Because you, of all people, wouldn't want a language that was nothing more than a C clone. You'd be out of any idiotic bs to shout when carrying your flag and everyone else would be left with a language they had no use for.
Last edited by Mario F.; 07-08-2016 at 06:02 AM.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
That was a stab on "C modelling the current hardware".
You don't need to read them. This is not a forum where I have present homework, facts or research. I have no obligation to help or satisfy anyone or make any effort to do so. Don't expect that of me.
I don't know exactly what you mean by "standard C++." True, in today's world, we want to stray away from the hardware with higher-level abstractions as possible, and that sometimes just doesn't work in places like kernels. But that doesn't take away the fact that C++ can be just a better C. Replace malloc with new, use RAII, don't use exceptions, replace macros with templates and you've pretty much got just a better C. And just as close to the metal as C is. C++ was not designed to be a new Java or C#. It was designed to be close to the metal while offering high-level abstractions. And that is why it's more practical then C, because it offers more tools in the toolbox. Therefore, when you can use C++ over C, you should opt to do so. That is my opinion, and that is why I made a stab at that post.
This is not a forum either in which you are forced to say something stupid. Talk is cheap, and free. But you don't need to say anything. And many people will thank you when you shut up if you don't care for such things as facts or research, just because you can't stand to be quiet when in your whole ignorance you think you spotted another opportunity to bash at a programming language other than C++.
Learn to develop software and then you can talk all you want.
Last edited by Mario F.; 07-08-2016 at 09:39 AM.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
O_oFor that matter standard C is slightly lower level, closer to the machine if you will, because it lacks many of the semantics and language constructs that allow C++ to increase its high abstraction level; contradicting your assumption that standard C is too simple.
I honestly can't figure out what you are on about.
You are free to agree or disagree with Elysia at your leisure, but I think you have simply misinterpreted the statement.
I think the point is that C is "too simple" because it lacks the mechanisms, the "language constructs", which are required for a "practical" language.
*shrug*
I don't agree with "too simple" or "practical", but I certainly wouldn't use C for anything unless I absolutely had to use the C language.
I'm fully aware that plenty of people have said the same thing about the C++ language, but I'm not going to give up on strong generics and RAII for the opinions of other people.
o_OObviously C is a more complex language from the point of view of the developer for the reasons mentioned above. And it is for this reason among others C remains a valuable language, especially in the development of the lower layers of the operating system and many of the top layer utilities too.
The C language remains valuable because of complexity in regarding the lack of mechanisms which can express greater abstractions?
Soma
“Salem Was Wrong!” -- Pedant Necromancer
“Four isn't random!” -- Gibbering Mouther
I am not you. I can't "learn" to become your "learn to develop software." I don't know what you consider "learn to develop software." I can't live up to your standards, because I don't know where your standards are or where I am going wrong with my own standards compared to yours.
I don't butt in in conversations I don't think I have nothing to say. You have lots to say about Brexit. I have not, so I don't comment on that. But I DID feel like I could say something about a specific reply that, to me, didn't seem like something I just made up. Because within my experience, it seemed like an informed reply.
Didn't ever considered it that way. And still don't. The quote was "I reserve C++ as the best practical language that models the current hardware. C is just too simple to meet modern needs."
To me the second sentence is meant as a continuation of the first. Why else would it be there without explaining it further?
Anyways,
Yes, because those abstractions come with a price in the footprint they leave behind.
C is arguably a more complex language because it doesn't share the abstractions C++ introduced to simplify the task of programming. But this is comparable complexity. C is just generally more complex than C++ if both languages are to code the same system. But the different footprint both languages will leave behind can have a significant impact on the decision to choose one or the other. And those decisions have been made many times before. And will keep being made.
Everything usually comes with a price. And abstractions meant to facilitate programming models can only go so far before they start imposing a penalty on the machine resources. It's fine that you wouldn't think using C unless you have no other option. Sometimes you will have no other option. And that's when you find the space the C programming language still has in the programming world.
I did come too rough. I apologize. But frankly I am tired of hearing the opinion of someone who always has strong opinions on things that he doesn't plan to learn about or use in any kind of capacity that would actually empower him with such opinions. That's what maddens me about you and your opinions. By learning to develop, I mean learn to *actually* develop, by programming in more than one programming language and using them on a regular basis for long enough to actually be able to construct your opinions on them. It's no wonder that your opinions on things like C or Linux are always so devoid of clear and precise arguments. It's because you just can't have well formulated opinions on things you never cared to use or learn about, but still insist on never letting go a chance to bring your uninformed bias about.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
I think MacNilly means rather that C is close to the hardware in the sense that you could insert assembly code or understand what the assembly would look like from C code. Elysia was just being contrarian. He might be right in a sense because many C++ compilers let you embed assembly, if you have something beautiful to run.
If he can look at a C++ program and see assembler intuitively, bravo to him, but I think it's a lie. I doubt Elysia of all people would find that useful even if he understood assembly in detail.
If that's not what you guys meant then I'm sorry, you lost me.
O_oTo me the second sentence is meant as a continuation of the first.
Indeed.
"I reserve a special place for C++ as the most practical language because C is just too simple for modern needs."
*shrug*
Whatever.
Are you sure you'd like to make that claim?C is arguably a more complex language because it doesn't share the abstractions C++ introduced to simplify the task of programming.
I've seen you rant at least a few times of the, let's say, impenetrable nature of C++ generics as expressed with templates.
I admit that proper macro magic isn't exactly simple, but my deepest code makes people mad... as in looking upon the face of Cthulhu.
My point is that, unless you are simply using existing code, a project may indeed use all mechanisms offered by the C++ language.
Of course, proper macro magic is as simple to use as proper generics so complexity remains hidden if you are talking of only using existing code.
Certainly.Everything usually comes with a price.
For me, the situation you are referencing is literally either "someone has paid me" and "an important project uses only the C language". I think that C has value because of the innumerable important projects which use the C language, and I think that C has value because a lot of brilliant minds think C has value thus continue to use the C language for new projects. In other words, I don't think C has any value because of a lack of mechanisms useful for expressing abstractions or any nearness of the metal.And that's when you find the space the C programming language still has in the programming world.
Soma
“Salem Was Wrong!” -- Pedant Necromancer
“Four isn't random!” -- Gibbering Mouther
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
You have a point, Mario. I will agree that I usually ward off technologies and languages due to personal bias because of what I hear, see or read. Other things I do have experience with. Sometimes not a lot. Sometimes a little more. I've done javascript (because I wanted to make a "web page"), and found it very lacking. I've used C (for a required college project), and found it very lacking. I've used C#, and at first I thought it was cool, but now I find it lacking. I'm sorry if my opinions come off as unbiased or made up. I usually try to avoid getting into debates for things I know little about or am biased about. But sometimes I don't always succeed, and even in topics where I have experience, I may come off in an unintended way.
I took a stab in my reply above because I find C to be a lacking language. Both C and C++ are close to the metal, and while some may consider using C++ to mean high-level, as far away from the metal as possible, C++ is also meant to be close to the metal. By limiting the subset of C++ so you, you can absolutely make C++ work with embedded systems, kernels, etc. And you still have far more practical tools in your toolbox. So that's why I said more practical.
You aren't too far off because I did misread McNilly reply. Had I not done so, I would have jumped first on what he said.
Of course I am sure! Both languages don't share the same characteristics across their entire standard. And C++ loses it right around the moment one starts delving into meta programming. But to be fair, what language doesn't? You give the example of C macros, and just recently I was studying Python metaclasses and by the end of it, after having written just a couple of those to handle configuration scripts of a new linux distro we are trying to build, I was laughing at how all the expressiveness of the Python language had been thrown out the window.
Oh, but I'm doubtful. Not of what you think, mind you. But on how correct you are. I just don't think that certain implementations are possible in C++.
You have also heard me, not so long ago, mention to someone else that C++ coders have been happily creating kernels and all sorts of other low level systems, when I was trying to defend C++ against some nut job here in the forums who was claiming... whatever it was that I don't recall anymore. But while that is no doubt true, you will always find that C delivers much better than C++ in certain conditions.
I don't doubt for a moment that a good portion of C code exists only because of its coders, and not because of an actual need for the language features. But that's true of C++ as well. In the end however there are situations in which (good) C++ code will provide the best solution to some computing problem. And the same is true of C, even if you want to believe in Stroustrup's 'C++ is a better C'.
Perhaps. The net effect is that C code is more complex. Which is the point I'm trying to put across.
But you don't get a more practical language. That practically is in the eye of the beholder. By restricting yourself to all but the basest of the C++ standard library functions and objects, what practical features are left are simply due to your own knowledge of the language. A seasoned C programmer can find as many practical aspects in the core C language as you can in core C++. It all amounts to how well you two deal with the language semantics and its rules. But even admitting some aspects of the core C++ language are better designed (I'm thinking for instance, const-correctness, or user-defined static type system, or namespaces) these aren't game changers in the scope of general programming.
And of course, once you can open the whole of your language and can make use of it, by all means, C stops making any sense. And its only the individual know-how of people that dictates whether one will use C or C++. But I'm not here to discuss that. I am here arguing against the explicit argument that C is a simpler language that cannot answer modern computing needs.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
O_oThe net effect is that C code is more complex. Which is the point I'm trying to put across.
I wanted to address the comment first because the argument is rather different than how I interpreted your earlier post.
I agree that the ultimate result of the lacking features in C, with comparison to most languages, makes common code more complex.
You'd only need to look so far as construction in C++ versus weak resources in C to appreciate such differences.
You'd find only a few languages where metaprogramming is part of the core design from the start.But to be fair, what language doesn't?
The facilities fail in consistency so hard in C, C++, Python, and Javascript because concerns for metaprogramming are or were afterthoughts.
In fact, metaprogramming in C++ was basically born of a party trick unrelated to anything intended in the actual standard.
For really expressive and clean metaprogramming constructs to exist, they must have been part of a language from the beginning.
You would also, arguably, want a language which isn't somehow built on the C or C++ languages.
If you've done things properly though, you should have a greater expressiveness to state your requirements which is a fine purchase.I was laughing at how all the expressiveness of the Python language had been thrown out the window.
o_OI just don't think that certain implementations are possible in C++.
The only condition where I would find that C delivers any better that C++ is for those environments which only have crap C++ compilers.But while that is no doubt true, you will always find that C delivers much better than C++ in certain conditions.
I know what I'm doing in both languages, but I am never without the want for my parametric polymorphisms... even to the point I'd probably drop C++ entirely were Python to gain proper support.
You've surely heard the "Bad Code Can Be Written In Any Language" axiom?And the same is true of C, even if you want to believe in Stroustrup's 'C++ is a better C'.
I assert that "Excellent Code Can Be Written In Any Language".
I'm not sure what excellent Java would look like so don't hold me to that, but the point is that you are talking about domain compatible languages.
If you were discussing C or C++ versus some domain language, I'd certainly agree.
Unlike Javascript or Python, to some degree, the C and C++ languages share too much of the same surface for me to agree with you.
Soma
“Salem Was Wrong!” -- Pedant Necromancer
“Four isn't random!” -- Gibbering Mouther