Thread: What do we think about JavaScript?

  1. #31
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by MacNilly View Post
    I reserve a special place for C (and NOT C++) as the simplest language that models current hardware.
    By that logic JavaScript models the ecosystem available in a current web browser rather well.

  2. #32
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by MacNilly View Post
    ...I reserve a special place for C (and NOT C++) as the simplest language that models current hardware.
    I reserve C++ as the best practical language that models the current hardware. C is just too simple to meet modern needs.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #33
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Location
    CA, USA
    Posts
    466
    Quote Originally Posted by manasij7479 View Post
    By that logic JavaScript models the ecosystem available in a current web browser rather well.
    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.

  4. #34
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Elysia View Post
    I reserve C++ as the best practical language that models the current hardware. C is just too simple to meet modern needs.
    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.

  5. #35
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    What does that even mean, modeling the current hardware?
    That was a stab on "C modelling the current hardware".

    Quote Originally Posted by Mario F. View Post
    At least surprise us with something worth our time.
    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.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #36
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Elysia View Post
    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.
    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.

  7. #37
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    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.
    O_o

    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.

    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.
    o_O

    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

  8. #38
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View 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.
    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.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #39
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by phantomotap View Post
    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.
    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,

    Quote Originally Posted by phantomotap View Post
    The C language remains valuable because of complexity in regarding the lack of mechanisms which can express greater abstractions?
    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.

    Quote Originally Posted by Elysia View Post
    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 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.

  10. #40
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    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.

  11. #41
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    To me the second sentence is meant as a continuation of the first.
    O_o

    Indeed.

    "I reserve a special place for C++ as the most practical language because C is just too simple for modern needs."

    *shrug*

    Whatever.

    C is arguably a more complex language because it doesn't share the abstractions C++ introduced to simplify the task of programming.
    Are you sure you'd like to make that claim?

    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.

    Everything usually comes with a price.
    Certainly.

    And that's when you find the space the C programming language still has in the programming world.
    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.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  12. #42
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Mario F. View Post
    C is arguably a more complex language
    I disagree. C is a simpler language, and as a result, requires that code written in C is more complex than that written in C++. It's a fine distinction, but it's a valid one, nonetheless.
    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?

  13. #43
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    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.
    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.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #44
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by whiteflags View Post
    If that's not what you guys meant then I'm sorry, you lost me.
    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.

    Quote Originally Posted by phantomotap View Post
    Are you sure you'd like to make that claim?
    I've seen you rant at least a few times of the, let's say, impenetrable nature of C++ generics as expressed with templates.
    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.

    Quote Originally Posted by phantomotap View Post
    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.
    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'.

    Quote Originally Posted by Elkvis View Post
    I disagree. C is a simpler language, and as a result, requires that code written in C is more complex than that written in C++. It's a fine distinction, but it's a valid one, nonetheless.
    Perhaps. The net effect is that C code is more complex. Which is the point I'm trying to put across.

    Quote Originally Posted by Elysia View Post
    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.
    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.

  15. #45
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    The net effect is that C code is more complex. Which is the point I'm trying to put across.
    O_o

    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.

    But to be fair, what language doesn't?
    You'd find only a few languages where metaprogramming is part of the core design from the start.

    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.

    I was laughing at how all the expressiveness of the Python language had been thrown out the window.
    If you've done things properly though, you should have a greater expressiveness to state your requirements which is a fine purchase.

    I just don't think that certain implementations are possible in C++.
    o_O

    But while that is no doubt true, you will always find that C delivers much better than C++ in certain conditions.
    The only condition where I would find that C delivers any better that C++ is for those environments which only have crap C++ compilers.

    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.

    And the same is true of C, even if you want to believe in Stroustrup's 'C++ is a better C'.
    You've surely heard the "Bad Code Can Be Written In Any Language" axiom?

    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ajax response javascript=>c#=>javascript
    By xddxogm3 in forum C# Programming
    Replies: 1
    Last Post: 03-14-2012, 01:22 PM
  2. Replies: 2
    Last Post: 03-10-2009, 08:36 PM
  3. javascript
    By Redseal in forum Tech Board
    Replies: 8
    Last Post: 06-16-2007, 07:36 AM
  4. javascript
    By xddxogm3 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-07-2003, 10:50 AM
  5. javascript
    By bluehead in forum Game Programming
    Replies: 4
    Last Post: 12-04-2001, 09:13 PM

Tags for this Thread