Slashdot Mirror


ESR Sees Three Viable Alternatives To C (ibiblio.org)

An anonymous reader writes: After 35 years of programming in C, Eric S. Raymond believes that we're finally seeing viable alternatives to the language. "We went thirty years -- most of my time in the field -- without any plausible C successor, nor any real vision of what a post-C technology platform for systems programming might look like. Now we have two such visions...and there is another."

"I have a friend working on a language he calls 'Cx' which is C with minimal changes for type safety; the goal of his project is explicitly to produce a code lifter that, with minimal human assistance, can pull up legacy C codebases. I won't name him so he doesn't get stuck in a situation where he might be overpromising, but the approach looks sound to me and I'm trying to get him more funding. So, now I can see three plausible paths out of C. Two years ago I couldn't see any. I repeat: this is huge... Go, or Rust, or Cx -- any way you slice it, C's hold is slipping."

Raymond's essay also includes a fascinating look back at the history of programming languages after 1982, when the major complied languages (FORTRAN, Pascal, and COBOL) "were either confined to legacy code, retreated to single-platform fortresses, or simply ran on inertia under increasing pressure from C around the edges of their domains.

"Then it stayed that way for nearly thirty years."

595 comments

  1. Jesus Christ... by Anonymous Coward · · Score: 2, Insightful

    ...this guy is fucking full of himself.

    1. Re:Jesus Christ... by Anonymous Coward · · Score: 3, Funny

      Agree. C++ is the future. Anything else is for outsourced chimps.

    2. Re: Jesus Christ... by Anonymous Coward · · Score: 2, Interesting

      Python makes programmers more efficient than any other language. It will win out eventually, once people get over their irrational fear of whitespace.

    3. Re: Jesus Christ... by Anonymous Coward · · Score: 4, Funny

      Python makes programs less efficient than any other language. It will win out eventually, once people get over their irrational fear of having their code not run slow as shit.

      Fixed that for you.

    4. Re:Jesus Christ... by K.+S.+Kyosuke · · Score: 5, Funny

      Technically, everyone is full of himself.

      --
      Ezekiel 23:20
    5. Re:Jesus Christ... by Anonymous Coward · · Score: 1, Insightful

      All the most widely used operating systems are written primarily in C/C++

      All the most widely used web browsers are written primarily in C/C++

      All the most widely used business applications and their open source equivalents, are all primarily written in C/C++

      The problem is not the language. The problem is too many shitty, incompetent programmers and too many companies who don't give two shits about producing good products.

    6. Re: Jesus Christ... by Anonymous Coward · · Score: 0, Troll

      Unless you're writing a kernel or gpu, speed doesn't matter anymore these days. So for ahead spending months to declare your variables while I finish three programs in that time. Less competition for me.

    7. Re: Jesus Christ... by Anonymous Coward · · Score: 1

      I can finish three programs in c in the time it takes you to write one script in python. Plus my programs will run faster and use less battery life than yours.

    8. Re: Jesus Christ... by ShanghaiBill · · Score: 1

      Python makes programmers more efficient than any other language. It will win out eventually

      Let me know when you can run Python on an embedded AVR with 256 bytes of RAM. When you get down to bare metal, it is either C or assembly.

    9. Re: Jesus Christ... by Anonymous Coward · · Score: 1

      No, it is less competition for me. Your shitty "programs" are junk, I care less what stupid xml parsing bloatware you do, chimp.

    10. Re: Jesus Christ... by Anonymous Coward · · Score: 4, Insightful

      Programmers who think being efficient means churning out lines of code are not worth hiring anyway. Coding is a small, even tiny part of software development.

    11. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Speed matters.

      Half the speed means it costs twice as much in power and hardware to do the same job. There's a tradeoff between cost of development and lifetime amortized cost, once applications become stable, efficiency matters big time. The generic web server is a classic example there and even the big ass Java application frameworks tend to offload to a C backend where then can. (==> WebSphere, IHS).

      The push for efficiency will come from the cloud vendors because in the end, costing less will make them money.

    12. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Batteries, batteries... unless we invited cheap ways to store huge amounts of energy, efficiency will matter.

    13. Re: Jesus Christ... by Anonymous Coward · · Score: 1

      People like you are the reason why computers are orders of magnitude faster and yet software feels the same as it did two decades ago. Sure keep adding abstraction layers...

    14. Re: Jesus Christ... by mnemotronic · · Score: 1

      ... Coding is a small, even tiny part of software development.

      Normally ACs are off in the weeds but this is the most insightful post here.

      --
      The Russians have won. They have made the world a cesspool of distrust, greed, fear and hate.
    15. Re: Jesus Christ... by Anonymous Coward · · Score: 1

      Depends on the scale of what you are doing. I am doing a lot of big numerical engineering simulations and believe me, speed matters, even if you parallelise massively. If need to run certain function 10^9 times because I am doing a massive Monte Carlo simulation the speed of that function maters a lot.

    16. Re:Jesus Christ... by Z00L00K · · Score: 5, Insightful

      C++ has all the bad parts from both C and Object-orienting with little added benefit. There's also a reason why for example the Linux kernel isn't written in C++ but C, and that is the memory management of C++ that isn't predictable for use in the kernel.

      C actually is a pretty good language, but it has at least two disadvantages:
      1. No strong typing.
      2. Pointers - you can with no warning work outside the predicted area so you can easily overwrite the stack or just about anything else.

      The quirk with C is that the unrestricted pointers also is an advantage in some cases so it's not a good idea to entirely scrap that ability.

      C is also a pretty good language when it comes to writing small compact efficient code that is portable between hardware architectures. It puts demands on the programmer to be competent and really be careful about what he's doing, but the gain is great. This is very useful in embedded solutions. And if you look at what you use when you program Arduino then it's C.

      The only alternative to C in some environments is assembly programming, but that puts a lot more demand on the programmers.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    17. Re: Jesus Christ... by Z00L00K · · Score: 1

      Python is to programming today what Basic was to programming in the 80's.

      They share a lot of similarities.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    18. Re: Jesus Christ... by Z00L00K · · Score: 1

      Speed matters in a lot more applications than you can imagine.

      If you would do something where speed don't matter then you'd do your calculation by hand instead of buying a computer.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    19. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Python sucks. I would not write this in your face if you did not try to lie publically, though.

    20. Re: Jesus Christ... by Anonymous Coward · · Score: 4, Informative

      I write in C for embedded systems. Matlab generated C code is too bloated and inefficient. Especially for a DSP. I've been down that Matlab path with high hopes and it didn't work well. It's still a good idea to test the algorithm in Matlab.

    21. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Just as with memory, you're right, until you realize how many programs are developed with that mentality, often all requiring the same resources to make up for developer sloppiness or addiction to a particular abstraction system, and then all the sudden, resource efficiency starts to matter again.

    22. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Put up or shut up

    23. Re:Jesus Christ... by religionofpeas · · Score: 5, Insightful

      1. No strong typing.
      2. Pointers

      I've been programming in C for a few decades, and I've made plenty of mistakes over the years, but very few of them had anything to do with strong typing or pointers. Most of them are just logic mistakes that I could have made in any other language.

    24. Re:Jesus Christ... by invalid_user · · Score: 1

      My microbiota friends beg to differ.

    25. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Have fun maintaining which version of Python you're supposed to have installed for which software package your business depends on.. Python is worse than the DLL hell and libc versioning.

    26. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Unless your writing a slow piece of shit of shit app that need and iPhone x to run.

    27. Re: Jesus Christ... by brantondaveperson · · Score: 0

      Python is just fine for 90% of people and problems out there.

      Python is borderline useful for small tasks. It's totally unsuitable for software of any significant size.

    28. Re: Jesus Christ... by Pseudonym · · Score: 3, Interesting

      I think it was P.J. Plauger who pointed out that all programs are real-time. A system which computes the monthly payroll is useless if it takes three months to run.

      More to the point, though, "speed" in this case is a proxy for other kinds of efficiency. A program which uses the system resources more efficiently requires less battery, less hardware, less air conditioning, and so on.

      Just a thought: What do you suppose the worldwide carbon footprint of DRM is?

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    29. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Python is just fine for 90% of tech startups which won't be in business a year from now.

      FTFY

    30. Re:Jesus Christ... by brantondaveperson · · Score: 1, Informative

      and that is the memory management of C++ that isn't predictable for use in the kernel.

      Bizarre. You can overload new and delete on a per-class basis. There's no C++ in the kernel because Linus is irrationally afraid of it - it's doubly absurd when you go & look at that code, and there's member functions, and virtual methods, and per-class allocation calls, all written in C.

    31. Re: Jesus Christ... by Pseudonym · · Score: 1

      Python makes programmers more efficient than any other language. It will win out eventually, once people get over their irrational fear of whitespace.

      Just for the record, I like whitespace. Whitespace is good. Hell, Haskell is one of my favourite languages.

      People who think that whitespace is the reason why Python is a terrible language are completely missing the point. The lexical syntax is easily the least shitty thing about Python.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    32. Re:Jesus Christ... by K.+S.+Kyosuke · · Score: 2

      I should have added "modulo organ transplants", of course.

      --
      Ezekiel 23:20
    33. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Wow, someone's got a serious butthurt with python. Perhaps one too many pythons up your ass during the course of your faggoty life.

    34. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      And if by 'borderline,' you mean 'completely dominates,' then yes, Python completely dominates the small task domain. It was designed for that purpose provided speed was not important.

    35. Re: Jesus Christ... by ShanghaiBill · · Score: 5, Informative

      No one writes C for embedded control systems, we let Simulink and Matlab handle that.

      I work on embedded systems. I have been involved in dozens of projects. I have never, not once, seen Simulink or Matlab used in a final product.

    36. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Amen. I'm forced to use some python SDKs and every time the new version comes, the install process involves some manual pinning of a PIP package. The developers who use those frameworks always write their prerequisite as ">=0.x.0" in a hope that even a 0.x.1 is compatible with it. But usually this is not the case and one needs to start pinning the packages and their dependencies to certain version. And hope that something other tool still works.

    37. Re:Jesus Christ... by Anonymous Coward · · Score: 0

      Bizarre. You can overload new and delete on a per-class basis. There's no C++ in the kernel because Linus is irrationally afraid of it.

      There was a time period of half a year or so when the Linux kernel was compiled using C++. It bought worse optimization, much slower compilation, strange bugs. No actually tangible advantages. Finally, Linus reverted that decision.

      C++ is tricky to get right in a kernel context because you cannot depend on garbage collection. When using something like STL, stuff gets scattered across more memory pools than desirable. Reallocation strategies have unknown semantics and timing.

      Basically the stuff that gets solved in a black box manner, quite a boon for application programming, is not viable in a kernel. You cannot afford black boxes. Of course, giving sufficient prying, no box is black, but C is quite more shallow. The details of its semantics are easier to control.

    38. Re: Jesus Christ... by Hognoxious · · Score: 4, Insightful

      Just a thought: What do you suppose the worldwide carbon footprint of DRM is?

      A lot less than Bitcoin's.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    39. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      I have. It was an interesting experiment, useful if you want your mechanical engineers to write control code. Not something I'd see a need for otherwise, and to be honest, the hoops they had to jump through to get their data-flow based structures to work with things like bitmaps were horrifying.

    40. Re: Jesus Christ... by Anonymous Coward · · Score: 1

      You don't have to be involved in research or problems of pure computation for speed to matter, either. The rate at which any service can handle requests is governed by speed, the time taken being inversely proportional to the requests/second it can handle.

    41. Re:Jesus Christ... by TheRaven64 · · Score: 4, Interesting

      Linus isn't irrationally afraid of C++, he's rationally afraid of the state of C++ 20 years ago. I completely agree with him that C++ was a terrible language 20 years ago. He just hasn't bothered to reevaluate his opinions based on more recent versions of both the standards and compiler ABI stability.

      Oh, and you missed the horrible non-typesafe macros (look at the list and queue macros, for example), that provide a crappy version of C++ templates, with all of the disadvantages and a few of the advantages.

      --
      I am TheRaven on Soylent News
    42. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      The lexical syntax is easily the least shitty thing about Python.

      Otherwise known as "damning with faint praise" :)

    43. Re: Jesus Christ... by PommeFritz · · Score: 1

      There is such as thing as MicroPython https://micropython.org/ that runs directly on bare metal microcontrollers. Okay, they don't have just 256 bytes of RAM, but that's stretching it for every language

    44. Re:Jesus Christ... by VirginMary · · Score: 1, Insightful

      C++ is tricky to get right in a kernel context because you cannot depend on garbage collection. When using something like STL, stuff gets scattered across more memory pools than desirable. Reallocation strategies have unknown semantics and timing.

      1. What does garbage collection have to do with C++?
      2. Where does it say that you have to use the STL in kernel code?

      I used to program in C and still love the language. For years now I program primarily in C++, but also in Java, Python and PHP (Boy, do I *hate* this language!). I think that only idiots and masochist would prefer C over C++. C++ gives you far better abstraction capabilities. Destructors and const member functions are wonderful, just to pick two examples, and, if you understand how C++ works, you can get the same close-to-the-metal efficiency of C but with far fewer lines of code that is also safer and more reusable than the same thing written in C. It is much easier to write C++ code without memory leaks than to do the same thing in C. Finally RAII rocks.

      --
      When 1person suffers from a delusion,it is called insanity.When many people suffer from a delusion,it is called religion
    45. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Bitcoin is just DRM for made up money, so let's include it.

    46. Re: Jesus Christ... by Junta · · Score: 5, Insightful

      Python is a mixed bag.

        It takes much longer to write all but the most trivial stuff in C. Languages like Python let you be exceedingly lazy. However like pretty much all managed runtimes, it is slow and inefficient, and even within the realm of managed runtimes, CPython isn't a particulalry fast or robust one.

      Also a language that lets the programmer be lazy is one that leads to poor performance decisions. In C, if it is hard for the computer, you are made to realize it is hard because it's more work to program. In C, if something is an operator (like +/-/[]/etc) it's a fairly deterministic handful of assembly instructions (C++ does not have that characteristic, what with operator overrides and such of course). In Python, that could be simple operators, or it could be some mallocs and several memcpys, who knows. You want to use a hash? In C you are going to use moderately tedious function calls because hashes are an expensive choice compared to when you can get away with an array or struct. In Python? Sure, go to town, hash everything. You want to mix and match integers and strings in an array? In C, yeah, you know that's a stupid idea because it's hard to do. In Python, not a single thought required so people do it. Such code cannot be optimized by any language implementation.

      Of course, the above doesn't matter much of the time because the difference in good and bad CPU performance is orders of magnitude smaller than the network IO delays that many applications are contending with, so the "let the programmer be lazy and produce crappy code" doesn't matter since a developer can just crank though the code they want to do without a thought and that's sometime totally worth it,.

      Also talking about a language where there is threading, but made utterly useless by the GIL. The answer of course was "well you don't need threads anyway, other methods give the appearance of similar concurrency when I/O bound and are harder to screw up" (which is frequently true for many applications, but no comfort to the subset for which that is not true.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    47. Re: Jesus Christ... by Junta · · Score: 1

      A case can be made for having canned functions that are performance sensitive in C, and then providing a pyhton API or similar to orchestrate. In scientific computing, there are a lot of folks who know htier science, but aren't that good at programming. For those the ability to describe their particular variant of a problem in a language like python, and have the complex computation execute according to those paramters inside a C library is valuable (see numpy).

      --
      XML is like violence. If it doesn't solve the problem, use more.
    48. Re: Jesus Christ... by 0100010001010011 · · Score: 2

      Want to guess what portion of work needing to be done is 'small tasks'? We've automated and hidden away thousands of small tasks.

      Not everyone needs to write a kernel.

    49. Re:Jesus Christ... by Anonymous Coward · · Score: 0

      About half everyone is full of herself.

    50. Re: Jesus Christ... by 0100010001010011 · · Score: 1, Troll

      I too work in embedded: automotive, industrial, and aerospace. How many of your embedded projects were AUTOSAR, ISO 26262, or DO-178C certified?

      I have never, not once, seen Simulink or Matlab used in a final product.

      Bragging about your ignorance just tells me more about your line of work than it does anything else.

      Here's an SAE paper from 2004: https://www.mathworks.com/tagt...

    51. Re: Jesus Christ... by Junta · · Score: 4, Interesting

      As a python developer, I'm totally there with you. I also see how it happens.

      Currently all my projects I mandate to be compatible with python 2.6, 2.7 and 3.6 because I have a significant userbase still doing supported, but old enterise distros and I want them to be comfortable with the fact that it's mostly running from the OS provided runtime. *repeatedly* a developer comes along and say "why should we support old language runtimes? just make the users deal" Of course then I point to the large number of CVEs we'd suddenly be resposible for, in addition to how broken some of their suggestions would leave the customers python environments on top of how non-python developers view shenanigans like requiring your own python when a seemingly usable one is right there on the filesystem.

      Then we get to pypi. We incur a lot of testing if a package *must* use PyPI content, and then package it as rpm and/or .deb if and only if distribution does not have it, and test with and without popular third party repoes (like epel, centosplus, etc. )Developers want to pull in a big pypi package over the most trivial of things. Suddenly we find a package in EPEL that isn't the same as the one in Ubunutu repoes and they have different API (because python developers tend to not give a crap about stable APIs either). So our code adapts to use the different API generations that may come about due to those sorts of differences.

      Python is more accessible so you get more developers willing to work on it. The problem is that that large base of developers is not anywhere near as disciplined or caring about their userbase as would be ideal.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    52. Re:Jesus Christ... by Junta · · Score: 4, Interesting

      While I have not made mistakes with pointers (so far), I will say that it is tedious to constantly be passing around the max size parameter to every little function because that's the only way for a C function to safely deal with pointer data.

      Of course on the other hand, when I have reason to use C, it is refreshing and keeps me more aware of the limitations of the machine at all times. The coddling of other languages makes me forget and do slow algorithms out of laziness.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    53. Re:Jesus Christ... by K.+S.+Kyosuke · · Score: 1

      That's almost exactly a half of my statement.

      --
      Ezekiel 23:20
    54. Re: Jesus Christ... by cyber-vandal · · Score: 1

      I'm glad I don't have to use your code

    55. Re: Jesus Christ... by Hal_Porter · · Score: 3, Insightful

      People always say this - programmer time is expensive, compute power cheap, efficiency doesn't matter.

      However look at Reddit. They originally wrote in Lisp, and then rewrote it in Python. And it's still slow enough it goes down regularly. Despite the fact that it's using a relatively light framework - web.py and then Pylons.

      You could imagine writing a web framework in something like C or C++ that would be much more efficient than Python.

      I mean I like both Python and C/C++. Python is definitely easier to prototype stuff in. C/C++ is fast as hell. And if you're serving a website to vast numbers of people that means you need less hardware to do it.

      Or look at Windows apps. .Net and Java ones are so crappy I avoid them. Native Win32 with a stripped down framework gives you tiny, fast applications like uTorrent.

      I'm still convinced a lot of the smoothness of iOS applications over Android is because Apple use Objective C while Google use Java. You can handwave away the slowness of Java with things like JIT and AOT code conversion but just picking the two devices up you can see that Android is not a particularly performant environment.

      Now personally a multi vendor OS is important enough that I can live with it being a bit crappy so I went from Windows Mobile to Android and not to iOS. Android, like Windows Mobile before it is multivendor which means you have cheap hardware and loads of free or cheap software and third party Roms and firmware images. Like Windows Mobile it's kind of a mess though - Windows Mobile was always about ten years behind the state of the art in terms of UIs. Android is crippled because most of the applications are written in Java.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    56. Re: Jesus Christ... by Stephen+Battleware · · Score: 1

      ".. just DRM for made up money .."

      I've never read it describe that way, thanks.

    57. Re: Jesus Christ... by Zero__Kelvin · · Score: 1, Insightful

      Why would you just randomly make shit up about C++? Do you really think there aren't people here who actually understand C++ and realize that you literally have no understanding of it when we read your absurd claims?

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    58. Re:Jesus Christ... by Stephen+Battleware · · Score: 1

      When one person suffers from a delusion, it is called insanity. When many people suffer from a delusion, it is called a fact.

    59. Re:Jesus Christ... by Anonymous Coward · · Score: 0

      I've made plenty of mistakes over the years

      and most of your bugs are still unfixed thanks to the nature of C

    60. Re: Jesus Christ... by ipb · · Score: 1

      "A case can be made for having canned functions that are performance sensitive in Assembly, and then providing a C API or similar to orchestrate. In scientific computing, there are a lot of folks who know their science, but aren't that good at programming. For those the ability to describe their particular variant of a problem in a language like C, and have the complex computation execute according to those parameters inside a library is valuable"

      FTFY - and brought it back to the arguments from 40 years ago.

    61. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Same here. C is common for the majority of control systems I've seen. And now C++ is establishing a sizable foothold.

    62. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      If they wrote it in php we wouldn't be seeing this post.

    63. Re: Jesus Christ... by squiggleslash · · Score: 1

      I wouldn't touch C for an application where there's only 256 bytes of RAM! That's assembly territory. You'd lost 25% of that memory just having two or three functions call one another with two or three parameters.

      --
      You are not alone. This is not normal. None of this is normal.
    64. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      In my workplace experience, the hardcore C advocates are too lazy to learn even the basics of c++. One complained unique_ptr afforded no benefits, and in his words, just created a new set of problems.. as he kept wrapping raw pointers with unique_pre, just to pass to a method requiring unique_ptr (such that it would be deleted as that method returned). Even after introducing a memory leak on master a few days after claiming there was no benefit, wasn't enough to sway him. Basically zero care factor about producing robust code.

    65. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      You have to remember that some people consider Raspberry Pi to be an embedded system.

    66. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Agreed.
      I used to think the whitespace thing in Python was a problem before I tried to do any programming in it.
      Turned out that it was a complete non-issue.

      I would still not pick Python for any application that will be released to users that may be irritated by crashes, but I don't think it is a bad language for solving the "I just want to do this little thing on my computer" that I would otherwise use other scripting languages for.

      I think the major issue I have with Python in its current state is the lack of proper static typing. (Yes, I know that you can run separate code verifiers on it, but it doesn't catch everything.)

    67. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Another thing with the different versions of Python. More obscure platforms out there doesn't have later versions of Python ported to it, so not supporting old versions means that you exclude users.

      If you want to support MS-DOS and WindowsCE you are stuck with Python 2.4.

    68. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Not snarky, or, trolling, but why do you say that? He specifically says he's not an extraordinary coder... He's just been doing this a long time, and has perspective, specifically for the application of code he cares about (krnl, embedded).

      At the worst, he sounds like someone reminiscing about his career, without much of a punchy , insightful conclusion

    69. Re: Jesus Christ... by Neuronwelder · · Score: 1

      If I am understanding you correctly. You say that C is simpler and faster at certain tasks. I'm all for the older software and technology. If the Big Boys decide take the motherboards and change their software/firmware, rendering your saved data useless, then what? Going back to microfiche, data reel tape, should be preserved. Don't put all your eggs in one basket. Many control freaks might knock that basket out of your hand. I would urge some brilliant mind to be able to print 3d chips.

    70. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Moore's Law: every 18 months hardware speed doubles.

      Gates' Law: every 18 months software speed halves.

    71. Re: Jesus Christ... by Hognoxious · · Score: 3, Funny

      Just put everything in one massive struct of doom, then you only have to pass a single pointer everywhere.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    72. Re: Jesus Christ... by Hognoxious · · Score: 1

      A system which computes the monthly payroll is useless if it takes three months to run.

      Nah. You just have to start the June run at the end of March. Lateral thinking, see?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    73. Re:Jesus Christ... by Greyfox · · Score: 1
      A couple years ago I was maintaining an old C program that was written in the mid '90's. It has over 400 global variables that three applications shared via header files. If you look at a lot of the system-level utilities that you might use on a daily basis in a UNIX type system (ls, awk, sed, grep, for example,) most of them will be written the same way. In the case of something small like ls or rm, you might actually be able to get away with that, but that's how ALL C programs were written back in the day. And a lot of them still are. Sure, you could write a C program that doesn't define any global variables (there'll still be a couple from the standard library, like errno,) but no one actually does that. Your C code could make sure that it doesn't allow arrays to overflow. No one does that. You could sanitize your inputs. No one does that.

      You see, it's not that languages are necessarily fundamentally bad, it's that programmers are. There are a lot of reasons why, but it's a poor craftsman who blames his tools. You could write an operating system in C or assembly language, and code it carefully so that you can guarantee each little piece of it doesn't suck. And three decades later you might eventually release it. Or not. Dunno, haven't seen one yet. You think it'd be any easier in whatever newfangled language you like? I doubt it. The hard part would be finding some programmers who have the time and willingness to learn all the stuff you need to know to write an operating system and spend several years actually doing that. At the moment no one seems to hate the OS they're using enough to try to write one that sucks less.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    74. Re: Jesus Christ... by squiggleslash · · Score: 1

      I would be bothered about the security risks of a web application written in C or C++ (as it is I'm bothered by the amount of Internet facing software we use all the time written in those languages.)

      I know Java has a poor reputation, but when people have compared like with like, it's not much less efficient than C++ - what it loses in forcing programmers to avoid efficient shortcuts it gains through replacing malloc()/free() with a heap based system. C# in theory has similar efficiency (and is much, much, nicer to program in than Java!)

      It'd be nice to see developers switch from PHP (because, let's be honest, all this "Python vs Perl" stuff ignores the fact most of the programmers claiming to use Python every day are actually maintaining PHP applications in RL - that's what the web is written in) to Java/C# or something similar. If the FOSS community could develop a framework similar to .NET but with Unix rather than Windows conventions, that'd be great.

      --
      You are not alone. This is not normal. None of this is normal.
    75. Re:Jesus Christ... by phantomfive · · Score: 1

      Do you really think the new standard would make much difference (for his uses)? They're unlikely to import Boost into the kernel, for example. OSX uses C++ but it's a subset of C++ that is mainly 20 years old. So is there really anything in the newer standards that would affect his use cases?

      --
      "First they came for the slanderers and i said nothing."
    76. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Games still need to run smoothly. Interfaces still need to avoid annoying lags and stop-go interaction. Computers should still be responsive with many applications running side by side. And little, easily avoidable inefficiencies still add up.

    77. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Speed matters a great deal. You get 200 milliseconds before a user notices your website sucks. You get 2 seconds before they bail.

      If the guys who make your Database thought speed wasn't important, the maximum number of concurrent amazon shoppers would be 7.

      The point you misunderstood is that it's cheaper to buy speed than to buy developer hours. This is a critica lesson for anyone who hopes to make money in software.

    78. Re: Jesus Christ... by tanimislam · · Score: 0

      You are exactly right, and there is a name for one of the concepts that builds upon a convenient API layer (now Python usually) â" called steerable code. One builds the high performance guts in C, C++, or Fortran. But problem setup (initial state, physics, algorithmic choices) are specified in the higher level language. Oftentimes, the code has an interactive python shell.

    79. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Yep, when you're running an optimisation with 10s of thousands up to millions of variables and short runtimes are order of several hours in length then fast code matters a lot.

    80. Re: Jesus Christ... by Junta · · Score: 1

      It was true then, and things have mutated a tad since then...

      One the barrier to entry is even lower, and it is much easier for skilled programmers to provide API to higher level languages, whereas back then, assembly and C could interoperate, but not so much for enabling other languages.

      Another is the C/assembly situation has flipped for most mainstream architectures. C compilers now generate much better assembly than 99% of developers, with all sorts of varying processor capabilities exploited in interesting ways. Ways that are massively more tedious to branch and execute on manually, even assuming you invest the effort to keep track of the processor features that are new and evolving.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    81. Re: Jesus Christ... by djinn6 · · Score: 2

      People always say this - programmer time is expensive, compute power cheap, efficiency doesn't matter.

      However look at Reddit. They originally wrote in Lisp, and then rewrote it in Python. And it's still slow enough it goes down regularly.

      C/C++ is fast as hell. And if you're serving a website to vast numbers of people that means you need less hardware to do it.

      What you say is true, however, you are missing the big picture. Reddit didn't start out with millions of users. It started out with maybe a dozen, with no promise that it'll ever grow beyond that. If they wrote the entire thing in C and took 2 more years to launch, maybe it would've never gotten big. Maybe it would've never launched at all. The creators couldn't support themselves indefinitely, and their investors might not have the patience for it.

      Another problem is, anything written in C is harder to change. The site might do things faster, but is it doing the right things? Maybe your users want image sharing capability. Can you wait 2 more years for the feature and risk letting sites like Imgur come into existence, maybe even take a bunch of your users away?

    82. Re:Jesus Christ... by Rob+Y. · · Score: 1

      Some of the most common problems programmers encounter with C have to do with the stupid, inconsistent design of some of the standard C library functions. I was a C programmer for years before I realized that the 'size' parameter to strncat was not the size of the target array, and is basically a bait-and-switch temptation to overflow your buffer. I have my own Strnzcat function that's defined sanely to concatenate strings and truncate the result to produce a zero-terminated string within the provided buffer. Trivially easy - assuming you've figured out that that's not what strncat does.

      Other than that, the most common programmer error is using uninitialized stack frame variables. Would it really be so much of a performance hit to have the compiler generate a call to zero out each new the stack frame on function entry. Perhaps with an 'I really care about performance here' option to not do it...

      --
      Posted from my Android phone. Oh, I can change this? There, that's better...
    83. Re: Jesus Christ... by djinn6 · · Score: 1

      I'm with you on most of your points, but I'd like to point out that if you're optimizing before you even wrote the software, then you're doing it wrong. Measure, and then optimize. Hashing things might be slow, but maybe in the 3 hours that would have spent rewriting that routine, you could instead discover that the function gets called 3 times a second and it literally doesn't matter.

    84. Re:Jesus Christ... by djinn6 · · Score: 1

      When one person suffers from a delusion, it is called insanity. When many people suffer from a delusion, it is called a fact.

      So flat earth is now a fact?

    85. Re:Jesus Christ... by Rob+Y. · · Score: 1

      Except that C++ has several features that inherently make it hard to pick up a piece of code and understand what it does. Yes, it's very 'nice' that you can define a new version of the same function by varying its parameters - when done consistently within a well designed class library. But it's sheer laziness to refactor existing code by counting on that feature. Have pity on the poor schlub that's ultimately going to inherit your code and try to support it.

      To some extent, I think C++ is fine - as long as you code your application logic as if it were in C and restrict the C++'y stuff to the class libraries you use. That avoids the problem of programmers who barely understand what the C++ compiler is doing 'designing' classes that somehow magically work - most of the time.

      --
      Posted from my Android phone. Oh, I can change this? There, that's better...
    86. Re: Jesus Christ... by Hognoxious · · Score: 2

      You're going to set the gold nutters off, you do realise that?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    87. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      If timing was important web developers should embed 20 mb of dl'ed JavaScript and 10 different ads...

    88. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Yeah I agree python version management is difficult. But evidently, you haven't tried nom/nvm... Which is 10000x worse than python. Its like they said duck we won't any lessons from previous version managers and reinvent the wheel as a triangle

    89. Re: Jesus Christ... by Pseudonym · · Score: 1

      Very true.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    90. Re: Jesus Christ... by Hal_Porter · · Score: 1

      What you say is true, however, you are missing the big picture. Reddit didn't start out with millions of users. It started out with maybe a dozen, with no promise that it'll ever grow beyond that. If they wrote the entire thing in C and took 2 more years to launch, maybe it would've never gotten big. Maybe it would've never launched at all. The creators couldn't support themselves indefinitely, and their investors might not have the patience for it.

      That's a fair point. Still you can make the case once a website which does have millions of users there should be a better alternative. Of course at that point you'd be crazy to rewrite a large Python app in C/C++ because the odds are the C/C++ version would end up mishandling under documented features of the Python version.

      I guess there's Cython, but I'm not sure how widely used it is.

      Perhaps the best way forward is to have some sort of high performance run time like Cython for scripting languages.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    91. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      My nuts are certified under all of them. And also the SCR0-T standard as well.

    92. Re: Jesus Christ... by Junta · · Score: 2

      I was thinking about the little pervasive choices adding up in aggregate. In python development, dict is so frequently the first choice of any data structure because it's generally very flexible and requires little thought. In C a struct is about as easy as using a dict in python, but massively better, and it can add up for good or for ill very quickly. It's not as flexible, but the majority of the time I see dict, the members are actually well defined and the flexibility is not really needed.

      Just wanted to mention this, as folks generally 100% blame the runtime for a reputation of slowness, when language design empowering laziness is a significant contributor (and often worth it for the sake of developer time).

      --
      XML is like violence. If it doesn't solve the problem, use more.
    93. Re:Jesus Christ... by Pseudonym · · Score: 1

      Well, an alternative fact.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    94. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      $ time python
      time python
      Python 2.7.10 (v2.7.10:15c95b7d81dc, May 23 2015, 09:33:12)
      [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      >>> print("Hello world.")
      print("Hello world.")
      Hello world.
      >>> ^D

      real 0m5.289s
      user 0m0.016s
      sys 0m0.012s

      So, I not only wrote a script, but also compiled and executed it, in 5.289 seconds. Your turn. You have 1.763 seconds per C program. You must be one hell of a fast typist.

    95. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      > Python is borderline useful for small tasks. It's totally unsuitable for software of any significant size.

      The stupidity is powerful with you. Having written software in Python of significant size for critical infrastructure you should slap the shit out of any fool who told you this. They are a unqualified idiot. This software is currently driving portions of our nation communication infrastructure. Some of which was shared with the open source community which was then used by NASA for a brief period to conduct test automation on several rovers.

    96. Re:Jesus Christ... by Tough+Love · · Score: 1

      Yup, it's basically "I somehow never managed to learn C++ so I want a pony." Nothing against Rust or Python, mind you, but C++ rules the world of high performance programming at the moment, and the more billions of cloud servers we have, the more that doesn't change.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    97. Re:Jesus Christ... by munch117 · · Score: 1

      1. What does garbage collection have to do with C++?

      What you call "garbage collection" is an abbreviation of "automatic garbage collection", so called to distinguish it from the manual garbage collection done with malloc/free and such.

      RAII memory management is a manual garbage collection discipline.

    98. Re:Jesus Christ... by Anonymous Coward · · Score: 0

      That is what a good compiler is for. Identifying typecasting errors and pointer misuse. As to embedded solutions that one is funny. That was suppose to be what Java was all about. Look at the mess it is now. The kitchen sink of programing languages. Rust? I don't see that as a really great solution. Probably a good name for it.

    99. Re:Jesus Christ... by Darinbob · · Score: 1

      Fixing the pointer problem can require additional code, which could rule that out on space constrained systems. However if the pointer problem is solved with static analysis, that would be useful. We already have static analysis tools though.

      For types, I agree, we need stronger typing in C. The newer standards for C should have focused on that.

      I think a lot of people just assume C++ is the solution, but it really isn't until it relaxes some of the rules in the standard. C++ seems to be going the opposite direction, supporting more bloat, more Boost silliness, and so forth.

    100. Re:Jesus Christ... by Darinbob · · Score: 1

      I have seem plenty of bugs with both. I have seen engineers with lots of experience dismiss some things that other language take for granted - ie, I had one tell me flat out that he thought "const" was a waste of time and that it never found any bugs, ever.

      C developers tend to be in two groups. Devs who know CS or have used lots of other languages at least so that they have a broad experience, and devs who use C as just a simple tool because their background is in EE or science or something else. The first group tends to understand why typing is important and what it can do, the second group you may see sticking in type casts everywhere even if not needed as they learned that this is how you get the warnings to go away.

    101. Re:Jesus Christ... by amorsen · · Score: 0

      The C++ compiler is vastly better than it was 20 years ago, for one thing.

      Also, you missed the ABI stability part. 20 years ago it would have been hard to support loadable modules compiled separately from the main kernel if the kernel was C++. Today, that would be much less of a problem.

      --
      Finally! A year of moderation! Ready for 2019?
    102. Re:Jesus Christ... by Darinbob · · Score: 1

      Templates were crappy at the start. They're still crappy now. Mostly because they're just smart macros, and it is way to easy to have this turn into serious bloat. I have seen a big misuse of macros so that one line expands out to a hundreds of kilobytes of generated object code, but this is rare and the people who write code like that often get laughed at. In C++, such a situation is somewhat common in my experience, the developers are trained to ignore the fact that the code is bulky and not optimized very well (and trained to never optimize, even ten years later is "premature optimization"). If a template could re-use actual object code instead of a dumbed down re-use of source code, it would be a better feature.

      I had a product once with a hard limit of 1MB of object code, and it was in C++ but written in a C like manner to save space. One dev decided he wanted to use C++ strings in it, he literally converted C strings to C++ strings just so that he could use "==". The first use of c++ strings added half a megabyte of code all by itself, and each comparison too up more space than a simple strcmp would have. And that is one of the drawbacks here for C++; developers are trained to do rapid prototyping always and never look behind the curtain to see the how bad the result is.

    103. Re: Jesus Christ... by Darinbob · · Score: 1

      I am using a chip with only 20KB or RAM, and 128KB of code space. Efficiency is mandatory there, you can't just replace that by getting a faster computer, duck taping a raspberry pi to the side.

      Note that computers today do not feel any faster than they did 25 years ago when running typical applications. Part of this is the near universal taboo by developers from doing any optimization.

      I find it terribly hard to believe that these programmers' time is really that expensive given the low quality of product they create.

    104. Re: Jesus Christ... by Darinbob · · Score: 1

      And yet, those lines-of-code people quite often keep their jobs for long periods. That's because these people always look busy, they've always got their names attached to tons of source code checkins, and the boss may be fooled into thinking this is productivity.

      The dev writing 7 lines of code a month may actually be more valuable overall, but it becomes difficult to prove that when it's time to hand out raises.

    105. Re: Jesus Christ... by djinn6 · · Score: 1

      Still you can make the case once a website which does have millions of users there should be a better alternative. Of course at that point you'd be crazy to rewrite a large Python app in C/C++ because the odds are the C/C++ version would end up mishandling under documented features of the Python version.

      Well, the official stance from the Python devs is to rewrite the performance-critical parts in C and call it from Python using Swig. Alternatively you could compile the C library run it under a separate process, then use inter-process communication or RPCs.

    106. Re: Jesus Christ... by 0100010001010011 · · Score: 1

      And yet it works perfectly fine for most companies in quite a few industries. A bad carpenter blames his tools.

    107. Re: Jesus Christ... by La+Gris · · Score: 1

      Use Ada, Ada is the most awesome language for anything, including embedded and certified code.

      --
      Léa Gris
    108. Re:Jesus Christ... by Anonymous Coward · · Score: 0

      Where C code usually sits in the application stack close to the metal, no strong typing can be an advantage.

      Neither of these are the real problems with C, the way I see it the real problem is that the language is so powerful that you get guys writing fancy code, which is completely indecipherable and therefore un-maintainable.

      Really do we need a separate header file from the code file - just put everything into one file, that alone would probably double the number of people who use the langauge.

    109. Re:Jesus Christ... by phantomfive · · Score: 1

      Also, you missed the ABI stability part. 20 years ago it would have been hard to support loadable modules compiled separately from the main kernel if the kernel was C++. Today, that would be much less of a problem.

      Is it less of a problem? Last time i checked the output, gcc for ARM has a vastly different ABI than gcc for Intel, for example.

      --
      "First they came for the slanderers and i said nothing."
    110. Re:Jesus Christ... by phantomfive · · Score: 1

      Bizarre. You can overload new and delete on a per-class basis.

      That's exactly what makes it unpredictable.

      --
      "First they came for the slanderers and i said nothing."
    111. Re: Jesus Christ... by Pseudonym · · Score: 1

      If I am understanding you correctly. You say that C is simpler and faster at certain tasks.

      Well I am saying that, but this isn't my central point. My central point is that efficient use of resources (whether it's real-time performance, hardware needs, power consumption, programmer time, or whatever metric is important) is always important.

      I speak over 60 programming languages at last count, to varying levels of fluency. Python is not on the list. I tried to learn it, I tried to find something good about it, but I found very quickly that Python taught me nothing useful about programming, and encouraged (and in some cases enforced) poor programming habits, and I spent so much time fighting the language that I gave up.

      Even Erlang never faught me. Hell, even JavaScript never faught me to the same extent that Python did.

      I would not choose Python for live deployed code. I do not object to it being part of a system, as a "better Perl" or "better shell script". I wouldn't even necessarily be against it being used as the "soft layer" of a scripted system as long as the system didn't spend very much time in the soft layer. But I would be very careful to avoid Python's considerable problems.

      Here are Python's main advantages:

      1. There are lots of Python programmers available to hire. There is no guarantee as to their quality, but they are there.

      2. There are lots of third-party Python libraries available to use. Again, there is no guarantee as to their quality, but they are there. (On the minus side, most third-party Python libraries are the enemies of robust software and kill any hope you had to use static analysis tools on your software.)

      3. Programmer performance, measured as the number of deployable well-tested features produced per unit time, is not too bad. It's not even close to the top, but it's not too bad.

      And... that's pretty much it, as far as I can tell.

      On point #3, I suspect that a lot of Python programmers feel more productive than they actually are. In a statically-typed language, there is a phase that programmers go through where they have finished writing some code, and now need to get the compiler to accept it. This feels unproductive, in the sense that you know what you meant and now you just need to convince the compiler.

      For a good type system, this is actually one of the most productive parts of programming, because you are fixing bugs that the compiler found for you. Hunting down a tricky bug feels productive in a way that fixing a compiler-checked type error does not, even though they are actually the same thing, the main difference being that the compiler found the bug instead of a customer.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    112. Re: Jesus Christ... by Pseudonym · · Score: 1

      More like "a plague o' both your houses". There are a lot of things to dislike about Python, but most of the criticisms of it are deeply ignorant.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    113. Re: Jesus Christ... by Pseudonym · · Score: 1

      Yes. I still use Perl as my go-to "little script to do one thing" language, but I wouldn't condemn anyone who preferred Python for that task.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    114. Re:Jesus Christ... by Anonymous Coward · · Score: 0

      Tell me about it. I know him socially. He got way the fuck too much attention from the mundanes when he wrote the cathedral and the bazaar, and decided that he's the second coming of Don Knuth or something.

    115. Re:Jesus Christ... by Tough+Love · · Score: 1

      There was a time period of half a year or so when the Linux kernel was compiled using C++. It bought worse optimization, much slower compilation, strange bugs. No actually tangible advantages. Finally, Linus reverted that decision.

      Wow, compelling story! It would be even more compelling if it were true. Link please.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    116. Re: Jesus Christ... by JesseMcDonald · · Score: 1

      Whitespace is good. Hell, Haskell is one of my favourite languages.

      Same here, but the way Haskell handles whitespace is a bit different from Python. In Python the whitespace is part of the syntax and there is no other way to achieve the same result. Haskell syntax, on the other hand, is really fairly similar to C—anything that takes a list of declarations (module/where/let), expressions (do), or patterns (case) is defined to surround the list with curly braces and separate items with semicolons. If you write it this way then whitespace is ignored. There is an optional rule that allows the braces and semicolons to be inserted automatically if they are omitted, and it is only in this case that whitespace becomes significant.

      The fact that Haskell does not require whitespace to be significant is useful, for example, when providing code samples in a forum which does not preserve leading indentation. Or, for that matter, any situation where you may need to fit a moderately complex piece of code on a single line.

      It helps that Haskell code is also less ambiguous than Python, so incorrect indentation tends to cause compile-time errors. I have seen too many Python programs where indentation was the only factor separating a correct program from one with valid syntax but incorrect runtime behavior.

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    117. Re: Jesus Christ... by suutar · · Score: 2

      so does a good carpenter when it's truly a shitty tool and there's no workaround.

    118. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Scary. I better get a python related catastrophe rider for my insurance

    119. Re:Jesus Christ... by Pinky's+Brain · · Score: 1

      I know the following is obvious, but somehow it seems to escape people, only a minority of bugs is exploitable to begin with ...

      It's not the amount of bugs which matter, it's the amount of potential exploits. All your bugs having to do with pointers were prime candidates for becoming an exploit, a language which rules them out can thus have a massive impact on exploits without affecting the number of bugs.

    120. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Holy hell. Who triggered the "you have no understanding" imbecile?

    121. Re:Jesus Christ... by Joce640k · · Score: 1

      C++ has all the bad parts from both C and Object-orienting with little added benefit. There's also a reason why for example the Linux kernel isn't written in C++ but C, and that is the memory management of C++ that isn't predictable for use in the kernel.

      No. The reason C++ isn't used for the kernel is that Linus Torvalds is a dolt.

      C++ can do anything that C can. You want to use malloc? Nobody's stopping you.

      std::vector will produce better, more reliable code though.

      The same goes for std::string vs. C string functions. Why would anybody but an idiot still be using C strings?

      --
      No sig today...
    122. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      I think you're discounting the fact that trivial data structures are generally slower than complicated ones. The only structures that are easy to write in C are arrays and linked lists, but those are only fast for small numbers of elements.

      Fancier structures like hash tables and binary trees are generally faster for larger numbers of elements (20-100 maybe), but since C doesn't provide a library for them, you have to really expend effort to use them. Due to the added overhead of memory management, the effort required to implement such structures is much more than it is in C.

      And strings? C-style strings don't have a count so you're constantly having to iterate them to figure out how long they are. Every time you call strcat() you have to read every byte of the destination string.

      I remember when Perl was at its heydey that it was not uncommon for Perl scripts to be faster than their C equivalents because hash tables and smart string handling were so idiomatic to the language.

      So really, the ease of using advanced data structures is probably a net benefit because it makes it possible to write more scalable algorithms with minimal effort. Is it also easy to do something stupid? Sure, but the benefits greatly outweigh the risks.

      dom

    123. Re:Jesus Christ... by Joce640k · · Score: 1

      There was a time period of half a year or so when the Linux kernel was compiled using C++. It bought worse optimization, much slower compilation, strange bugs. No actually tangible advantages.

      So instead of working on the C++ compiler, they did what...?

      C++ is tricky to get right in a kernel context because you cannot depend on garbage collection. When using something like STL, stuff gets scattered across more memory pools than desirable. Reallocation strategies have unknown semantics and timing.

      a) C++ doesn't have garbage collection.
      b) STL doesn't have to do reallocation, that's what the "reserve()" function is for.

      Basically the stuff that gets solved in a black box manner, quite a boon for application programming, is not viable in a kernel.

      There's nothing "black box" about C++ or STL. Everything is just as deterministic as C once you bother to learn it.

      --
      No sig today...
    124. Re: Jesus Christ... by Pseudonym · · Score: 1

      It helps that Haskell code is also less ambiguous than Python, so incorrect indentation tends to cause compile-time errors. I have seen too many Python programs where indentation was the only factor separating a correct program from one with valid syntax but incorrect runtime behavior.

      Oh, yes, that's a good point. Whitespace mistakes in Haskell are almost always caught by the compiler.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    125. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Your essentially describing the tragedy of the commons. Everyone selfishly overuses common resources.

    126. Re: Jesus Christ... by Neuronwelder · · Score: 1

      Wow, Thanks Pseudonyum (62607).. I'm overwhelmed by the programing languages you know, and your knowledge!! Thanks for the advice on Python and compiler evaluations! I'm keeping this conversation. Maybe I can grow with your evaluations.

    127. Re:Jesus Christ... by amorsen · · Score: 1

      It isn't a problem that different architectures have different ABIs. The problem was that different compilers, and even different versions of the same compiler, had different ABIs on the same architecture. Sometimes different enough to make linking fail, sometimes just different enough to make things break at runtime.

      --
      Finally! A year of moderation! Ready for 2019?
    128. Re: Jesus Christ... by piojo · · Score: 1

      Haskell and Python share the trait that one-liners are very hard to write. (Specifically, it's very hard to cram code into a shorter space for the purpose of copy/pasting or sharing it in a format intended to be copied/pasted.) This is something I despise about python. It's less restrictive in Haskell. I like to play with the REPL and test a lot of things very rapidly. If I can't define a full idea in one line, it plays havoc with command history, and forces me to use up half the screen to type a relatively small set of ideas.

      So if the limited and restrictive syntax is the least shitty thing about Python, I tremble to think about the really shitty parts. (Global Interpreter Lock? Not much of a problem for toy scripting, but you wouldn't want to write a real application in Python. Lack of any static checking? This one means you can never upgrade your libraries without testing each API call.)

      --
      A cat can't teach a dog to bark.
    129. Re:Jesus Christ... by phantomfive · · Score: 1

      The problem was that different compilers, and even different versions of the same compiler, had different ABIs on the same architecture.

      Is that not a problem anymore? I seem to remember visual studio stuff not linking to gcc stuff, although I haven't checked for a while.

      --
      "First they came for the slanderers and i said nothing."
    130. Re:Jesus Christ... by TheRaven64 · · Score: 1

      Any language feature can be abused, and C has exactly the same problem: macros can cause code bloat. Correctly used, templates let you provide abstractions that are then specialised and inlined and, after optimisation, become one or two instructions inline, where the C equivalent requires a real function call because it's having to handle the generic use cases in a single place.

      Oh, and your example of wanting to use == on strings is a good one. Look at the LLVM StringRef class for an example of how to do this sensibly. It defines a non-owning reference to a string, which is a char* and a length. It has a constructor that takes a const char*, and will generate the relevant memcmp / strcmp calls for comparisons. It's defined in a header and is always inlined, so (with optimisations enabled), StringRef(a) == StringRef(b) will compile to a pair of strlen calls (which would be optimised away for compile-time constant strings), and then a memcmp call (with the shortest length) if the lengths are not both 0. If you're mostly dealing with null-terminated strings, you can avoid the strlen calls by using an equivalent where the length is calculated lazily when required, so this use of == would generate the same code as the C version.

      Your argument that programmers don't think too hard about what their code is doing and should therefore use C seems quite horrifying.

      --
      I am TheRaven on Soylent News
    131. Re:Jesus Christ... by VirginMary · · Score: 1

      Except that C++ has several features that inherently make it hard to pick up a piece of code and understand what it does. Yes, it's very 'nice' that you can define a new version of the same function by varying its parameters - when done consistently within a well designed class library. But it's sheer laziness to refactor existing code by counting on that feature. Have pity on the poor schlub that's ultimately going to inherit your code and try to support it.

      To some extent, I think C++ is fine - as long as you code your application logic as if it were in C and restrict the C++'y stuff to the class libraries you use. That avoids the problem of programmers who barely understand what the C++ compiler is doing 'designing' classes that somehow magically work - most of the time.

      1. I don't see what function overloading has to do with class libraries. Also, I use that feature extremely sparingly. I would imagine that people use coding standards when working on any large project and it would be trivial to forbid that. That is hardly an argument against the use of C++. The closest I come to using something like function overloading is occasionally having a single default argument.
      2. Classes that magically work (All the time, of course!) are extremely useful and make code much shorter and far easier to understand. As with all languages, you have to understand the tools that you are using. The Linux kernel is full of hand-coded "virtual" functions, "destructors" and other simulated C++ features that would be more maintainable if coded in C++.

      Finally, who says that everything in C++ has to be in a class? C++ is not Java and does not have the single "hammer", the class. Therefore not everything looks like a nail! In my code only about 10% of the functions that I write are class member functions. Yes, I frequently use instances of classes that I wrote, but mostly in regular plain, old functions. OOP is one tool in a large C++ toolbox. Procedural, functional and generic programming are others and all have their uses.

      My top criteria are readability/maintainability and performance and not to use every nook and cranny of the C++ language as often as possible. The most esoteric feature that I occasionally use is probably defining my own iterators in classes that conceptionally can be viewed as some kind of container and, extremely rarely, a templatized class or function. I lead a team of developers that are far less experienced in C++ and pay attention to making sure that they can do code reviews of my code w/o asking me how something works most of the time. ;-)

      --
      When 1person suffers from a delusion,it is called insanity.When many people suffer from a delusion,it is called religion
    132. Re: Jesus Christ... by Hal_Porter · · Score: 1

      That'd be plausible if you architected your web app to concentrate the most performance critical parts into one or two modules. However I bet when people knock up a quick hack in Python most of them don't know/care what the performance critical parts are. So they're probably spread over the whole application.

      Realistically you'd be better off sticking a high performance cache in front of the server. That way you could serve a static version of the page to most people and only occasionally have the cache call the real server to update.

      Of course that would change the way the application worked -you'd need to warn people that their comments would only show up the static version of the page next time that is updated. Funnily enough Slashdot does this. Reddit doesn't.

      Then again they're doing a revamp of the code, so maybe that will be part of it.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    133. Re:Jesus Christ... by TheRaven64 · · Score: 4, Informative

      The big change is that there is now, for all *NIX platforms, a stable C++ ABI. The HP Itanium ABI was adopted largely as-is by all *NIX systems (with the slight exception of 32-bit ARM, which does exceptions slightly differently and handles pointers to members differently because the low bit in instruction pointers is already in use for thumb interworking). Variations between archs don't matter too much, but changes within an architecture are problematic because they mean that you can't define long-term-stable interfaces in terms of C++. On Windows, for example, all public interfaces are either C or COM because the MS compiler changes ABI across Visual Studio versions. Apple was bitten by this, because they defined kernel (IOKit) interface in terms of the gcc 2.95 ABI and had a lot of pain to move everything to the Itanium ABI (largely motivated by the fact that clang never supported the old ABI).

      On a related note, compilers are a lot better at optimising C++ now than they were 20 years ago. All of the companies that employ a lot of LLVM or GCC developers now have huge internal C++ codebases and care more about the performance of these than of their C code. This is a huge shift from 20 years ago, where C++ was a checklist feature for gcc (clang didn't exist) and no one really cared about C++ performance. 20 years ago, renaming a .c file to .cc and compiling it with gcc would often give you slower code. Now, it will give you exactly the same code and performance doesn't get worse as you use more C++ features. For example, both templates and lambdas rely on the inliner a lot and modern C/C++ compilers have tuned their inliners on this use case more than on common C idioms.

      In terms of language features, there are a few big ones. The first is lambdas. These can be used in a lot of places where you'd use macros and generate the same code, but be a lot more readable. The other large feature is the addition of move semantics. This is very important for kernel-style code, where you want to have fine control over memory ownership. Things like the standard library unique_ptr template give you a trivial way of expressing unique ownership in the code, in a way that can be transferred between threads, and compiles down to no code but statically checks that you've followed the correct discipline.

      There are a few other things that are pretty useful. Generalised constexpr means that you can write functions that should be evaluable at compile time and you can use a trivial template wrapper to force compile-time evaluation. This is very useful in code where you need to reason about run-time complexity, because you can guarantee that the compiler really will evaluate something at compile time or fail to compile.

      For the kernel, the improvements to enums in C++11 can also be useful. You can define enums that are actually type safe (i.e. they're not just the equivalent of #defines of int values and assigning the wrong enum is actually an error) and which have a storage type other than int.

      The Linux kernel has a really crappy way of handling memory orderings, which basically rely on having macros that map to the different memory barriers on Alpha and having programmers insert them in the right places, so it's not as well suited as something like FreeBSD to adopting C++11 atomics (FreeBSD provides functions that have almost identical semantics to the C++11 acquire-release model), but adopting it exposes a lot more opportunities for compiler optimisations. The current atomics are all implemented as asm volatile statements, which provide a full compiler barrier (the compiler may not move instructions from one side to the other, even if it would be safe to in the memory model). C11 also has support for this, but it's a really ugly copy and paste of the C++11 stuff to C11 and the standard ends up writing volatile in a bunch of places where it means _Atomic, so using them is painful.

      Range-based for loops don't give you anything other

      --
      I am TheRaven on Soylent News
    134. Re: Jesus Christ... by Hal_Porter · · Score: 2

      I remember having a PC running Windows and an x86 embedded system running VxWorks. Even though the disk and CPU were much faster on the PC the VxWorks system actually outperformed it for FTP and HTTP. VxWorks is a tiny, real time OS with a BSD like interface. It had zbuf TCP/IP, a very efficient cached file system and so on. No memory protection in the version we used so you had to be careful but it also meant it was fast as hell.

      VxWorks was not cheap but there was a time when it made sense for routers. You had to pay for a licence but that was offset by needing less flash and ram than an equivalent Linux box. And the hard real time nature of it made it great for embedded systems. Of course as time past the cost of flash and ram dropped and CPUs got faster. And of course there are excellent free router implementations. So my Asus router now runs Linux.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    135. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Python - for when you only have to run it once (or maybe twice) ;-)

      These discussions are tiresome. Different problems have different requirements. Different programming languages have their strengths AND weaknesses. There is a massive body of code written in C that some languages (C++, Objective C and some others) can access directly. This cannot be discounted. C / C++ are low level, and efficient. Compilation time is traded for execution speed. A good trade off for many situations

      Python has some good libraries. Itâ(TM)s also has a multiple personality issues (2.7 vs 3). It is an efficient way to write shorter programs to get results quickly, at the cost of slower execution time. A good trade off for many situations.

      So many of the programming language arguments follow this reusable pattern:

      void pontificate(std::string const& some_language, std::string const& pros, std::string const& cons)
      {
          std::shout âoeMy language of choice (= the one that I know) âoe some_language âoe is brilliant because âoe pros std::endl;

          std::ofstream(âoe/dev/nullâ) âoeMy language has these problems that I donâ(TM)t acknowledge: âoe cons std::endl;
      }

      If all you know is how to hammer, youâ(TM)ll see everything as a nail and break things. Use appropriate languages for their appropriate purpose at the appropriate time for the appropriate skill level of the developers, acknowledge the languagesâ(TM) strengths and weaknesses, donâ(TM)t jump on every bandwagon and for goodness sake donâ(TM)t be dogmatic.

    136. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Indeed. The "programmer's time is more valuable than computing time" mantra is only really true for a program that is only executed a few times at most.

    137. Re:Jesus Christ... by OffTheWallSoccer · · Score: 1

      Other than that, the most common programmer error is using uninitialized stack frame variables. Would it really be so much of a performance hit to have the compiler generate a call to zero out each new the stack frame on function entry. Perhaps with an 'I really care about performance here' option to not do it...

      Any good C compiler will let you crank up the warning level enough to catch these mistakes. If not, you can use lint.

      Would it really be so much of a performance hit to have the compiler generate a call to zero out each new the stack frame on function entry. Perhaps with an 'I really care about performance here' option to not do it...

      For any kind of performance path, yes, zeroing out the stack frame would be costly.

    138. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Abstract reasoning is inversely correlated with knowledge. People with the strongest reasoning have nearly all learned how to purposefully forget. Lots of knowledge negatively affects your working memory, and working memory is important while abstracting newly acquired knowledge. Lots of abstract "knowledge" is not an issue because abstract concepts are stored in spatial memory, which does not conflict with working memory.

      That's not to say that Pseudonyum has not stored all of those 60 languages as abstract concepts, letting auto-complete fill in the gaps.

    139. Re:Jesus Christ... by loonycyborg · · Score: 1

      There are some OS kernels written in C++, for example some generations of L4 microkernel. The reason Linux isn't rewritten in C++ because to fully take advantage of it will require a full rewrite anyway. Why not just migrate to L4?

    140. Re: Jesus Christ... by DrXym · · Score: 1
      Speed isn't always the primary concern. Stability, reliability, portability, ease of development and ease of can be far more important than raw speed. This is especially true in a lot of business software and middleware that powers websites, banks etc.

      Speed still remains a concern in games, video / audio capture, telemetry, databases, HMIs, industrial control, services / daemons etc. which tends to be referred to as systems programming. C and C++ still dominate in this space but I suspect Rust and Go will eat significantly into that.

    141. Re:Jesus Christ... by michael_wojcik · · Score: 1

      I will say that it is tedious to constantly be passing around the max size parameter to every little function

      It certainly is! And that's why C supports compound data types.

      because that's the only way for a C function to safely deal with pointer data

      True, if you have no idea how to use the language properly.

    142. Re:Jesus Christ... by Anonymous Coward · · Score: 0

      Wrong; When you program Arduino stuff it's in C++.

    143. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      It's getting closer... https://micropython.org/

      192KiB of RAM though. Even the European Space Agency is looking at using MicroPython in space!

    144. Re:Jesus Christ... by phantomfive · · Score: 1

      Cool, thanks for the informative post.

      --
      "First they came for the slanderers and i said nothing."
    145. Re:Jesus Christ... by Darinbob · · Score: 1

      I think the point I was trying to make is that many C programmers are conditioned to know that macros can be bloaty. Usually the programmer knows up front that speed or size is important. My experience is that many C++ programmers are conditioned to work fast, and not worry about size or speed because there's always a bigger and faster processor coming soon. I'm not trying to say that all the programmers are this way, but it's a distinct trend I've seen.

      I've seen the "one tool fits all" style of thinking in C++ a lot. Ie, if you've got std::map, then that's all you need. I saw someone implement something that should have just been a simple array lookup, a small fixed size array of 5 elements, which could have been done in plain C; but he used std::map for this which made it larger and slower and took more programmer time. Even std::vector would have been preferable. And the programmer knew that space was at a premium.

      I do like templates if used sparingly and not in an STL style where whole objects are copied into containers instead of just pointers or references. I've used templates that just provided pointer type safety with a more generic underlying library that took void*. I used to like the RogueWave C++ classes, until the STL took hold.

    146. Re: Jesus Christ... by Anonymous Coward · · Score: 1

      Not that guy and anon to preserve your troll moderation. Emerson oil and gas, Cobham, DO-178C fighter jets and trainers, and now components for satellites.

      The vast majority of the projects were all in C. Some assembly, some Ada, some C++, and some of the auxiliary engineers used matlab for various analysis tasks, but matlab has never made flight software on anything I've seen.

      No one writes C for embedded control systems,

      This is utter fucking bullshit and you should be ashamed of your ignorance.

    147. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      The kernel us a peculiar piece of software that might be better if with C over C++.

      But just recompiling it and expecting benefits makes 0 sense.
      C++ can be used as mostly just C as almost everything is an optional superset over C.
      But the advantages can only be had by restructuring the code to make use of C++ features. And C++ never promised to be faster than C (just samish when you stick to the C subset). The idea is to make huge codebases better maintainable by using superset features.
      A simple recompile does nothing except be a quick entry starting point.

      Also C++ allows for otional fine-grained control of memory management.
      Ã is easier for linking. Less worries about name-mangling and every compiler having its own special way to do that.

    148. Re: Jesus Christ... by HornWumpus · · Score: 1

      Why are kids so terrible at abstract reasoning?

      Abstract reasoning is also inversely correlated with self delusion. Self delusion is inversely correlated with knowledge.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    149. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      Self-delusion also has a direct correlation to being Zero_Kelvin, though.

    150. Re: Jesus Christ... by Anonymous Coward · · Score: 0

      No one writes C for embedded control systems, we let Simulink and Matlab handle that. (Rule of generation).

      A lot of important algorithms have no generated code in Matlab, for others the generated code is too slow, or doesn't let you optimize for power or area or to meet timing, or other requirements.

      We do lots of DSP. We write in C (specifically SystemC), Verilog, and VHDL. Matlab generated code is useless for our applications, though we will test algorithms in Matlab.

      All my non-theoretical DSP work in grad school was also done in C (this was for an embedded DSP processor).

      Not sure what world you are coming from, but your experience does not appear representative.

      Don't get me wrong, I like the fact that Matlab can generate code, and I'm sure it's useful in some situations, especially for novices, or folks doing really simple stuff that don't have the time to get into the details. At the same time, Matlab can be a crutch - and people can get so dependent on it that they don't have a clue how to do things themselves when they eventually move from toy problems to harder problems. If I was setting up a College EE program to teach DSP, I'd have people implement their own stuff to learn how to do it - they would understand the algorithms better.

    151. Re:Jesus Christ... by ebvwfbw · · Score: 1

      1. No strong typing.
      2. Pointers

      I've been programming in C for a few decades, and I've made plenty of mistakes over the years, but very few of them had anything to do with strong typing or pointers. Most of them are just logic mistakes that I could have made in any other language.

      ... Don't mean to put words into your mouth, however I think you could have continued -
      Using gdb and a debug session I could easily find and correct the error.

      My experience with gdb, truss, strace, etc I'm often able to debug other bad languages like java.

    152. Re:Jesus Christ... by Junta · · Score: 1

      Sure, but the vast vast majority of C libraries have the same pattern as memcpy, strncpy, and so on where there's a paramter, then a size_t..

      The fact I can make a typedef of a pointer and associated size_t is not much comfort when I'm dealing with dozens of external functions that are not so thoughtfully constructed.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    153. Re:Jesus Christ... by TheRaven64 · · Score: 1

      I think the point I was trying to make is that many C programmers are conditioned to know that macros can be bloaty. Usually the programmer knows up front that speed or size is important. My experience is that many C++ programmers are conditioned to work fast, and not worry about size or speed because there's always a bigger and faster processor coming soon. I'm not trying to say that all the programmers are this way, but it's a distinct trend I've seen.

      I think that's more a function of target rather than language. Programmers writing for resource-constrained environments quickly learn which language features consume those resources quickly. Even on big machines, instruction cache is a fairly scarce resource, so avoiding code size increases on hot paths is important.

      I've seen the "one tool fits all" style of thinking in C++ a lot. Ie, if you've got std::map, then that's all you need.

      I've seen exactly the same from C programmers. The 4BSD collections (now in Linux, *BSD, and Windows NT kernels) or the UT* ones are the solution to all problems. And that's not a bad thing if it's for prototyping.

      if you've got std::map, then that's all you need. I saw someone implement something that should have just been a simple array lookup, a small fixed size array of 5 elements, which could have been done in plain C; but he used std::map for this which made it larger and slower and took more programmer time. Even std::vector would have been preferable. And the programmer knew that space was at a premium.

      The nice thing about using a std::map here is that, if you use a typedef or an equivalent using directive, you can replace it with a class that wraps std::array and does linear search without modifying any of the code that uses it. In C, this is much harder to do without your code becoming ugly.

      I do like templates if used sparingly and not in an STL style where whole objects are copied into containers instead of just pointers or references. I've used templates that just provided pointer type safety with a more generic underlying library that took void*. I used to like the RogueWave C++ classes, until the STL took hold.

      STL was an SGI product, but I'll assume you mean the C++ standard library. There's nothing that requires copying in any of the standard library classes. you need to think about ownership if you use them to store pointers (or references), but you can also use them to store smart pointers and with unique_ptr you get ownership semantics along with no copying (and no run-time overhead). The addition of move semantics in C++11 also means that you can move objects, rather than copying them, so if your object is a small structure containing pointers to something large then the cost of the move is cheap.

      --
      I am TheRaven on Soylent News
    154. Re:Jesus Christ... by TheRaven64 · · Score: 1

      One thing I forgot to mention: move semantics now mean that it's possible to sensibly use generic containers without having copying semantics. One of the problems with C++98 was that you ended up with a lot of copies for safe code. If you want to put objects into something like a std::vector or std::map, then you had to either copy, or use raw pointers and worry about memory management. With move semantics, you can either move the objects (e.g. for a string you copy the pointer to the buffer and the length and invalidate the old one), or you can use smart pointers. This alone makes C++11 a far better language than C++98 - lots of things that should have always been easy to express now actually are.

      --
      I am TheRaven on Soylent News
    155. Re: Jesus Christ... by HornWumpus · · Score: 1

      'Premature optimization is the root of all evil.'

      If you know the code is performance critical, it's _not_ premature to think about efficiency during the initial pass.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    156. Re:Jesus Christ... by HornWumpus · · Score: 1

      The 'Owl' argument: That word/phrase doesn't mean what it means, it means what I meant it to mean when I wrote it.

      The generic phrase you are looking for is 'memory management'.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    157. Re:Jesus Christ... by HornWumpus · · Score: 1

      If C++ programmers were trying to 'work fast' they would be Java, C#, PERL or Python programmers. Unless you're comparing them to assembly programmers.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    158. Re:Jesus Christ... by Anonymous Coward · · Score: 0

      This guy wrote a pong game, including sprites, in under 1KB
      Everything about your post makes me think that you read a book and some blog articles but have absolutely no idea about actually writing code in any of the languages you mentioned.
      I'm really disappointed that you got modded up. Shame on you /. for modding up this cargo-cult name-dropping bullshit.

    159. Re:Jesus Christ... by Anonymous Coward · · Score: 0

      amorsen was talking about Linux. You have the reading comprehension of a gnat.

    160. Re: Jesus Christ... by david_thornley · · Score: 1

      However look at Reddit. They originally wrote in Lisp, and then rewrote it in Python. And it's still slow enough it goes down regularly.

      There are efficient Lisp compilers out there that will produce fast code.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    161. Re:Jesus Christ... by david_thornley · · Score: 1

      RAII memory management is not really manual. Manual memory management includes deciding where to write "free()". RAII means not writing "free()" or "delete", but deciding the lifetime based on the sort of smart pointer used.

      It's generally not as good for memory as generational garbage collection and the like, but it's usable for all kinds of resources. C#, for example, is generally better for handling memory, and not as good for handling database connections or file handles and the like.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    162. Re:Jesus Christ... by david_thornley · · Score: 1

      Some languages make things clumsier than others. For example, if you want all array references checked in C, you need to write the checks. In C++, use a vector and either use .at() instead of [] or derive your own and swap .at() and operator[](). You're a lot more likely to get the C++ version right, and keep it right through maintenance.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    163. Re: Jesus Christ... by Pseudonym · · Score: 1

      That's not to say that Pseudonyum has not stored all of those 60 languages as abstract concepts, letting auto-complete fill in the gaps.

      After about 20 or so they start to run together, it's true.

      But if it helps, here's how I justify that claim.

      I speak Java. I know Java well enough that I could write, say, a version 7 compiler in Java without any difficulty. What I don't know: Swing, Spring, Ant, Maven... all that stuff.

      So while I can say with a good conscience "I speak Java", what I can't say with a good conscience is "I am a Java programmer".

      It's also worth pointing out that a dozen of those languages are not really something you can put on a CV. For example, I can speak, and I can articulate most of the differences between, a few of the David Turner-family languages (Miranda, Miracula, Orwell, etc). All of them except Haskell are now extinct.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    164. Re: Jesus Christ... by thegreatbob · · Score: 1

      Same reason I stayed away from Java and .Net for a very long time after their inception; I guess I just have a hard-on for native machine code, but then again, I was using a heap of PIII 866/1GHz machines for most personal purposes up until 2013 when I finally entered the modern age (first time in a decade I actually owned current-gen hardware; I had been using Athlon XP stuff until ~2009, but managed to kill my better motherboard in a wiring oops, and had my cat kill my good CPU by stepping on a power strip during an OC validation).

      Watching those PIIIs fall over (largely due to a whopping 512MB of memory, which was fortunately RAMBUS) trying to run various Java and .Net applications was no fun, let alone the full-blown IDEs.

      Then I got over it a few years ago, and started using C# as my go-to for banging out little one-off Windows GUI-oriented utilities. Python has generally been my go-to for quick command line-oriented stuff. They work well enough for the tasks I've put them to, if only because I've never involved myself in anything that was computationally intensive on the front end (most processing, in my use cases, winds up being done in SQL anyhow).

      --
      There is no XUL, only WebExtensions...
    165. Re:Jesus Christ... by Stephen+Battleware · · Score: 1

      The Flat Earth Society *calls* it a fact, yes. Is it an actual fact though?

  2. What's the point of this? by Anonymous Coward · · Score: 0, Offtopic

    The entire purpose of this seems to be fundraising. Next week it'll be Java because another friend is working on a Java successor and needs funding...gtfo.

  3. "Cx"? Uh... by K.+S.+Kyosuke · · Score: 3, Funny

    How exactly is it pronounced? Cause I can already see other language designers claiming "Our language is better than Cx!"

    --
    Ezekiel 23:20
    1. Re:"Cx"? Uh... by dwywit · · Score: 1

      It's pronounced "goat-see"

      --
      They sentenced me to twenty years of boredom
    2. Re:"Cx"? Uh... by Mal-2 · · Score: 1

      How exactly is it pronounced? Cause I can already see other language designers claiming "Our language is better than Cx!"

      If it's making the reference I think it is, it would be "C double sharp".

      --
      How is the Riemann zeta function like Trump rallies? Both have an endless number of trivial zeros.
    3. Re:"Cx"? Uh... by K.+S.+Kyosuke · · Score: 4, Funny

      So you play Cx if you want the D? Kind of the same thing.

      --
      Ezekiel 23:20
    4. Re:"Cx"? Uh... by Mal-2 · · Score: 5, Interesting

      They're only equivalent in 12-tone equal temperament, or on a keyboard instrument that only has 12 notes per octave (equally spaced or not). Western music also maps unambiguously (though not always pleasantly) onto 19- and 31-tone equal temperament, where a double sharp is most definitely not the same as the next whole tone up because a "whole tone" might be 5 minimum increments (this is the case in 31-ET, the better-sounding of the two in most cases), and a semitone just two. This would leave Cx a full 1/31 of an octave flatter than D natural. (And this is why we even have double sharps and double flats, to keep the theory clean because we haven't always mapped everything onto 12-ET and may not always do so in the future.)

      --
      How is the Riemann zeta function like Trump rallies? Both have an endless number of trivial zeros.
    5. Re:"Cx"? Uh... by Anonymous Coward · · Score: 0

      C Sharp is a dumb name for a language it's not even a symbol on the keyboard. It's C octothorpe.

    6. Re:"Cx"? Uh... by BlackHawk-666 · · Score: 1

      It looks more like it should be pronounced Cux (cucks).

      --
      All those moments will be lost in time, like tears in rain.
    7. Re:"Cx"? Uh... by Anonymous Coward · · Score: 0

      It should be pronounced "chex," as in does some minimal checks for type safety.

    8. Re:"Cx"? Uh... by Pseudonym · · Score: 1

      I thought you were joking, but then I noticed that ESR is promoting it and now I'm not so sure.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    9. Re:"Cx"? Uh... by joeslugg · · Score: 1

      NERRRRD!!

      (I kid - my son is a jazz guitarist - he pulls this stuff all the time.)

    10. Re:"Cx"? Uh... by Anonymous Coward · · Score: 0

      cocks

    11. Re:"Cx"? Uh... by Anonymous Coward · · Score: 0

      A semitone in 31-ET is three increments, not two.

    12. Re:"Cx"? Uh... by Mal-2 · · Score: 1

      Sorry about that, I get the specifics of 19 and 31 backward for some reason -- like which one has "small" semitones and which "large".

      This means Cx is 39 cents sharper than D natural, rather than flatter.

      --
      How is the Riemann zeta function like Trump rallies? Both have an endless number of trivial zeros.
    13. Re:"Cx"? Uh... by Anonymous Coward · · Score: 0

      There you are spamming amazon affiliate links with yet another fake account, you revenue stream hogging disgusting fat sexist tube of lard, Christopher Dale Reimer!

      You can be sure I will be watching this fake account too. I know this is you because you told me you were working on your freepass 11 file server and you are so dumb that you can't even masquerade yourself properly.

      Now, I told you I was out of meds last week and you didn't even care to contact me you lazy fucker.

      How many times do I have to express the emergency of the situation??????

      The python click script you wrote for my pheromone revenue stream web site suddenly stopped to work!!!!!!

      You fucking incompetent python script writer!!!

      When it works, I get 4000+ clicks a day on my pheromone revenue stream web site but only 5 or 6 without it!!!!

      Now, it seems like you dont care and that you have abandoned me you heartless fucking pig!

      Bonus:
      Here is a story that creimer told me when convincing me what a hard life he had:

      The tree was him and the tree knot was his butt hole!

      So, his uncle packed his fat ass with lard and with his cock! Not that it makes much of a difference but anyway, there it is!

      Signed:
      The girl that used to love you and now hates you, burn in hell where you belong you sexist pig!

    14. Re:"Cx"? Uh... by Anonymous Coward · · Score: 0

      There you are spamming amazon affiliate links with yet another fake account, you revenue stream hogging disgusting fat sexist tube of lard, Christopher Dale Reimer!

      You can be sure I will be watching this fake account closely too. I know this is you because you told me you were working on your freepass 11 file server and you are so dumb that you can't even masquerade yourself properly.

      Now, I told you I was out of meds last week and you didn't even care to contact me you lazy fucker.

      How many times do I have to express the emergency of the situation??????

      The python click script you wrote for my pheromone revenue stream web site suddenly stopped to work!!!!!!

      You fucking incompetent python script writer!!!

      When it works, I get 4000+ clicks a day on my pheromone revenue stream web site but only 5 or 6 without it!!!!

      Now, it seems like you dont care and that you have abandoned me you heartless fucking pig!

      Bonus:
      Here is a story that creimer told me when convincing me what a hard life he had:

      The tree was him and the tree knot was his butt hole!

      So, his uncle packed his fat ass with lard and with his cock! Not that it makes much of a difference but anyway, there it is!

      Signed:
      The girl that used to love you and now hates you, burn in hell where you belong you sexist pig!

    15. Re:"Cx"? Uh... by MrKaos · · Score: 1

      How exactly is it pronounced? Cause I can already see other language designers claiming "Our language is better than Cx!"

      They were considering Cmin for a while until they really thought about it.

      --
      My ism, it's full of beliefs.
    16. Re:"Cx"? Uh... by NewYork · · Score: 1

      Sucks :)

  4. broke if beg then by Anonymous Coward · · Score: 0

    I wrote a FORTH interpreter in T-SQL, and you don't see me asking for money.

  5. OK. by msauve · · Score: 0

    If it's all that and more, call it "D." (or E, because D is already taken.

    --
    "National Security is the chief cause of national insecurity." - Celine's First Law
    1. Re:OK. by Anonymous Coward · · Score: 1

      After "C" the next language name is.... "P". This follows the BCPL heritage.

    2. Re:OK. by Misagon · · Score: 1

      ... and the "D" you linked to is only one of several C-like languages named "D".
      There are also multiple languages each named "E" and "G".

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
    3. Re:OK. by Anonymous Coward · · Score: 0

      And F!
      Pity cause now they can't say "We migrated our code from C and now it's F'd"

    4. Re:OK. by Misagon · · Score: 1

      ... and I have come across a rare dialect of Haskell named "H" intended for embedded systems, but there may of course be more.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
    5. Re:OK. by david_thornley · · Score: 1

      Wasn't there a "J" language which was based on APL?

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    6. Re:OK. by Anonymous Coward · · Score: 0

      https://en.m.wikipedia.org/wiki/J_(programming_language)

      Come on, thornley... it's like you're not even trying. :-P

  6. Let's re-invent hammers and nails by bettodavis · · Score: 3, Insightful

    Just because they will be different, funnier and hipster than regular ones.

    We are in [current year] for goodness sake!, modernity must be made of fads that beget novelty from novelty's sake.

    Also boring, regular hammers and nails have been more or less as they are for millennia for some unknown reason (functionality? familiarity?, experience? previous use cases?, what's that?).

    The time to change those old tools is really long overdue.

    1. Re:Let's re-invent hammers and nails by Mal-2 · · Score: 1

      We have "modern hammers", and they are used quite a lot in construction. Ever heard of a nail gun? Sure, they haven't totally rendered hammers obsolete (for one thing, they suck at removing nails) but neither will Cx completely replace C.

      --
      How is the Riemann zeta function like Trump rallies? Both have an endless number of trivial zeros.
    2. Re:Let's re-invent hammers and nails by Hylandr · · Score: 1

      You're still not going to use a nail gun if you don't have the nails. C is the nails.

      --
      ~ People that think they are better than anyone else for any reason are the cause of all the strife in the world.
    3. Re:Let's re-invent hammers and nails by geoskd · · Score: 4, Insightful

      Sure, they haven't totally rendered hammers obsolete (for one thing, they suck at removing nails) but neither will Cx completely replace C.

      Cx, (or Go or Rust, or any other fad damned thing) will not replace C. The reason is simple. C is perfectly fine for most of what it is used for, and there is a huge amount of legacy code (plus toolchains, IDEs, and much much more) that exist in the C domain. Its not good enough that the Next Big Thing (tm) be better than C, it has to be better enough to warrant the extra cost of converting existing C code, C toolchains, C environments and the simple fact that there are uncounted millions of programmers out there who, almost without exception, know C. If I am going to start a new project (or more importantly, if I am going to pay someone else to start a new project) that falls into one of the areas that are traditionally C strongholds (such as embedded systems programming, kernel level systems design, device drivers, etc...) you can pretty well bet that it is going to be C that is used. Anyone trying to talk me out of it had better have a damn good reason, since I know the risks of using C, and I have no idea what the risks are of using XYZ new fad.

      --
      I wish I had a good sig, but all the good ones are copyrighted
    4. Re:Let's re-invent hammers and nails by 0100010001010011 · · Score: 1

      Simulink has been dominating embedded for some time now. It just generates C and you can continue to use your tool chains.

    5. Re:Let's re-invent hammers and nails by bettodavis · · Score: 1

      Embedded or DSPs?

      Because "embedded" as in nearly invisible computers with small OSes or even barebones runtimes are still pretty much C's domain. The first compiler most of this systems get is a C compiler, usually gcc.

    6. Re:Let's re-invent hammers and nails by religionofpeas · · Score: 2

      How does Simulink perform when you have to write a USB device driver ?

    7. Re:Let's re-invent hammers and nails by Pinky's+Brain · · Score: 2

      "C is perfectly fine for most of what it is used for"

      Except for anything with complex I/O for which security is relevant. Complex I/O such as a network interface or an USB port for instance, although frequently even text input has proven been too complex to implement securely in C.

    8. Re: Let's re-invent hammers and nails by Anonymous Coward · · Score: 0

      I'm sure you can list all USB drivers written in other languages that are secure.

    9. Re:Let's re-invent hammers and nails by AmiMoJo · · Score: 2

      What are the use cases for a type safe version of C anyway?

      On the embedded side you can't live without being able to do type punning and other unsafe but extremely common techniques.

      On the desktop side people have realized that big C apps are very hard to secure (hi Adobe) and maintain and moved on to other languages like C# or just gone full node.js.

      In the middle you have things like operating systems, drivers, stacks etc. I guess they might benefit a little from being type safe, but do we actually have a problem with them not being so? Most of the issues seem to be related to lack of defence in depth and half baked ideas like running the USB stack in the kernel.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    10. Re:Let's re-invent hammers and nails by 0100010001010011 · · Score: 2

      Because "embedded"

      Embedded as in the chips in vehicles: trains, planes and automobiles.

      The Freescale PPC e200 chips and the Renesas RH850 line.

      usually gcc.

      Not a single chip I've worked on has had a GCC compiler.

      It's either WindRiver's Diab or Greenhills. Former used on the mars rover.

    11. Re:Let's re-invent hammers and nails by serviscope_minor · · Score: 1

      Not a single chip I've worked on has had a GCC compiler.

      The Atmel AVR line is supported by GCC, as are a lot of ARM chips from the Cortex M0 core upwards. There's also still some MIPS based MCUs out there which support GCC. GCC also supports a bunch of different 16 bit MCUs like the PIC24 series and TI's MSP430.

      Mostly though I've used IAR (because of the 8051) and have the scars to show for it.

      --
      SJW n. One who posts facts.
    12. Re:Let's re-invent hammers and nails by 0100010001010011 · · Score: 1

      That's nice, but doesn't invalidate what I said.

      Not a single chip I've used in an industrial setting has had a GCC compiler. To my knowledge GCC doesn't have any ISO26262/IEC61508/DO-178 certifications meaning you're not going to be using it anywhere that is life or death.

    13. Re:Let's re-invent hammers and nails by xtal · · Score: 5, Insightful

      C, Ethernet, and RS232/485 will be with us long after humanity has gone extinct. Possibly after the heat death of this universe.

      There should be a name for technologies that achieve that level of entrenchment.

      --
      ..don't panic
    14. Re:Let's re-invent hammers and nails by serviscope_minor · · Score: 1

      Except that's not really what you said either. It wasn't clear (I reread your post) that you were werer referring to a specific part of the embedded space, rather than one realtively narrow aspect.

      Not a single chip I've used in an industrial setting has had a GCC compiler.

      So? I gave a list of ones that do. You know, like the MSP430, AVR, PIC24, PIC32 (MIPS), most ARM and so on and so forth.

      --
      SJW n. One who posts facts.
    15. Re:Let's re-invent hammers and nails by Anonymous Coward · · Score: 0

      I'm curious as to what language you think network drivers and USB drivers are actually written in.

    16. Re:Let's re-invent hammers and nails by Anonymous Coward · · Score: 0

      The Freescale PPC e200 chips and the Renesas RH850 line.

      usually gcc.

      Not a single chip I've worked on has had a GCC compiler.

      GCC has long had extensive support for PowerPC, including the e500 family. Renesas distributes gcc toolchains that support RH850.

      It's either WindRiver's Diab or Greenhills. Former used on the mars rover.

      Do you have some first hand knowledge in this area because the software for the Mars Exploration Rover (Spirit and Opportunity) was originally developed with Tornado 1.0.1 (a special release). Tornado 1.0.1 (1997) predates Wind Rivers' acquisition of Integrated Systems (Diab) by two years. I know from first hand experience that Tornado 1.x was shipped with gcc toolchains (including support for embedded PowerPCs).

    17. Re:Let's re-invent hammers and nails by munch117 · · Score: 1

      Embedded as in the chips in vehicles: trains, planes and automobiles.

      Dear automobile industry:

      If you're not even using C yourselves, will you stop foisting MISRA on the rest of us.

      It's making us misrable.

      Kind regards, the people still using C.

    18. Re:Let's re-invent hammers and nails by Darinbob · · Score: 1

      I seriously would like to swap some projects from C to a simplified C++ (no generics, no exceptions). This would add some very important features:
      - strong typing
      - better code organization (via classes and namespaces).

      Actually, I'd be very happy if the devs just started using C99 or C11 standards... :-)

    19. Re:Let's re-invent hammers and nails by 0100010001010011 · · Score: 1

      If you're not even using C yourselves,

      They are. Turns out Simulink writes perfectly valid MISRA code.

      One of ESR's 17 Rules of Unix is the "Rule of Generation", states that:

      Developers should avoid writing code by hand and instead write abstract high-level programs that generate code. This rule aims to reduce human errors and save time.

      It's making us misrable.

      How dare they force you to write better code.

    20. Re:Let's re-invent hammers and nails by JesseMcDonald · · Score: 1

      To my knowledge GCC doesn't have any ISO26262/IEC61508/DO-178 certifications meaning you're not going to be using it anywhere that is life or death.

      Sorry, but that simply isn't true. I regularly work on DO-178 DAL-A software for the aerospace industry—primarily flight deck operating systems for everything from business jets to the Boeing 787 and the Airbus A380—and every platform I've worked on over the last decade has employed a version of GCC. True, GCC was not developed with DO-178 certification in mind. That doesn't matter, though, because GCC is not the software that is being certified for use on the aircraft. The released binaries will be subject to requirements-based testing, object code analysis, link analysis, and other verification steps which together demonstrate that the final product works as intended, regardless of any issues which may or may not exist in the compiler.

      BTW, you mentioned the PowerPC e200 as a chip you've used—there is, in fact, a GCC-based toolchain from Freescale which targets that microarchitecture. My own experience is more along the lines of the PPC 7447 CPU and the PPC 440H6 and e500 SoC cores, and as I've said these were used exclusively with derivatives of GCC.

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    21. Re:Let's re-invent hammers and nails by munch117 · · Score: 1
      When you're code-generating, why would you care about which warnings are generated? geoskd was talking about writing C source code, and I replied in that vein.

      "Developers should avoid writing code by hand and instead write abstract high-level programs that generate code."

      "Abstract high-level programs" is code too. Whatever abstraction level you choose to work at, you're still writing code.

    22. Re:Let's re-invent hammers and nails by 0100010001010011 · · Score: 1

      That doesn't matter, though, because GCC is not the software that is being certified for use on the aircraft.

      From my understanding, with ISO 26262/IEC61508 your entire toolchain needs to be certified. http://www.validierungssuite.c...

      there is, in fact, a GCC-based toolchain [nxp.com] from Freescale which targets that microarchitecture.

      Neat. Looks like they just released that this year. Probably because it was hard to get people on their platform if they also had to buy a compiler just to try it out.

    23. Re:Let's re-invent hammers and nails by Anonymous Coward · · Score: 0

      Classes lead to worse code organisation, even when implemented perfectly for a given project.

    24. Re:Let's re-invent hammers and nails by michael_wojcik · · Score: 1

      Cx, (or Go or Rust, or any other fad damned thing) will not replace C.

      Certainly not any time soon. History suggests that once a programming language reaches a certain point of saturation, its lifetime is going to be very long. FORTRAN (now Fortran), LISP, and COBOL both still have large active bases and new development.

      There have been other attempts at "better C", such as D. I don't hold out any hope for this Cx. Sure, go ahead and create another language; it's a useful mental exercise if nothing else. But it's not going to displace C.

    25. Re:Let's re-invent hammers and nails by Anonymous Coward · · Score: 0

      ooooooor, WindRiver's VxWorks?

    26. Re:Let's re-invent hammers and nails by Joey+Vegetables · · Score: 1

      Respectfully disagree that legacy infrastructure is necessarily an impediment to the uptake of a "C replacement." As the article noted, any potential "C replacement" will have to interoperate seamlessly with C for a very, very long time. To the extent that C toolchains will be able to interoperate with "replacement C" toolchains and vice versa. This is a high bar, and just one of many, but it is one that Go, Rust, maybe Cx (whatever that is - hadn't even heard of it previously), may one day prove to overcome.

    27. Re:Let's re-invent hammers and nails by HornWumpus · · Score: 1

      Object onion or spaghetti? Bad coders can produce crap with any tool.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    28. Re:Let's re-invent hammers and nails by david_thornley · · Score: 1

      I once saw a book on carpentry that was sufficiently old that it predated widespread use of electric drills, so the brace-and-bit was listed as an essential tool. In real life, I haven't seen a brace-and-bit since I was young, back in the middle Cretaceous. Nowadays, the variable-speed cordless drill has removed a lot of uses from the screwdriver. Carpentry tools do improve.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  7. Not gonna happen by Cthefuture · · Score: 5, Insightful

    For as long as we're running Von Neumann architecture machines then C and C++ will continue to dominate anything and everything that needs to be high performance and/or low-level/hardware access.

    Because if you don't need C/C++ then you're scripting or whatever much-higher-level language stuff. Languages like Go and Rust fit somewhere in between... no-man's land, where they're doomed to get lost like every single previous attempt at such languages.

    --
    The ratio of people to cake is too big
    1. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Have you seen how much crap is added to C++? It's a bloated, complex beast full of hacks to fix other hacks. C++ needs to die... it's worse than perl.

      C, OTOH, is small and elegant, with a few flaws here and there.

    2. Re:Not gonna happen by K.+S.+Kyosuke · · Score: 1

      Because if you don't need C/C++ then you're scripting

      Yes, APL and the like totally qualify... But then again, APL and the like would profit from better architectures than what C runs on, so maybe you're right.

      --
      Ezekiel 23:20
    3. Re:Not gonna happen by roca · · Score: 5, Interesting

      This is totally wrong. The runtime and compiler models for Rust are pretty much exactly the same as for C. People are running Rust code on 8-bit microcontrollers: https://github.com/avr-rust/ar.... You can write kernels and device drivers in Rust and people are.

      This is all less true about Go because it needs a garbage collector.

    4. Re:Not gonna happen by roca · · Score: 5, Informative

      C has critical flaws everywhere: insane preprocessor, no module system or namespaces, all kinds of obscure undefined behaviors, no way to express important safety properties like "pointer is never null", weak type system that can't express tagged unions or tell the difference between data and code pointers (https://lkml.org/lkml/2017/9/25/708), broken type syntax where it's impossible for humans to write complex types, security-bug-prone standard library APIs like sprintf and strcpy, standard library missing basic stuff like hash tables, inability to expose basic library features like ref-counted pointers and growable arrays ergonomically, ...

      I could go on and on.

    5. Re:Not gonna happen by K.+S.+Kyosuke · · Score: 1

      Except for running on 8-bit microcontrollers, why is it "less true about Go because it needs a garbage collector"? Why should it be less true for Go when it worked for Oberon?

      --
      Ezekiel 23:20
    6. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Oberon

      Who is Oberon?

    7. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Wrong. C++ has matured over the past decade. You probably think back 20 years ago when it was indeed a mess. Where've you been all this time.

    8. Re:Not gonna happen by geoskd · · Score: 2, Informative

      Have you seen how much crap is added to C++? It's a bloated, complex beast full of hacks to fix other hacks. C++ needs to die.

      I live and breathe C++. Its a perfectly fine language. Except a few minor quirks, the language behaves quite nicely. Perhaps you are basing your experience from the STL nightmare that existed circa 2000. Even Microsofts STL implementation is now reasonably compliant with the standard, and the standard is quite good. If you are continuing to have trouble with the language, then I would submit that you are probably not a very good programmer, and the behavior of the language (which requires you to have a good grasp on how computers actually work), is probably mysterious to you, but each and every behavior of C++ is there for a very good reason. Other languages hide these ugly details from you, and the very act of hiding these details means that the language is sub-par because the devil is in those very same details. I will grant you, C++ has a steeper learning curve than most languages, but the performance of the code you can write in C++ is vastly superior to all languages except maybe C. There are constructs I can create with template metaprogramming that even C cannot match the performance of. Proper use of the STL allows you to minimize the need for memory management, but like any C derivative, the option of going all pointer-fu is there if you need it.

      In all, C is a language for professionals, C++ is a language for experts. Everything else is for amateurs.

      --
      I wish I had a good sig, but all the good ones are copyrighted
    9. Re:Not gonna happen by DCFusor · · Score: 2

      I agree C++ is worse than my usual fave (perl). But only in the hands of idiots. Both have "too many features" - so don't use them stupidly. With discipline you can write good code in almost any language but Java...

      --
      Why guess when you can know? Measure!
    10. Re:Not gonna happen by David_Hart · · Score: 4, Informative

      I will grant you, C++ has a steeper learning curve than most languages, but the performance of the code you can write in C++ is vastly superior to all languages except maybe C. There are constructs I can create with template metaprogramming that even C cannot match the performance of. Proper use of the STL allows you to minimize the need for memory management, but like any C derivative, the option of going all pointer-fu is there if you need it.

      In all, C is a language for professionals, C++ is a language for experts. Everything else is for amateurs.

      I'm guessing that you are only referring to higher level languages by this comment. But just for the the record, Assembler gives you better performance than C and C++.

    11. Re:Not gonna happen by Bruce+Perens · · Score: 2

      Duff's device. Always my favorite for explaining how broken C was. And I got to work with Duff at Pixar.

    12. Re:Not gonna happen by Bruce+Perens · · Score: 4, Interesting

      But just for the the record, Assembler gives you better performance than C and C++.

      It hurts me that most programmers will go through their entire career without being able to learn or write microcode.

      Obviously, that gets you much closer to what the CPU actually does, and all of the details of its various units, the instruction pipeline and its stages and timing, and the I/O pipeline and its timing.

      Writing bit-slice microcode for the old Pixar image computer, I once a whole day to get the last tick out of a loop. All of the code fit on the termial screen, but there was a lot of parallel timing going on. I did that for one relatively general loop, and someone else at Pixar wrote an entire compositing system out of versions of that loop.

    13. Re:Not gonna happen by ArchieBunker · · Score: 1

      Read up on the AS/400 architecture and you'll find IBM has eliminated most of those problems.

      --
      Only the State obtains its revenue by coercion. - Murray Rothbard
    14. Re: Not gonna happen by Anonymous Coward · · Score: 0

      Isn't he the guy who's skull got crushed by the mountain?

    15. Re:Not gonna happen by Misagon · · Score: 4, Insightful

      I would say that before C++11, all C++ code could be compiled into the equivalent C code without loss of performance .. which is also how the very first C++ compilers worked.
      In C++11 came move-semantics and better synchronisation primitives that C did not have. In C, you may be able to use intrinsics for synchronisation and atomic access though but move-semantics even for simple value types can improve low-level performance.

      While I am also primarily a C++ programmer, I do mostly agree with the AC.
      Most of the so called "idioms" in C++ are what would be called "hacks" in any other programming language.

      C is more readable than C++. In C++, you often have to spend more mental energy trying to find out what exactly is going on in other people's code.
      For instance, because what looks like one type of call might actually be something else involving operators that takes place between types higher up in the class hierarchies, and what looks like value-semantics may actually be pointer semantics because references are used.
      You are often completely dependent on the IntelliSense (or whatever it is called) in the code editor you are using to not get lost.

      Next, shared_ptr needs multiple objects for a friggin pointer and C++ lack the concept of "borrowing" which I would say is absolutely essential in a language with unique pointers.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
    16. Re:Not gonna happen by Anonymous Coward · · Score: 0

      It hurts me that most programmers will go through their entire career without being able to learn or write microcode.

      It seems like every generation of programmers gets further and further away from how the machine actually works. That is going to bite all our asses someday, and probably has done so already quite a few times.

    17. Re:Not gonna happen by PhrostyMcByte · · Score: 5, Insightful

      C has critical flaws everywhere...

      For what C is used for, none of those are even approaching "critical". A lot of criticism leveled at C and C++ these days tends to come from high-level devs who simply don't have enough context for what someone could want in an improved C. As someone who clearly has a better understanding, you could do better to rise above hyperbole.

      At this point with C, there are very few things everyone can get behind as an improvement. A lot of people like it for its small non-magic surface area, and something like e.g. tagged unions would even be too much syntax sugar. I think if people wanted a broadly more powerful language they'd move right to C++, but they don't -- so we need to look at why that is, and maybe we'll have a better idea of what a "new C" could possibly look like.

    18. Re:Not gonna happen by Anonymous Coward · · Score: 0

      So use C++.

    19. Re:Not gonna happen by labnet · · Score: 1

      Well, use the right tool for the job.

      We use C for most of our embedded projects (sometimes c++ in more complex projects).
      qt (C++ + a framework) for gui applications (both embedded and pc)
      c# for in house tools (like ATE, and business logic tools)

      Then there are some dregs written in Python or whatever an engineer wants for a quick tool.

      --
      46137
    20. Re:Not gonna happen by John+Da'+Baddest · · Score: 1

      Perl 6 is hardly for amateurs, though it seems to be more for academics than practitioners.

    21. Re:Not gonna happen by John+Da'+Baddest · · Score: 2

      s/Assembler gives you/Assembler potentially can give you/

      Assuming you can get the job done in the first place with it.

    22. Re: Not gonna happen by PatrickNarkinsky · · Score: 1

      Except the unsafe package gives access to traditional memory management without need for gC (in Go.)

    23. Re:Not gonna happen by Anonymous Coward · · Score: 0

      C++ has grown over the years. All that mess from 20 years ago is still there though. It's impossible to remove as that would break lot's of old code.

      So now, C++ is an even bigger mess than it was 20 years ago.

      I don't believe there is a single person who understands all of C++'s features and how they interact with each other.

      It will be an even bigger mess with the new standard features coming in 2020 or so.

    24. Re:Not gonna happen by Pseudonym · · Score: 1

      C++ is a pretty good language if you ignore the object-oriented parts, this is true. But it's reached a bizarre steady state where the job of each new standard is to fix the glaringly obvious problems in the previous standard.

      It's still my primary language though.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    25. Re:Not gonna happen by Pseudonym · · Score: 3, Insightful

      Most of the so called "idioms" in C++ are what would be called "hacks" in any other programming language.

      That's true in any programming language, by the way. Even Haskell, probably the most pure language that is used in practice, has a bunch of "idioms" to make up for the fact that it doesn't have mutable state. Almost any other language would consider that a hack.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    26. Re:Not gonna happen by roca · · Score: 1

      For kernels you want predictable latencies, robust OOM handling, and synchronous and predictable memory reclamation. You don't want the complexity of a modern concurrent GC, and you don't want the throughput/memory overhead penalties of a naive GC.

      People have tried to write kernels in GC languages before and it hasn't been adopted. See SPIN (Modula-3). Microsoft invested a ton of effort writing Windows code in C# for Vista that never shipped because they couldn't make it robust in low-memory conditions. See also https://www.cs.virginia.edu/~b....

    27. Re:Not gonna happen by roca · · Score: 2

      C++ is an insane language that no-one truly understands.

      Here's an example: according to the Standard, you are not allowed to call push_back() on a vector>. Can you explain why? I'll post the answer as a separate comment on this article.

    28. Re:Not gonna happen by roca · · Score: 1

      Er, that got mangled. It's a map < T unique_ptr < U > >

    29. Re:Not gonna happen by CrybabiesArePeople · · Score: 0

      Yes, I would think that we will end up with high level scripting languages, Javascript and whatnot, for most applications, and C/C++/assembly routines for the other stuff, such as embedded, high performance etc...Plus a few specialized languages in some areas (Ada?). But "in-between" languages, and I include Java, will have no reason to exist.

    30. Re:Not gonna happen by roca · · Score: 1

      For a lot of what C is used for, security and reliability are important, and C's (and C++'s) deficiencies are critical by any definition. See http://robert.ocallahan.org/20... for more of my thoughts on that.

      When security and reliability truly don't matter, C's deficiencies are only critical if you care about wasting time and money developing in a language without any modern productivity features.

      (Note that developers tend to underestimate the importance of security and reliability of their code. If you create a library and release it, you never know when someone's going to use it on untrusted input or as a component of an important system.)

    31. Re:Not gonna happen by Pinky's+Brain · · Score: 3, Interesting

      Same can be said for PHP and webcoders who keep writing their own SQL code and input sanitizers from scratch. They can make money, so it's not a critical problem for them. Just for society as a whole.

      As Marcus Ranum once said : "Not only do we still have buffer overflows, I think it's safe to say there has not been a single category of vulnerabilities definitively eradicated."

      Thanks to people like you.

    32. Re:Not gonna happen by Kjella · · Score: 4, Interesting

      If you are continuing to have trouble with the language, then I would submit that you are probably not a very good programmer, and the behavior of the language (which requires you to have a good grasp on how computers actually work), is probably mysterious to you, but each and every behavior of C++ is there for a very good reason.

      Seriously, this level of fanboi-ism gets modded up? To shoot fish in a barrel the zero-terminated C strings was made to save one length-prefix byte and has cost the world a bazillion times more than the Y2K problem and every non-C programming language has abandoned it. But okay, that's an inherited problem. My biggest gripe with C++ is that it's an OOP language without an object oriented memory model, unless you religiously follow RAII as a pattern or trace every execution path when the code changes you will have crazy leaks all over as you create and destroy objects. Why? Because it was originally just a razor thin convenience layer on top of C and for a long time there was no smart pointers or they were in the Boost library and not part of the language itself.

      Part of this is that it's not explicit when any library is processing its own data that it'll clean up and when it's returning a new object to me that it expects I'll clean up. Read the documentation, I suppose but an explicit passing of ownership not just reference would be so much better. My second biggest gripe is that there's no safer and easier object oriented communication protocol than using pointers everywhere, which very easily leads to a dangling reference somewhere and leads to much tighter class integration than a publisher/subscriber system. I've written C++ but mainly using the Qt library which is much, much closer to what my ideal OOP language would be like because one mismatched signal-slot doesn't bring the house down, even though the macros and the meta-object compiler (MOC) seemed like a hack around C++'s limitations.

      I have the feeling C++ is in no man's land. New mid-level code is written in C#/Java/Swift, high level in Javascript/Perl/Python/PHP/R and so on, low level code in C/assembler. There are a lot of huge, existing C++ code bases so it's not like you'd run out of work but I don't really see who'd start a new project from scratch in C++ today. Particularly since there's no major platform pushing it, on Windows it's C#, on Mac/iOS it's Swift and in the enterprise and on Android it's Java, the embedded market is C and the web is pushing Javascript everywhere: But who's pushing for more C++? Almost nobody, as far as I can see. It's just a complex mix of low-level and high-level concepts thrown in a blender which in theory lets you do many things but in practice is unwieldy for almost anyone.

      I suppose you could call that an expert's tool. But sometimes I feel it's like crossing a canyon on a tightrope. The C/assembler guy brought rock climbing gear, he's got a long and tedious climb up and down ahead of him but he's chiseling out steps and building a series of bolts to climb by. The mid/high end guy starts looking for a bridge. What the C++ guy does is difficult and impressive, yet not very productive for anyone else and the next guy also needs to be an expert tightrope walker. You say it's a language for experts, who can afford an expert for every change? How do you become an expert, if a junior C++ developer will fail spectacularly? What I'm saying is that just because it's challenging doesn't mean you're an expert, it just means you're doing it the hard way.

      --
      Live today, because you never know what tomorrow brings
    33. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Its a perfectly fine language.

      LOL, BS.

      Except a few minor quirks,

      Few? Minor? LOL

      the language behaves quite nicely.

      LOL, is that why we have dozens of other languages since then?

      Nobody uses C++ except in this case:
      a) Your software is huge (lot of lines of code)
      AND
      b) Speed and real-time behavior is critical.

      Java would've made C++ obsolete, if it wasn't so bloated.

      Other languages hide these ugly details from you, and the very act of hiding these details means that the language is sub-par because the devil is in those very same details.

      You can always write small portions (less than 1%) of the app in assembly which can knock the socks off C/C++ and give you low level access to ugly details. But I'll bet many of you hardcore C++ programmers are scared of assembly.

      If you are continuing to have trouble with the language, then I would submit that you are probably not a very good programmer,

      How very typical C++ guy of you. C++ is for posers who write clever, convoluted hacks to show great they are and how inferior others are. Good solutions are almost always simple and elegant; a C++ solution is neither.

    34. Re:Not gonna happen by rl117 · · Score: 1

      shared_ptr doesn't actually need multiple objects. Take a look at make_shared, which does a single allocation.

    35. Re:Not gonna happen by Anonymous Coward · · Score: 0

      How is that C's fault? Ok, so the language doesn't hold your hand to make sure you don't write bad code, it is still possible to write good code. It is also very easy to write unsecure code in non-C languages.

      I think the issue is not so much C or C++ deficiencies as it is improperly trained developers. There are some really nice tools like Valgrind available during development to monitor for the primary security issues like buffer overruns, re-using freed memory, etc. It isn't the fault of the language if the developers don't use them.

      Consider the OWASP top 10 lists from 2013 and 2017, notice how little it has changed? And if you dig you'll find that 2010 was much the same. So the same security vulnerabilities are in the top 10 list year after year. Is that because the language being used won't allow the developers to fix them or is it more likely because more people move into development without receiving any real training or understanding of how to write secure code, regardless of the language?

      If your goal is to get to the other side of the gorge then a 4x4 timber laid across the gap will solve the problem. If the goal is to get to the other side with no chance of falling into the gorge then you build a bridge compete with guard rails and a net hanging below it. But if you fall off the 4x4 timber while crossing, that isn't the log's fault.

    36. Re:Not gonna happen by Anonymous Coward · · Score: 0

      It seems like every generation of programmers gets further and further away from how the machine actually works. That is going to bite all our asses someday, and probably has done so already quite a few times.

      Same could be said of society as a whole... With ever more complex technology, we're all just end-users now.

    37. Re: Not gonna happen by Anonymous Coward · · Score: 0

      Well, you got my attention. I've long preferred a mix of C and Python (with some ARM & AVR assembler thrown in). Rust looks reasonable from a first glance at the example code. Might give it a shot....

    38. Re:Not gonna happen by AmiMoJo · · Score: 1, Interesting

      insane preprocessor, no module system or namespaces, all kinds of obscure undefined behaviors, no way to express important safety properties like "pointer is never null", weak type system that can't express tagged unions or tell the difference between data and code pointers (https://lkml.org/lkml/2017/9/25/708), broken type syntax where it's impossible for humans to write complex types, security-bug-prone standard library APIs like sprintf and strcpy, standard library missing basic stuff like hash tables, inability to expose basic library features like ref-counted pointers and growable arrays ergonomically, ...

      No offence but I can tell you are not a C programmer.

      The great thing about C is that you can fully understand every aspect of it. It's not like C++ where it's overly complex to the point that few people know all its features and behaviours. In C with a few years of experience and study you can know everything there is to know.

      There are no obscure undefined behaviours, only well documented ones. You can easily express that pointers should not be null through asserts and common extensions (e.g. GNU's __attribute("no-null")). C supports unions, and it's weak type system is what makes it great for low level development - you just have to get into the mindset of data being bits and bytes, not some abstract and opaque box.

      The standard libraries are a bit crap, I'll give you that. There are things like Boost if you want more, but the lack of things like hash tables in the base language is because those things would make it hard to port and run on low resource systems.

      I think you using the wrong tool for the job. C isn't designed to do those things you talk about, because they come with overhead and C is a system programming language. Any "replacement" for C is going to have to work in environments with memory measured in bytes. It's going to have to support stuff like full static allocation. What you want is something more like C# or Java.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    39. Re:Not gonna happen by AmiMoJo · · Score: 2

      But just for the the record, Assembler gives you better performance than C and C++.

      Eeehh... kinda. A skilled assembler programmer can usually out-optimize the compiler over smaller sections of code and simplistic, but on larger projects or complex CPUs the compiler usually wins. For example, most modern CPUs are superscalar, pipelined, do out-of-order execution and have large caches. It's pretty difficult for a human to optimize code for those things better than a good compiler can.

      On microcontrollers it's a different story of course.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    40. Re:Not gonna happen by Anonymous Coward · · Score: 0

      For what C is used for, none of those are even approaching "critical".

      Have the past few decades of security vulnerabilities completely passed you by? Yes, these are critical issues.

    41. Re:Not gonna happen by serviscope_minor · · Score: 1

      Eeehh... kinda. A skilled assembler programmer can usually out-optimize the compiler over smaller sections of code and simplistic,

      A large number of the optimizations were made available in C with the restrict keyword. C++ doesn't officially have it except all the major compilers implement it.

      --
      SJW n. One who posts facts.
    42. Re:Not gonna happen by religionofpeas · · Score: 1

      To shoot fish in a barrel the zero-terminated C strings was made to save one length-prefix byte

      A maximum string length of 256 would be very painful if you routinely deal with longer strings.

      And you have to consider that when C was developed, some computer hardware had 6, 7, 8 or 9 bit bytes.

    43. Re:Not gonna happen by Anonymous Coward · · Score: 0

      > Java would've made C++ obsolete, if it wasn't so bloated.

      Also known as "Java is a failure".

      Also performance matters, since software is built in layers. Software development is full of people like you, and it shows in every shitty slow desktop app and "web app" written in a single-object CRU(D optiona). model, and large installs which have moved the complexity from an app to collections of random microservices and downloading shit du jour from external repositories.

    44. Re:Not gonna happen by Chris+Mattern · · Score: 1

      Um, AS/400 (or System i as it got renamed) was discontinued almost ten years ago. How is it relevant to anything?

    45. Re:Not gonna happen by Anonymous Coward · · Score: 2, Insightful

      No offence but I can tell you are not a C programmer.

      The great thing about C is that you can fully understand every aspect of it.

      When I hear someone say that I know someone who hasn't been keeping up with the standard. You are probably still stuck at ANSI C.

    46. Re:Not gonna happen by Anonymous Coward · · Score: 0

      >insane preprocessor
      it's basically unrelated string replacement language. you could literally replace cpp invocations with clever sed scripting in your toolchain and it would still compile.
      >no module system
      none needed, since it can be easily provided by external, 3rd party tools, such as cpp
      >or namespaces
      on one had it could be useful, on the other hand look at c++ demangling hell. fuck that, i prefer to isolate my "namespaces" to separate libs.
      >all kinds of obscure undefined behaviors
      uh-oh, someone doesn't read the standard and just goes with their "common sense"!
      >no way to express important safety properties like "pointer is never null"
      you can do the same thing your favourite language's compiler does and check either statically or in runtime. you are basically moaning that low-level language doesn't do things for you that a higher-level language does.
      >weak type system
      somewhat valid criticism
      >that can't express tagged unions
      yeah, instead you have to typedef an enumed type and an union in a struct and check them yourself, just like your favourite language's compiler does. how barbaric!
      >tell the difference between data and code pointers
      depends on architecture, actually. the standard itself warns that data pointers and function pointers could be very different things. maybe you're referencing hacks that rely on undefined behaviour made by programmers with dim knowledge of c?
      >broken type syntax where it's impossible for humans to write complex types
      are you referring to complex numbers or to the complexity of types? because neither is a valid criticism. just fucking imagine the type you want to write and keep it in your head as you program. or if you can't, open a relevant header in a new vim window! christ, how do you find yourself in a new codebase anyway?
      >security-bug-prone standard library APIs like sprintf
      how is that the language's fault? there are multiple libraries that do those things securely!
      >standard library missing basic stuff like hash tables
      you can include 3rd party ones easily. in contrast with your favourite language, the standard library doesn't force you to use their ideas.
      >inability to expose basic library features like ref-counted pointers and growable arrays ergonomicall
      sorry, your inability to expose such apis.

      tl;dr: you are full of shit.

    47. Re:Not gonna happen by Kjella · · Score: 1

      A maximum string length of 256 would be very painful if you routinely deal with longer strings.

      You already spend a byte on the null terminator. One more would give you 256*256 = 65k length strings or 32k with a high bit to indicate you should read more length bytes first.

      --
      Live today, because you never know what tomorrow brings
    48. Re:Not gonna happen by Anonymous Coward · · Score: 0

      I think you're getting close to the meat of this. Does there really need to be a "standard" low-level/bootstrap language in the first place? Even if there doesn't, why not just create or improve upon a major OS with one of these wonderful C alternatives?

    49. Re:Not gonna happen by religionofpeas · · Score: 1

      Hmm... first you said you wanted one byte, and now you want two bytes, or magic bits. Doesn't seem like a well thought out proposal. What about alignment, or endianness, or non-8 bit systems, or cases where 64k strings aren't long enough ? No matter what you choose, you're going to have unhappy people.

    50. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Yes to this. High quality compilers are likely able to produce better code for non-trivial programs than can a human writing assembler by hand.

    51. Re:Not gonna happen by Anonymous Coward · · Score: 0

      It wasn't discontinued -- just renamed again .

      The relevance is that it solves the safety problems. Since it's object-oriented (the hardware itself) it knows the difference between code and data. You can't try to execute data, overrun buffers, and so on. Well, maybe you can try, but you can't succeed.

      dom

    52. Re:Not gonna happen by Chris+Mattern · · Score: 1

      You were imprecise. You said AS/400 when you meant OS/400. OS/400 is still around. The AS/400 hardware it used to run on was discontinued almost ten years ago, as I said. You seem to be under the impression that OS/400 still runs on hardware designed specifically for it, which it does not; since the discontinuation of AS/400 hardware, it runs the same Power processor servers that AIX uses.

    53. Re:Not gonna happen by Anonymous Coward · · Score: 0

      People have written these things in brainfuck too. Doesn't mean it's an intelligent thing to do.

    54. Re:Not gonna happen by Anonymous Coward · · Score: 0

      I was going to say this as well. As languages create an ever larger gap between the hardware and the programmer, people lose understanding. They don't know how or why something works, so when it breaks or doesn't perform properly, they don't know how to fix it.

      This applies to more than just programming languages. Look at cars. Mechanics are facing an increasingly more complicated product every year. In some cases, they have to make calls to manufacturers to find out how to repair components of the vehicle that used to be standard or never existed in the past. We can no longer repair many consumer electronics due to the miniaturization scale, which used to be a great learning avenue for people to get into the tech industry. Too many devices are becoming black-box and while we're still gaining knowledge, it's been concentrated into small areas, while the general public is losing knowledge.

      I'd say it's no coincidence that depression, stress, alcoholism, and suicide levels keep going up. The technology that is supposed to make our lives easier is ironically adding too much complication.

    55. Re:Not gonna happen by mark-t · · Score: 1

      Or, you could use the lowest 7 bits of an initial byte to represent length, and use the high bit in a length byte to indicate that there is an additional length byte after this one. There is no upper limit on length in this case, just as with a null terminated string, and as an absolute worst case, it takes only one more byte to represent a given length than the number of bytes that a binary representation of that length would ordinarily fit into, but even for string lengths of 128 to 255, which is where it has the overall worst impact, this is still only a 1% increase in storage overhead.

      Of course, even this tiny overhead may not be worth it for the additional benefit of just being able to store a null character inside of string. You have to weigh the needs of the application against this.

    56. Re:Not gonna happen by PhrostyMcByte · · Score: 1

      To me, a C replacement needs a handful of things: portability, stability (language-wise), low-level hardware access, performance, and small size (both in terms of language and compiled code).

      I'm all for a replacement being a safer-by-default language. The restriction on that, of course, being that I can also write unsafe code when I deem necessary and without jumping through hoops.

      C++ absolutely fails the small size requirement, but in terms of safety I think it is on better ground: modern C++ practices are very much focused on easy to implement zero-cost abstractions that make code not only safer but more flexible.

    57. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Now every function that iterates over a string has gotten more complicated. Does this string have a length that fits into 8 bits, 16 bits, 32 bits, or maybe even 64 bits?

      The guys who invented 'C' tried to keep code simple.

    58. Re:Not gonna happen by serviscope_minor · · Score: 1

      C is more readable than C++. In C++, you often have to spend more mental energy trying to find out what exactly is going on in other people's code.

      I disagree. In C, perhaps the indidual details are clear enough, but the overall question of "what is this code trying to achieve" is buried nuder heaps of trivia.

      Compare a bunch of maths code written in Eigen versus written in C. The Eigen code is much, much clearer.

      --
      SJW n. One who posts facts.
    59. Re:Not gonna happen by Anonymous Coward · · Score: 0

      I could go on and on.

      Of course you can, but you aren't offering an alternative which means that you know that the alternative you are thinking about doesn't cover the same use cases and have so many other issues that it is easily disregarded.

      If you want to be taking seriously when criticizing something, put your neck out and say what the better option is.

    60. Re:Not gonna happen by serviscope_minor · · Score: 1

      Er what? I read the additional post and (though it appears you're missing a comma), you're trying to push_back into a map. Of course you're not allowed to, such an operation doesn't really make sense for a map at all, because it would have to invent a key for you.

      --
      SJW n. One who posts facts.
    61. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Nothing in C forces you to write code like that. The big difference is that you can do it in C while other languages doesn't support it at all which means that you have to use whatever method that languages uses to call code written in C or assembly when you need the kind of performance that would justify loop unrolling.

      A language is pretty bad if you have to use another language to solve certain issues.

    62. Re:Not gonna happen by serviscope_minor · · Score: 1

      ? To shoot fish in a barrel the zero-terminated C strings was made to save one length-prefix byte and has cost the world a bazillion times more than the Y2K problem and every non-C programming language has abandoned it.

      Including, to a large extent except where it ineteracts with other languages, C++. std::string can store nulls quite happily. You can even write std::string literals with embedded nulls now, e.g.:


      string s = "abc\000def"s;

      I'll grant that the interaction with C-style strings is annoying, but these days you can deduce the size of a C-style string literal at compile time anyway, so you can get the size and not use null termination (that's how std::string literals work).

      My biggest gripe with C++ is that it's an OOP language

      It's not realy an OO language though. It's a multiparadigm language which supports object orientation.

      unless you religiously follow RAII as a pattern or trace every execution path when the code changes you will have crazy leaks all over as you create and destroy objects.

      It's not very hard to religiously follow RAII fortunately. Basically if you forget what you know about C, and never write malloc() or new(), the you're fine. These days doing RAII everywhere is much easier than not. And as a bonus, you won't leak resource handles either.

      The main thing about C++ is that it has a direct memory model so you have to think about ownership.

      Why? Because it was originally just a razor thin convenience layer on top of C and for a long time there was no smart pointers or they were in the Boost library and not part of the language itself.

      Well yes, that's C++'s biggest curse and its bggest plus point. Chances are without it it would never have caught on. But with it, we have the current mess.

      Part of this is that it's not explicit when any library is processing its own data that it'll clean up and when it's returning a new object to me that it expects I'll clean up. Read the documentation, I suppose but an explicit passing of ownership not just reference would be so much better.

      You can certainly write bad libraries in C++. If something wants to hand data over to you, it should probably either return something by move (like returning a std::vector from a function) or a unique_prt.

      My second biggest gripe is that there's no safer and easier object oriented communication protocol than using pointers everywhere

      Not sure precisely what you mean: I rarely write OO code in C++, and by that I mean derivation with virtual functions and etc.

      There are a lot of huge, existing C++ code bases so it's not like you'd run out of work but I don't really see who'd start a new project from scratch in C++ today.

      Depends what you're writing. GCC recently undertook the effort of porting to C++ from C. Personally, unless I'm targeting a microcontroller with no C++ compiler, I'd not use C for any project no matter how level. Even attiny supports C++, so below that there's only really the smallest PIC10F and some 4 bitters.

      Many large complex codebases are written in C++ for a reason. If you were writing a web browser from scratch these days you'd probably pick C++ or Rust (if you're Mozilla) because there's not a lot of choice really. C requires too much micromanagement and nothing else has the performance.

      Almost nobody, as far as I can see. It's just a complex mix of low-level and high-level concepts thrown in a blender which in theory lets you do many things but in practice is unwieldy for almost anyone.

      Just many performance systems. As you mention, a lot of stuff is written in JavaScript now, but what are the best performing JavaScript VMs written in? What would YOU write a VM in?

      You also mention Java. What are all the top performing JVMs written in? I have to specify that since IIRC Davlik is/was written in C but the performance has historically been much worse than OpenJDK, and anyway they've mov

      --
      SJW n. One who posts facts.
    63. Re:Not gonna happen by jittles · · Score: 1

      I have the feeling C++ is in no man's land. New mid-level code is written in C#/Java/Swift, high level in Javascript/Perl/Python/PHP/R and so on, low level code in C/assembler.

      Seriously, this level of fanboi-ism gets modded up? Apple has yet to release a single version of Swift that hasn't included breaking changes from the previous version. As in, you can't even compile your code anymore kind of breaking changes. What professional would recommend a language that is constantly breaking itself? The only serious people that use Swift are those who work for Apple - they're forced to. Anyone else who uses Swift is either drinking too much Kool-Aid or a hobbyist.

      And yes I am aware that they provide a refactor tool that fixes most compatibility issues. But it doesn't fix them all and there still is not ABI compatibility after 4 releases.

    64. Re:Not gonna happen by phantomfive · · Score: 1

      Where can you go to write microcode if you're not working for Intel or Atmel?

      --
      "First they came for the slanderers and i said nothing."
    65. Re:Not gonna happen by phantomfive · · Score: 1

      Even Haskell, probably the most pure language that is used in practice, has a bunch of "idioms" to make up for the fact that it doesn't have mutable state. Almost any other language would consider that a hack.

      Ah, this is the best thing I've read all week, thanks. :)

      --
      "First they came for the slanderers and i said nothing."
    66. Re:Not gonna happen by phantomfive · · Score: 1

      You already spend a byte on the null terminator. One more would give you 256*256 = 65k length strings or 32k with a high bit to indicate you should read more length bytes first.

      If you're obsessing that much about bytes in small strings, you don't even need to use that much. Use a single byte for length. Then if the length is equal to 255, look for another two bytes at that point.

      --
      "First they came for the slanderers and i said nothing."
    67. Re: Not gonna happen by Anonymous Coward · · Score: 0

      His point still stands. Why are you attaching the fringes of what he said.

    68. Re:Not gonna happen by djinn6 · · Score: 1

      Is there a thing that runs on a computer that couldn't be converted to assembly?

    69. Re:Not gonna happen by djinn6 · · Score: 1

      on larger projects or complex CPUs the compiler usually wins. For example, most modern CPUs are superscalar, pipelined, do out-of-order execution and have large caches. It's pretty difficult for a human to optimize code for those things better than a good compiler can.

      Do you have anything to back that up? Like an experiment? Or maybe a project that converted from assembly to C and gotten faster?

    70. Re: Not gonna happen by Chris+Mattern · · Score: 1

      His point was the AS/400 architecture, to use his exact words. A point he then reinforced by stating that the way that the problems were eliminated was "the hardware itself", when the hardware itself in in fact no longer in use. I fail to see how this is continuing to stand.

    71. Re:Not gonna happen by Bruce+Perens · · Score: 3, Interesting

      Anyone with a gate-array development board can design a CPU these days, and there are Open Source designs with Open Microcode. Here is the microcode source for RISC-V.

    72. Re:Not gonna happen by Yosho · · Score: 1

      Here's an example: according to the Standard, you are not allowed to call push_back() on a map<T, unique_ptr<U> >. Can you explain why? I'll post the answer as a separate comment on this article.

      C++ has a lot of problems, but if you think that being unable to "push_back" on to a map is one of them, the real problem is that you weren't paying attention during your data structures class.

      --
      Karma: Terrifying (mostly affected by atrocities you've committed)
    73. Re:Not gonna happen by paavo512 · · Score: 1

      To shoot fish in a barrel the zero-terminated C strings was made to save one length-prefix byte and has cost the world a bazillion times more than the Y2K problem and every non-C programming language has abandoned it. But okay, that's an inherited problem.

      Seriously, where do you see zero-terminated C strings in C++? It's not an inherited problem, it's a compatibility feature when interfacing C code.

      My biggest gripe with C++ is that it's an OOP language without an object oriented memory model, unless you religiously follow RAII as a pattern or trace every execution path when the code changes you will have crazy leaks all over as you create and destroy objects.

      No, C++ is not an OOP language (it just supports it to some extent), and yes, you need to follow RAII throughout and that's the one single most major strength of the language!

      Particularly since there's no major platform pushing it, on Windows it's C#, on Mac/iOS it's Swift and in the enterprise and on Android it's Java, the embedded market is C and the web is pushing Javascript everywhere: But who's pushing for more C++? Almost nobody, as far as I can see.

      That's a major point in favor of C++. It won't go away the next year because some company has decided to switch their preferred framework to some new strangely named new thing, or the language somehow gets sold to a megacorp who really does not care about it.

      You say it's a language for experts, who can afford an expert for every change? How do you become an expert, if a junior C++ developer will fail spectacularly? What I'm saying is that just because it's challenging doesn't mean you're an expert, it just means you're doing it the hard way.

      Not all software needs to be written in C++. But there are a lot of things which can be and are written in C++, including interpreters for all those new fancy languages.

    74. Re:Not gonna happen by Anonymous Coward · · Score: 0

      To shoot fish in a barrel the zero-terminated C strings was made to save one length-prefix byte and has cost the world a bazillion times more than the Y2K problem and every non-C programming language has abandoned it. But okay, that's an inherited problem.

      Seriously, where do you see zero-terminated C strings in C++? It's not an inherited problem, it's a compatibility feature when interfacing C code.

      Seriously?

      The expression "String" in C++ means the address of a zero-terminated character array. "String" + "String" is an error rather than concatenation.

      String literals in C++ are addresses of zero-terminated C strings rather than a C++ string type.

    75. Re:Not gonna happen by munch117 · · Score: 1

      [...] or tell the difference between data and code pointers (https://lkml.org/lkml/2017/9/25/708)

      Data and code pointers are distinct types in C. They are not required to be the same size or convertible to each other.

      That gcc doesn't even warn about the conversion is poor quality of implementation. But strictly speaking it's not a C language issue.

    76. Re:Not gonna happen by AmiMoJo · · Score: 2

      No, it's just that optimizing assembler requires a detailed understanding of the operation of the CPU. Back in the day we had tables of instructions with execution times, memory access requirements and the like. As machines developed it got harder, you had to consider DMA memory cycles for other hardware, then caching, burst accesses, pipelining etc.

      Once you get to large, multi level data and instruction caches, plus out of order superscalar execution, and a large variety of them, it becomes very hard for a human to handle. There are exceptions, the most common being vector instructions. But competing with a compiler that has a model of a complex CPU is pretty hard.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    77. Re:Not gonna happen by serviscope_minor · · Score: 1

      For as long as we're running Von Neumann architecture machines then C and C++

      We're not though, at least not just: many microcontrollers (e.g. PIC and AVR) use a Harvard architecture. Also, modern high performance CPUs are also probably closer to Harvard than Von Neumann (performance wise) in that the CPU has separate data busses to the instructions and data in L1 cache. It's more like Von Neumann after that though.

      Languages like Go and Rust fit somewhere in between... no-man's land, where they're doomed to get lost like every single previous attempt at such languages.

      Is rust somewhere in between? It has much the same machine model as C and C++.

      --
      SJW n. One who posts facts.
    78. Re:Not gonna happen by roca · · Score: 1

      > How is that C's fault?

      This is like saying that there's nothing wrong with a car that has dodgy brakes and no seatbelts or mirrors. After all, it's still possible to drive safely if you try hard enough.

      Properly training developers and using tools like Valgrind/ASAN etc does not prevent the critical security bugs that are prevented by safe languages. I've worked with elite C/C++ developers at Mozilla and Google, who use those tools and a lot more, yet such bugs are regularly discovered in shipping code. Here's another take on this: https://lwn.net/Articles/73545...

      OWASP is about vulnerabilities in Web applications, practically none of which are written in C or C++. If they were, then OWASP would include bugs like use-after-free and buffer overflow.

      A lot of issues with Web application security are because of the dynamically typed languages used, which are a whole different issue. It's certainly not the case that every language other than C is great for security.

      If the bridge can be built for about the same cost as the 4x4, why not build the bridge? As a user I'd certainly rather have the bridge.

    79. Re:Not gonna happen by roca · · Score: 1

      C++ is certainly better for safety in some ways, if only because you have ergonomic dynamically-sized arrays and smart pointers. However C++ has even more crazy undefined behaviors, is vastly more complex, and the safety benefits of smart pointers are overrated --- it's still very easy to have use-after-free bugs in "modern C++", and some of the new features are actually making things worse. See https://github.com/isocpp/CppC... for example.

    80. Re:Not gonna happen by mbkennel · · Score: 1

      > but the performance of the code you can write in C++ is vastly superior to all languages except maybe C.

      If you do not need substantial byte manipulation, Fortran will be faster still and more naturally parallelizable.

    81. Re:Not gonna happen by roca · · Score: 1

      > No offence but I can tell you are not a C programmer.

      Been programming in C since the 1980s. 20 years industrial C++ experience, most of it working on Gecko which is a multimillion-line C++ project. PhD in computer science from Carnegie Mellon. Mozilla Distinguished Engineer.

      > In C with a few years of experience and study you can know everything there is to know.

      Well I guess I'm good to go then.

      > There are no obscure undefined behaviours,

      Really, so when these MIT researchers write "Unfortunately, the rules for what is undefined behavior are subtle" and "tricky", you think they're just idiots?
      https://people.csail.mit.edu/n...

      Unions impose no relationship between the variants and the tag, and are therefore bug-prone.

      Boost is a C++ library. Are you confused?

      > Any "replacement" for C is going to have to work in environments with memory measured in bytes.

      I agree. I use Rust as much as possible now, and it can target 8-bit microcontrollers, so we're good. I don't want C# or Java (although they're fine for many use-cases, as is Go).

    82. Re:Not gonna happen by roca · · Score: 1

      I'll be happy to revise my opinion of C when your superior implementation is available.

      Implementation quality is highly relevant to the quality of the language. Anyway, in C's case very few of the issues are actually fixable by improving the implementation, at least without breaking most existing C code.

    83. Re:Not gonna happen by roca · · Score: 1

      Slashdot mangled my comment and my attempt to fix it was unclear.

      The problem is that technically you can't call push_back on a vector < map < T, unique_ptr < U > > >

    84. Re:Not gonna happen by munch117 · · Score: 1

      C compiler development has a cultural problem: Compiler developers see it as their task to squeeze out every last cycle at any cost, not caring that the result becomes much more fragile. I've always wanted a compiler that tried to diagnose undefined behaviour instead of exploiting it, but noone seems to be selling one.

      Lint and similar tools will give you the warning, trivially. There really is nothing in the language that makes issuing that warning hard. It's someone's deliberate choice.

    85. Re:Not gonna happen by AmiMoJo · · Score: 1

      > There are no obscure undefined behaviours,

      Really, so when these MIT researchers write "Unfortunately, the rules for what is undefined behavior are subtle" and "tricky", you think they're just idiots?

      Those two statements are not contradictory. I'd question their description of them as subtle and tricky though... I guess, kinda, if you don't know about them.

      I use Rust as much as possible now, and it can target 8-bit microcontrollers

      I am going to have to spend more time playing with Rust.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    86. Re:Not gonna happen by Anonymous Coward · · Score: 0

      You are the typical C++ idiot who confuses the memorization of needless complexity with programming skill. C++ is a bleeding mess, because it wasn't designed at all: it was accreted. C++ is a language for people who are too fucking stupid to recognize wasted effort.

    87. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Did ESR ever get his shit together after that meltdown he had over Linus rejecting something he thought was god's gift to Linux? I don't even remember what it was, I just remember seeing an e-mail from him threatening you with bodily harm.

    88. Re:Not gonna happen by Chuck+Messenger · · Score: 1

      It's simple. Using C++, it's possible to more quickly write fast, bug-free code. Those three factors together. The resulting code is more malleable: the code (assuming it is well-written) is robust to refactoring.

      Yes, for shorter programs, a weakly typed language like Python will get you results more quickly. Python certainly has its place for rapid prototyping. However, once you get to a moderate level of complexity (several thousand lines, say), programming without a static type system is like mountaineering without safety ropes.

      C++ is faster than Java and C#. On the other hand, it's possible to write better development tools, and better-integrated libraries, for Java & C#, due to reflection.

      C++ is as fast as C. The only real advantage of C over C++ is the smaller code footprint.

      All of this means that C++ is the language of choice for complex, performant code.

      I'm excited by the promise of Rust. Being better than C++ is a high hurdle to jump. Does Rust pull it off? I hope so.

    89. Re:Not gonna happen by tender-matser · · Score: 1

      Duff's device. Always my favorite for explaining how broken C was.

      What's so broken about it?

      If you consider select() just syntax sugar for a jump table, it makes perfect sense for its case label to have the same syntax constraints as goto labels. Why should they respect the underlying block structure? It makes perfect sense that they do not, and it's easy to understand for anyone (unless they insist on considering select() a fancy way of writing an "if()... else if() ... else if() ... else" chain, which it's not).

      Maybe allowing any semblance of goto / unstructured code is dangerous in the first place, but that's a completely different argument -- but something's not "broken" if it's working as intended.

      Another C "bug" that they took great pains to quash in all C-derived languages is the ability of writing a comma expression inside of an "?:" conditional -- despite "," having lower precedence than "?" or ":" (eg "a = p ? q++, r++ : s"). That was equally dumb -- if such terse syntax as "?:" sucks, then they should've get rid of it completely; forcing people to add another pair of parentheses to their gibberish salad isn't doing anyone any favors.

    90. Re:Not gonna happen by Anonymous Coward · · Score: 0

      I see arguments like this a lot, "it's not that C is a shit language, the REAL problem is all these shit coders that haven't spent years running into the same problems as everyone else because shitty language design that isn't pushing them in the right direction!"

      C is a very important language, and it's not going away anytime soon either, but that doesn't mean it isn't massively flawed.

      Nobody is expecting Go/Rust/whatever to fully replace C, C will always have a place. I mean... COBOL still has a place, right?

    91. Re: Not gonna happen by Anonymous Coward · · Score: 0

      Found the Rust fanboy pretending to be a reasonable person...

    92. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Would you care to explain how being able to pull off a neat hack is somehow bad?

      I would rather argue that it shows off the elegance of C. When needed, you can pull clever low-level tricks to squeeze out the last bits of performance. When not, you can write elegant, easy to understand code. It's entirely up to the programmer. The only alternative would be to not have the possibility of pulling things like Duff's device. How would that be any better?

    93. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Name one security vulnerability in a C codebase that is due to the language rather than the program or the compiler.

    94. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Compiler developers see it as their task to squeeze out every last cycle at any cost

      And rightly so.

      I've always wanted a compiler that tried to diagnose undefined behaviour instead of exploiting it, but noone seems to be selling one.

      That needs not come at the cost of performance. Optimisation and code diagnosis are largely if not entirely orthogonal. That being said, I agree that compilers can and should do a better job in giving warnings, especially for situations that are perfectly fine according to the standard but are likely to cause problems. Things have improved in recent years, but not enough.

    95. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Name one security vulnerability in a C codebase that is due to the language rather than the program or the compiler.

      Lack of array bounds checking.

    96. Re:Not gonna happen by swillden · · Score: 1

      unless you religiously follow RAII as a pattern [...] you will have crazy leaks all over as you create and destroy objects

      You say this as though RAII is hard, or weird. In modern C++ its extremely simple: Any time you see a naked pointer, you see a bug. Most of the time, you should just replace it with a std::unique_ptr and be done with it. There are cases where something more sophisticated is needed, but it's pretty rare. I work on significant bodies of both C++ and Java code, and I don't find that there's a significant difference in the incidence of memory leaks. More up-front effort is put into memory management in C++, but GC tuning also consumes a significant number of engineering hours for Java code.

      I find that C++ is often a better choice than Java (or other GC'd, managed languages) simply because of its consistency under load. GC adds a layer of unpredictability that often results in production crises unless you massively over-provision RAM -- and sometimes even then.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    97. Re:Not gonna happen by swillden · · Score: 1

      Hmm... first you said you wanted one byte, and now you want two bytes, or magic bits.

      You're not thinking. Kjella said that null termination saves one byte, but since the null terminator takes a byte, clearly his initial alternative was a two-byte length prefix. This is obvious.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    98. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Actually they tried to keep the implementation simple.

      If they had wanted to keep code simple, they would have built string support into the language.

      As a result, we now have "ASCII strings are null-terminated arrays of bytes" and anything more complex is a crap shoot.

    99. Re:Not gonna happen by Anonymous Coward · · Score: 0

      And you have to consider that when C was developed, some computer hardware had 6, 7, 8 or 9 bit bytes.

      Not a concern. C was developed for the 16-bit PDP-11 and no consideration for other architectures until much later. The 'char' abstraction is the only nod to portability, and that could be handled by the compiler. C defined a char as "the smallest addressable memory unit that can hold a character in the machine's native character set."

      Ritchie covered some of the design decisions (and departures from BCPL and B) in The Development of the C Language

    100. Re:Not gonna happen by Anonymous Coward · · Score: 0

      you have to do most of the work. that's the price of freedom for you. if you want a language that will do most of the stuff for you, with all the overhead of it, you're welcome to use it.

    101. Re:Not gonna happen by Anonymous Coward · · Score: 0

      so if someone writes SQL he is a problem to society? this is ridiculous

    102. Re:Not gonna happen by Anonymous Coward · · Score: 0

      Part of the purpose of undefined behavior is allowing the compiler to exploit it.

    103. Re:Not gonna happen by K.+S.+Kyosuke · · Score: 1

      How do you even get predictable latencies on machines with caches and virtual memory anyway? Even more if your memory reclamation is synchronous. Anything remotely similar to malloc/free is going to have an ugly worst case, at least for the thread executing it. And any object graph pruning that improves malloc/free applications also naturally improves GC-based applications. I just can't see future systems at some point not going for something like C4 or improvements on it. We had Lisp machines with vastly inferior hardware and software techniques, and they were still usable. The idea that despite the progress, we won't solve whole-system GC problems, ever, seems contentious at least, to put it mildly. It might take a few decades, but still.

      --
      Ezekiel 23:20
    104. Re:Not gonna happen by david_thornley · · Score: 1

      Reports are that Duff considered Duff's Device to be a strong argument regarding case statement fallthrough, only he couldn't decide whether the argument was for it or against it. It's one of those magnificent hacks that both amazes and horrifies you.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    105. Re:Not gonna happen by david_thornley · · Score: 1

      Your blog entry there is rather short, and doesn't explain why C++ shouldn't be used. Many of the C security issues are trivially fixed with C++.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    106. Re:Not gonna happen by david_thornley · · Score: 1

      There are no obscure undefined behaviours, only well documented ones.

      Overflow in signed arithmetic? Comparison of pointers not to the same object? I'm doubtless missing others, but it's really easy to invoke undefined behavior. Some compilers don't do anything common-sense with undefined behavior, but assume that there is none and optimize on that basis. Declare a variable and initialize it in only one branch of an if-else statement, and the compiler is free to optimize out the if statement and the branch without the initialization.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  8. Instills trust, no? by chrism238 · · Score: 5, Insightful

    Claiming "I have a friend....trust me on this" instills so much trust, doesn't it?

    1. Re: Instills trust, no? by Type44Q · · Score: 1

      From you, no. From ESR, quite possibly.

    2. Re: Instills trust, no? by nomadic · · Score: 2

      "From you, no. From ESR, quite possibly."

      I'd trust an anonymous slashdot poster's anonymous friend a lot more than ESR.

    3. Re: Instills trust, no? by retchdog · · Score: 1

      "quite possibly," and yet not for any apparent or adequately-explained reason.

      --
      "They were pure niggers." – Noam Chomsky
    4. Re:Instills trust, no? by guruevi · · Score: 1

      You can find it on GitHub, it's a dead project.

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    5. Re: Instills trust, no? by Anonymous Coward · · Score: 0

      It's probably the same friend who claimed there was a feminist honeytrap targeting Linus.

    6. Re: Instills trust, no? by drinkypoo · · Score: 1

      From you, no. From ESR, quite possibly.

      If you trust ESR and think he's smart, just follow him on G+ for a while. You'll change your mind in relatively short order.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    7. Re:Instills trust, no? by Knuckles · · Score: 2

      Claiming "I have a friend....trust me on this" instills so much trust, doesn't it?

      AFAICT he did not ask for trust and did not say "I have a friend....trust me on this"

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    8. Re: Instills trust, no? by serviscope_minor · · Score: 1

      If you trust ESR and think he's smart, just follow him on G+ for a while

      Holy shit! Someone uses G+?

      Mind. Blown.

      OK, cheap shots at G+ aside, he also has his own blog too. The effect is much the same.

      --
      SJW n. One who posts facts.
    9. Re: Instills trust, no? by Anonymous Coward · · Score: 0

      Why? Because he calls it how he sees it and that triggers you? That he's open and honest about situations and speaks his mind that triggers you?

      I read his blog and he has some insightful input, the comments are 100x better than slashdots. He has a ton of experience in tech and has seen it all done it all. What is your gripe with him exactly? Is it that he thinks differently from you? Please explain, because methinks you are jealous of his success.

    10. Re: Instills trust, no? by drinkypoo · · Score: 1

      Why? Because he calls it how he sees it and that triggers you?

      No, because he engages in totally unsupported leaps of faith and calls it logic.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  9. Solve the 'problems' of C now they aren't problems by Anonymous Coward · · Score: 3, Insightful

    Static code analysis and runtime checking (valgrind) pretty makes C's little issues a non-event now.

    And that lack of type safety is actually needed in some domains, so solving it makes it harder to write say kernel code.

    The only problems I've seen with C in the last fifteen years are when the ****ing C++ zealots get control of the C compiler and have managed to break C in the process ;)

  10. ESR == bullshit artist by Anonymous Coward · · Score: 0

    ESR is a bullshit artist. Maybe he can code, I don't know. But he is definitely a bullshit artist and he has been involved in some underhanded stuff like his hijacking of the money assigned to an NTP security project. I wouldn't give his opinion much weight at all.

  11. John Blow and JAI by IckySplat · · Score: 1

    I'm hopeful that JAI goes mainstream :)

    --
    Help! help!, the termites are eating my DRAM!!!
    1. Re:John Blow and JAI by Pseudonym · · Score: 1

      JAI has a few quirky design features that may make it unsuitable as a systems programming language (e.g. it's hard to see how to do separate compilation). It's optimised for games, and games are an unusual area of programming, even compared with other HPC software.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  12. "C with safety" has been tried before by roca · · Score: 5, Insightful

    Lots of smart people have tried hard to pull this off. See, for example C-Cured from UC Berkeley. They did not take off. I doubt ESR's "friend" is going to succeed where they failed.

    I think an approach like Rust is more likely to be successful, where in addition to providing safety you provide a lot of nice language features to make the language more appealing.

    1. Re:"C with safety" has been tried before by Anonymous Coward · · Score: 0, Flamebait

      The only thing I know about Rust is the Rust Code of Conduct, which was more than enough to put me off learning anything about Rust.

      A programming language needs to be free and open. If you can be excluded from interaction because people disagree with you, then it's not a viable language.

    2. Re:"C with safety" has been tried before by The+Evil+Atheist · · Score: 0

      Please quote the exact part of the Rust Code of Conduct which says you can be excluded simply for disagreeing.

      --
      Those who do not learn from commit history are doomed to regress it.
    3. Re:"C with safety" has been tried before by Anonymous Coward · · Score: 3, Insightful

      Any forceful language isn't tolerated. You know damn well people are going to be driven away (banned indefinitely from communications) for hurting people's feelings.
      OpenBSD nor Linux wouldn't exist in their current forms under a rust code of conduct. No wonder the language is such shit.

    4. Re:"C with safety" has been tried before by Anonymous Coward · · Score: 0

      System programming for snowflakes that can't stand criticism or hurt feelings?

      Sounds like a complete winner. UNIX and C, behold and cower in fear!

    5. Re:"C with safety" has been tried before by Anonymous Coward · · Score: 0

      We will exclude you from interaction if you insult, demean or harass anyone.

      These are subjective statements. One person's "disagreement" can be seen as another person's insult.

    6. Re:"C with safety" has been tried before by Anonymous Coward · · Score: 0

      We will exclude you from interaction if you insult, demean or harass anyone.

      These are subjective statements. One person's "disagreement" can be seen as another person's insult when that other person is a fucking pussy.

      Fixed that for you.

    7. Re:"C with safety" has been tried before by vux984 · · Score: 1

      If you can be excluded from interaction because people disagree with you, then it's not a viable language.

      For what its worth, I just roll my eyes at rust's 'code of conduct'. Not because I disagree with it, per se, but because I think its a silly distraction.

      If you are an offensive asshole, people will exclude you from interaction even without a "code of conduct".

    8. Re:"C with safety" has been tried before by Anonymous Coward · · Score: 0

      No they won't. They only do it, if you're also an idiot.

    9. Re:"C with safety" has been tried before by roca · · Score: 1

      The code of conduct doesn't prohibit disagreement.

      Anyway you don't need to deal with the CoC just because you use Rust. In fact, you're free to form your own "Rust for Assholes" forum. That might actually be a useful service.

    10. Re:"C with safety" has been tried before by Anonymous Coward · · Score: 0

      Maybe they should stop developing new languages and instead focus on publicity stunts like: "This very readable code module, written in standard Ludicrous v5, is a drop-in replacement for the Linux virtual file system with a more compact, fast, extendable alternative"...

    11. Re:"C with safety" has been tried before by Anonymous Coward · · Score: 0

      There are two genders, illegal aliens are criminals who need to be deported, and men are upon the whole stronger than women due to genetics.

      And now I can't use Rust - thank god.

    12. Re:"C with safety" has been tried before by Anonymous Coward · · Score: 0

      If you are an offensive asshole, people will exclude you from interaction even without a "code of conduct".

      The fact that they need a code of conduct suggests that what you say is not true. Empirically, looking around the world suggests that what you are saying is not true. Answering the question, "why are there so many assholes around,=?" suggests that what you are saying is not true.

    13. Re:"C with safety" has been tried before by vux984 · · Score: 1

      "The fact that they need a code of conduct suggests that what you say is not true. "

      They need a normal terms of use, like any other site; and calling it a Code of Conduct isn't the issue. This is from the Rust site:

      We are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, disability, ethnicity, religion, or similar personal characteristic. [...]
      If you feel you have been or are being harassed or made uncomfortable by a community member, please contact any of the Rust Moderation Team immediately. Whether you are a regular contributor or a newcomer, we care about making the community a safe space for you.

      "safe space" originally simply meant a place free of violence etc. But, well, wikipedia puts it very well: "The term safe space has been extended to refer to an autonomous space for individuals who feel marginalized to come together to communicate regarding their experiences with marginalization".

      THAT is the issue. I expect a programming language community to exist to disseminate information about the programming language in a professional and efficient way. I support them in maintaining such a forum free from harassment and abuse. But I don't want to join the Rust forums to discuss LGBT themes of marginalization. I don't want to hear about your religious persecution. I don't care about your syndrome or your battle with cancer. I certainly don't want to listen to your anti-science twaddle about vaccination.

      My experience with 'safe spaces' is pretty much consistent with the wikipedia description...a gathering of people who want to share personal stories of their abuse, empowerment, marginalization, and triumphs; and socialize with others with similar experiences in a supportive and non judgemental way. That's what I think I of when I think 'safe space'.

      Rust is a programming language. Nobody has been marginalized for using rust. And everything else doesn't belong on the site. This is why it merits an eye roll. 'safe space' is the either the wrong term to describe their mission, or... if its the right term then the community has entirely the wrong mission.

  13. C# by Anonymous Coward · · Score: 1

    C# has native AOT compilers that can target low level architecture. I wish the COSMOS operating system and its tool sets were adopted more by Visual Studio and Microsoft. With these tools you can easily write code that targets native hardware.

    https://github.com/CosmosOS/Cosmos

    1. Re:C# by Anonymous Coward · · Score: 0

      FUCK YOU and fuck your Monkeyshit Corp shill garbage. C# is for stupid monkeys.

    2. Re:C# by Anonymous Coward · · Score: 0

      C# screwed up value vs reference types. They screwed up initialization of value type and destruction of everything. The ergonomics of their generics arn't suited for library development. The memory management isn't suited for a lot of what people use C for these days.

      C# is quite usable for application code, but its a mess for trying to make nice libraries of high performance stuff. But most importantly, its inter-op with existing C and C ABI systems isn't great (its ok calling C from C#, but adding C# into an existing C project to replace part seems like a mess).

      If someone wants to replace C, they need tools to do it piece wise. C++ and Rust have those tools. C# does not (to my knowledge).

      Also, I've used some native C# compilers, and have hit quite a lot of compiler bugs and many things ended up slower than when jitted. C# was designed to be jitted, and compiling it to native code is hard.

    3. Re:C# by Anonymous Coward · · Score: 0

      C# has native AOT compilers that can target low level architecture. I wish the COSMOS operating system and its tool sets were adopted more by Visual Studio and Microsoft. With these tools you can easily write code that targets native hardware.

      https://github.com/CosmosOS/Cosmos

      So I was getting pretty tired of doing Java, having done it since switching from C++ around 2K, and started doing some C#.

      I'm back to loving Java, C#'s greatest feature is making Java look good.

    4. Re:C# by Anonymous Coward · · Score: 0

      Out of pure curiosity and from a language design perspective, how did C# screw up value and reference types? Could you elaborate on their destruction? If you have a link to any of this it would be greatly appreciated.

  14. Re:Solve the 'problems' of C now they aren't probl by Lanthanide · · Score: 1

    Valgrind drastically reduces the performance of the software, so isn't practical for critical code that needs to execute quickly.

  15. Cd is the successor to C by Anonymous Coward · · Score: 0

    Courtesy of Lennart Poetering

    1. Re:Cd is the successor to C by DCFusor · · Score: 1

      At least we'll get to choose a better language. It'll die of it's own weight if LP attempts shove it upon us all.

      --
      Why guess when you can know? Measure!
  16. Re:Solve the 'problems' of C now they aren't probl by roca · · Score: 3, Informative

    > Static code analysis and runtime checking (valgrind) pretty makes C's little issues a non-event now.

    Just not true, even if you add in manual security audits as well. For example:
    https://lwn.net/Articles/73545...

  17. Re:Solve the 'problems' of C now they aren't probl by Anonymous Coward · · Score: 1

    OP means running Valgrind on test suites, I hope. Nobody runs Valgrind in production.

  18. standard stability and speed by e**(i+pi)-1 · · Score: 5, Insightful

    What I want from a programming language are Standard, Stability and Speed. Nobody minds the little quirks, redundancies or the lack of elegance. When I program something today, I want it to run in 10 years, without modifications! In particular, I want the language to be around still, the grammar once put stay a standard. I want the program to run stably. In particular, I expect developers to be very careful when changing the compiler. Even small changes annoy. An example in C (which is in general quite good in respect to stability) it was no more possible to run gcc -lm example.c . Linking the math library required gcc example.c -lm. One has to change now 700 Makefiles just because somebody thought this is more elegant? I don't mind if a language is extended or sped up, but don't for change old grammar, not even the smallest things. There is lot of code around which would need to be fixed. I'm in particular careful with new languages. They first hype and spike. A language needs to earn respect, prove that it is stable over a long period of time.

    1. Re:standard stability and speed by Larsen+E+Whipsnade · · Score: 1

      Not just programming languages. Everything. Libraries, operating systems, user interfaces.

      I'm not against innovation, but maintain backward compatibility for at least one major version. Deprecate APIs if you must, but don't break things on purpose. That's douchey.

      Stability: easier to achieve if you don't change things without good reason.

      Speed: sometimes it doesn't much matter, but when it matters, it matters a lot.

    2. Re:standard stability and speed by Anonymous Coward · · Score: 0

      Seems to me that an awful lot of the posts on this story amount to "Change bad! We need to keep doing the same things forever!"

      (And this is why older people tend to be more conservative...)

      But betting against change, purely on the basis that it's "change", is seldom a winning strategy. Sooner or later, C will be replaced; and if ESR thinks "his friend"'s idea is up to the challenge, then I for one am prepared to take him seriously. He's earned, at least, a fair hearing.

  19. Horrible alternatives by Anonymous Coward · · Score: 0

    All the alternatives to C he proposes are just horrible.

    That is the problem usually. All these so called "replacements" suck in a different way. This is why C is here to stay.

  20. Re:Is it time to Round Up the Muslims? by haruchai · · Score: 0

    You mean world history?

    White people invented all the shit everyone else appropriates for granted.

    Fuck off.

    China, India & the Middle East were doing great stuff long before Europe

    --
    Pain is merely failure leaving the body
  21. Re:Solve the 'problems' of C now they aren't probl by Anonymous Coward · · Score: 0

    You seem to be under the impression that valgrind is for production use.

  22. Go and Rust are non-competitive by Anonymous Coward · · Score: 0

    Go and Rust both come with large runtimes, all their associated risks, and low performance. They're not competitive with C in the embedded or operating systems fields. Anyone who has written hello world has noticed this. ESR isn't a programmer anymore, he's a pundit reading press releases.

  23. Best language for scientific/numerical work? by Latent+Heat · · Score: 2

    I looked into Python for scientific/numeric programming, and from what I gather, key value paired lists are at its foundation and everything, including its object class model, is layered on top of that. Java, on the other hand, is based on an object class model from which you construct data structure objects such as key value paired hash lists?

    What I like about Java is that it supports dense arrays of numeric values. Its dense-array model is an exception to "everything is a" hash list/object/thingy. It appeared to me that Python implements arrays on top of key value paired lists/hash lists/dictionaries/whatever-you-want-to-call-them. Maybe that works for sparse-array numeric linear algebra, but much numerical programming involves operations on dense numerical arrays where compilers optimize array access in loops to incrementing address registers. Even in Java, which does not allow disabling this safety feature, the compiler will analyze loops to optimize bounds checking.

    Python has NumPy to support dense arrays of numeric values in this fashion, but NumPy, at least at the time 10 years ago I looked at it, was this wart on the Python language, in other words, something that sticks out and gives the appearance that it doesn't really belong there. It is straightforward to operate on NumPy arrays in native-code extension modules to Python, but on the Python side, such an array is this "blob" that you can only poke at with native-function calls.

    Matlab is the "thing", the expensive, proprietary thing that persons with engineering domain knowledge who cannot be bothered to learn a "real" programming language use. It is for the people who used to use Fortran to perform engineering calculations with one of those Tektronix "vector storage" video displays 40 years ago and now they have Matlab, which combines a goofy scripting language with a GUI with a vast legacy Fortran and C numerical library with a graphical visualization library.

    Forget about Matlab; I run Java as my "FORTRAN" in Eclipse and my Java programs output tab-separated columns of numeric data. Java does not have an "immediate mode eval-prompt" like the Matlab command windows, but the incremental syntax checking and compiling allows for much faster edit-build-execute cycles that what Visual Studio offers with C/C++. If my program crashes, I can quickly find the offending line in the Eclipse edit window -- good luck with that in C/C++. The Eclipse console window is a text-mode GUI allowing data exchange with other GUIs -- C++ in Visual Studio does not support such data exchange of numeric console-mode output. My "Tektronix vector storage display" is copy-and-paste to an Excel or Open Office Calc spreadsheet to plot the results.

    In my ideal world, there would be 3 layers, scripting/incrementally compiled managed-code/native code. I would like something other than the serious-coin-per-seat sole-source Matlab as the scripting layer (it interfaces well with Java with transparent exchange of dense arrays, in fact, the Matlab GUI is written in Java), but I really like Java for that middle layer.

    1. Re:Best language for scientific/numerical work? by willy_me · · Score: 3, Informative

      Look at Julia. It is similar to Go, Rust, Swift and the like in that it uses LLVM for generating the final machine code. It can be quite efficient. The language is designed for similar uses as Matlab - except it does not suck. I prefer Julia to Matlab for everything other then debugging - the Matlab debugger is great compared to what is available for Julia.

    2. Re:Best language for scientific/numerical work? by 0100010001010011 · · Score: 2

      It's either MATLAB or Python. I can't imagine how many wheels you're trying to reinvent by doing it in Java because of what ever personal objections you have to Numpy.

      Jupyter notebooks is used by a large number of organizations for numerical analysis and display.

    3. Re: Best language for scientific/numerical work? by Anonymous Coward · · Score: 0

      Java 9 has a REPL now

    4. Re:Best language for scientific/numerical work? by Anonymous Coward · · Score: 0

      You are joking, right?

    5. Re:Best language for scientific/numerical work? by olau · · Score: 1

      Well, if you want to put it that way, Python has two fundamental datastructures, lists and hash tables. What's a bit peculiar is that classes are (usually) using the hash table. In Java, an object is actually a sort of irregular array - so to get obj.x, you take the obj reference and add to that the offset to x.

      Lists in Python are lists of references. However, there is an array module that makes you make lists/arrays of values. But the thing is - if you need a ton of numbers, you probably also need to do operations on them efficiently and the standard Python interpreter can't do that because it always boxes/unboxes everything. That's why people are using numpy.

      It doesn't have to be this way, though. PyPy (alternative Python interpreter) has a smarter list implementation that dynamically chooses whether to use a list of references or a list of values. And it can also take Python code operating on those lists and dynamically translate it into machine code that operates directly on the underlying values instead of going through the reference boxing/unboxing circus.

    6. Re:Best language for scientific/numerical work? by Yaztromo · · Score: 1

      In my ideal world, there would be 3 layers, scripting/incrementally compiled managed-code/native code.

      That's pretty easy to achieve, via Groovy/Java/JNI. I have no idea how suitable it is for the work you're doing, but you can certainly write Java classes that use native methods via JNI, and then script those classes through Groovy.

      Yaz

    7. Re:Best language for scientific/numerical work? by Anonymous Coward · · Score: 0

      One thing that annoys the heck out of me is the use if comma-separated text files for storing numerical data. That makes the files much larger than they need to be. Is there a general purpose binary format that is a good (free) alternative for Matlab/Java/Python/Octave/blah?

    8. Re:Best language for scientific/numerical work? by Bethany_Saint · · Score: 1

      I didn't think Julia's static compiler was anywhere close to working and may never be a feature of the language. Has that changed? An interpreted or even JIT compiled language with a run time needed to be deployed sort of takes it out of the C space. Also, Go doesn't use LLVM. It's been bootstrapped for a while now.

    9. Re:Best language for scientific/numerical work? by Anonymous Coward · · Score: 0

      Julia totally roxx!

    10. Re:Best language for scientific/numerical work? by TeknoHog · · Score: 1

      I second Julia. It's basically Fortran updated for this decade; the block syntax is actually from Fortran, which IMHO is better than Python's indentation issue, without all the C-style line noise of punctuations.

      (Shameless plug: see my math-art homepage, the static images are all created in Julia and gnuplot. For OpenGL animations, I use Python, as the OpenGL interface of Julia didn't seem quite ready when I started, though it might have improved since. Python is a nicer all-around language, but for math-heavy work, it's much nicer to have a native math syntax than having to use np.something() for every simple thing.)

      --
      Escher was the first MC and Giger invented the HR department.
    11. Re:Best language for scientific/numerical work? by TeknoHog · · Score: 1

      I prefer Julia to Matlab for everything other then debugging - the Matlab debugger is great compared to what is available for Julia.

      As much as I love Julia, I agree it has its rough spots, but I think it's mostly because it's still under heavy development. Some of the other annoyances include

      • Slow to start, as it compiles the script every time. If you need batch processing of items in a loop, better write the loop within Julia.
      • Slow string handling. I need to output huge lists of numbers, and it's much faster to just print one at a time, and let the shell/OS concatenate them into a file.
      --
      Escher was the first MC and Giger invented the HR department.
    12. Re:Best language for scientific/numerical work? by Anonymous Coward · · Score: 0

      It's either MATLAB or Python. I can't imagine how many wheels you're trying to reinvent by doing it in Java because of what ever personal objections you have

      A fair number of numerical libraries have been ported to Java. Entire books have been written on numerical methods that use Java as the implementation language. The standard libraries that ship with the language also have some useful stuff for certain types of numerical problem solving.

      So it's not as far fetched as you might think.

      Don't get me wrong: I like what I've seen so far of Python. But I wouldn't just assume Java to be a bad choice if I was solving a numerical problem (and didn't have access to Matlab or Octave). I'd look at Java, Python, and C ...

  24. Re:Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    Feel free to contribute the numbers for all gun violence in the US and the references for said numbers.

    Probably you'll be surprised.

  25. Go is the MINIX of programming languages by Anonymous Coward · · Score: 0

    They've even been caught suppressing firewall alerts.

  26. Native-code Java? by Latent+Heat · · Score: 2

    Could you accomplish what you ask for by coming out with a native-code version of Java? Maybe ditch the GC and replace it with best-practice non-GC memory management "smart pointers"?

    Back when Sun Microsystems was the fiercely protective parent of Java, such a thing wouldn't be Java and they would sue your backside if you tried to call it Java.

    But are not Rust, Go, and Swift essentially native-code versions of Java? If not rigorously adhering to Java, are they not attempts to ditch the preprocessor, provide a module system and namespaces, properly define behavior and improve safety, in a native-code setting?

    They are native code, because if they are managed code, what is the point of not using Java, or if you want a different language, at least adapting it to the JVM (cough, C#, cough)?

    1. Re:Native-code Java? by slack_justyb · · Score: 2

      But are not Rust, Go, and Swift essentially native-code versions of Java?

      I can only speak for Rust in that the answer is no. If anything Rust resembles Haskell a lot more in form, function, and operation than Java.

      are they not attempts to ditch the preprocessor, provide a module system and namespaces, properly define behavior and improve safety, in a native-code setting?

      Rust does but that hardly equates it anywhere near Java. If anything its just any language that wants to avoid those things. It would be like calling a nutritionist a doctor on the merits that they want you to live a healthy life.

      such a thing wouldn't be Java and they would sue your backside if you tried to call it Java.

      There were indeed compilers for Java to native code back in Sun days. But you are right that you couldn't call it Java, but that had a lot to with copyrights and branding that anything else.

    2. Re:Native-code Java? by Anonymous Coward · · Score: 0

      Go is most definitely not a "native version of Java". There is no traditional OO inheritance model, rather inferred interfaces with an emphasis on composition instead. Go also has primitive types ala C and avoids a lot of the verbosity of Java. It might even have fewer keywords than C itself.

    3. Re:Native-code Java? by Anonymous Coward · · Score: 0

      What ever became of the GCJ project that was a Java compiler for the GCC toolchain?

    4. Re:Native-code Java? by Anonymous Coward · · Score: 0

      Abandoned. IIRC it already wasn't doing well when OpenJDK dropped. OpenJDK had just about anything anyone would want but the native compiler. IIRC GCJ was never very complete anyway; was missing some pretty important stuff, like Swing.

    5. Re:Native-code Java? by Anonymous Coward · · Score: 0

      If C were to pick up two features from C++ I think it could resolve a number of issues.

      First feature is RAII with its associated cleanup functions. If C could automatically call an initialization routine (i.e. constructor) on variable declaration and call a finalizer when the variable goes out of scope, it would be possible to have quite a bit of automatic memory management when desired. Would need to do something similar to smart_ptrs or prevent auto memory from being returned from a function though, but doesn't that same issue already apply to stack variables?

      GCC has the cleanup attribute that can be run when a variable goes out of function scope, but that is compiler specific.

      Second if C could have overloading of methods and operators then it would be possible to build a few higher level data structures like auto-range bounds checked character arrays (aka Strings). Adding inlining with these would also go a long way to removing the need for pre-processor macros.

      Historically before C++ had a first class compiler, this was implemented by a C++ to C compiler where the name mangling model originated. So this was actually achievable without using virtual function redirects so long as the compiler could deduce the method call argument data types.

    6. Re:Native-code Java? by riley · · Score: 1

      Go is not Java. The core concept of Java is the object type system using inheritance, and Go's core concept is a type system that uses composition, and allows a type to fulfill an interface by simply matching the signatures of all the methods. Go feels more like a cleaned up C than Java. Beyond that, the attraction to Go for me is the included toolchain. Building and maintaining projects are dead simple.

    7. Re:Native-code Java? by Anonymous Coward · · Score: 0

      So... why not just fucking use C++?????

    8. Re:Native-code Java? by K.+S.+Kyosuke · · Score: 1

      Because people might want something like Fortress instead, at least on modern multicore machines?

      --
      Ezekiel 23:20
  27. Re:Is it time to Round Up the Muslims? by mnemotronic · · Score: 0

    Seems like it's the white guys with guns causing most of the trouble lately. Maybe that's a conversation we should have.

    Mod parent down. Off Topic.

    --
    The Russians have won. They have made the world a cesspool of distrust, greed, fear and hate.
  28. Rust? Go? by DontBeAMoran · · Score: 1

    If it can't target something as small as ATtiny25, it's not an alternative to C.

    --
    #DeleteFacebook
    1. Re:Rust? Go? by slack_justyb · · Score: 1

      You'll need to use #![no_std] and if you need to malloc you'll have to provide your own. Aside from that you should be able to target ATtiny25 with slicers, generics, traits and all with Rust. Additionally, you'll need to explicitly spell out any types on variables, if you stick to i8 etc, you should be fine. It really depends on what you need done, because obviously you're going to be limited, but the compiler will do a lot of the heavy lifting for you in this mode as opposed to trying to bring it with you in your binary.

    2. Re: Rust? Go? by Anonymous Coward · · Score: 0

      https://github.com/avr-rust
      Getting there

    3. Re:Rust? Go? by serviscope_minor · · Score: 1

      If it can't target something as small as ATtiny25, it's not an alternative to C.

      Go can't because of the GC. I don't see why rust couldn't, since it's more or less the same machine model as C anyway. I think the main thing is LLVM doesn't have a solid AVR backend like GCC, only experimental ones.

      IIRC there have been some rust/AVR projects out there to get the codegen ported.

      --
      SJW n. One who posts facts.
  29. Re:Is it time to Round Up the Muslims? by mnemotronic · · Score: 0

    Exactly. Today it is smelly shitty fucking ugly hindu-chimps leeching off of america.

    Exterminate these parasites.

    Mod parent way, way down. Poster too busy with all the people living rent-free in his head.

    --
    The Russians have won. They have made the world a cesspool of distrust, greed, fear and hate.
  30. CD is the successor to C? by DontBeAMoran · · Score: 1

    No, CD is successor to cassette tape.

    --
    #DeleteFacebook
    1. Re:CD is the successor to C? by Anonymous Coward · · Score: 0

      CD is the successor to LD.

    2. Re:CD is the successor to C? by DontBeAMoran · · Score: 1

      CD is audio, LD is audio/video. Different leagues.

      --
      #DeleteFacebook
  31. Rust?? by Anonymous Coward · · Score: 0

    Hork!

  32. Re:C was technically obsolete by the 1970s by Anonymous Coward · · Score: 0

    Well written C# and Java is actually more efficient than C/++.

    LOL. Poor trolling is poor. Outside of some ridiculous microoptimization benchmark (like a C#/Java can run this for loop that makes this single method call faster!!), please do post your proof.

    Partially because it can do whole of program optimization.

    PGO has existed for C++ for years now.

    Partially because it can optimize for a particular processor rather than a generic one at a separate compile time.

    So can any C or C++ compiler.

    Partly because garbage collections minimizes the need to copy data structures (particularly in C++), and smart pointers are grossly inefficient compared to generational garbage collection.

    [citation needed]

    Partially because it allows focus on algorithms rather than fixing nasty bugs.

    Because no one has to fix nasty bugs in Java code. As long as you ignore things like Apache Struts, right?

  33. -Wall by Anonymous Coward · · Score: 0

    strict no waning policy. Problem fixed.

  34. Trolling much? by Anonymous Coward · · Score: 0

    BTW. Probably the most evil thing that C has inflicted upon the world is counting from 0. All pre C languages count from 1, as do children. And then it all changed. And we will live with off by one errors for the rest of time.

    Srsly? Starting at 0 is natural and ideal. For a programmer, of course. You know, the sort of person you claim to be.

    Starting at 1 causes all the off by one errors. Starting at 0 is the cure.

    1. Re:Trolling much? by Anonymous Coward · · Score: 0

      Srsly? Starting at 0 is natural and ideal.

      It's only natural in hardware and kernel/driver level. Humans count from 1, so 0 start is not natural. Typical application software is fine 1.

  35. So many shortsighted folks, even ESR. by Anonymous Coward · · Score: 0

    Rather than seeing an industry trying to fix its mistakes, I see one constantly reaffirming them in a bizarrely self-defeating manner, all under the auspices of "business needs" or "knowing better" through some brazen assertion that having coded in a mediocre language for 30 years showed us that it's foolhardy to aim higher... just leave that to the dreamers and fools we can comfortably dismiss while we continue making mediocre products.

    ESR has fallen into this exact trap, and it's incredibly sad to see people pay him any credibility on topics like this beyond healthy respect for one's predecessors. We have become the fossils, and we're holding back the future of that which we're about to leave behind, just as our predecessors did, etc. It's humbling to be a part of this and know that no matter how hard we fight, the best we can come up with is the likes of Go or Cx, and general mockery for anything beyond the most minimal progression of the status quo (Rust has clearly been tossed on his list simply as a diplomatic and defensive gesture, given how little he has reached out to truly do anything about this general problem space over two damn years, despite his apparent concern over it).

  36. And all we got was tripe like Moana. by Anonymous Coward · · Score: 0

    A waste of a career, Bruce. A waste.

    1. Re: And all we got was tripe like Moana. by Anonymous Coward · · Score: 0

      LOL.

      Yea, Bruce you could have become a career criminal and hacked the world in the name of Geek Power.

      You could have gone on to become what Kevin Mitnick was supposed to become before he got arrested. You could have been the Geek God, we would have called you "Brzeus"

      Later on hacking would become boring to you and you would go on to work for Lockheed Martin. There you helped develop the F35 and help it come in 50% UNDER budget. After leaving Lockheed you would go on to become a Supreme Court appointee where you helped usher in Net Neutrality laws.

      After getting bored with that you would go on to work for Microsoft. Your life's work was leading up to this. At Microsoft you helped them rewrite the entire operating system making it POSIX compliant and convinced bill to release it in under the GPL license. . Later on the project was scrapped. But you would go on to fork it and create WinDildos1.5z.

      In an interview with Time Magizine for their 100 top influential nerds (which you were voted #1) you were quoted as saying "I did it all for the lulz"

      Wasted, Bruce; wasted ;)

  37. Rust, Go, Python and Cx by guruevi · · Score: 0

    What's the commonality between them: they all have to revert back to plain C to get any performance out.

    Python: Every performance library is written in C, not compiled to C, written in C.
    Go: "Import C" and cgo are practically a pre-requisite for any complex program
    Rust: The majority of the community is asking for or have hacked in a bridge into C
    Cx: Dead as a project but many have come before implementing checks into C, the majority has failed because if you wanted the checks, you wouldn't have used C in the first place.

    --
    Custom electronics and digital signage for your business: www.evcircuits.com
    1. Re:Rust, Go, Python and Cx by Anonymous Coward · · Score: 1

      Oh come on. I don't know about the other two, but Go's standard library is really impressive. What "complex program" can't you do without resorting to "import C"?

      If you mean OS-specific APIs that aren't yet captured in a cross-platform lib, that's a different beast (see the console APIs for instance, which the Go team is still solidifying into a cross-platform terminal package) but that doesn't equal complexity.

    2. Re:Rust, Go, Python and Cx by Anonymous Coward · · Score: 0

      Rust: The majority of the community is asking for or have hacked in a bridge into C

      What does that even mean? Rust has had a well-known and documented C FFI from way before the first stable release, designed to make C interop in both directions as low cost and painless as possible. It exists because language designers, as opposed to trolls, know that developing high-quality native libraries takes time, and that it's much less disruptive to introduce a new language into an existing codebase gradually, instead of trying to rewrite it wholesale. If there's anything that performance-chasing Rust developers are asking for, it's SIMD support in the stable compiler, because LLVM's auto-vectorization is somewhat brittle and doesn't begin to cover all interesting use cases. And SIMD stabilization is being actively worked on.

    3. Re:Rust, Go, Python and Cx by serviscope_minor · · Score: 1

      What's the commonality between them: they all have to revert back to plain C to get any performance out.

      That doesn't sound true, not for rust anyway. Rust is currently a bit, but not much slower than C, and unlike many other language doesn't have flaws which are easily hidden in microbenchamrks.

      This is not surprising: you can pretty easily on paper mechanically translate Rust to C. It's basically a representation of the same abstract machine, but with a good macro system and an iteresting type system. All of that lot disappears at compile time anyway.

      Rust, unlike the others was specifically written to be able to do the kind of high performance things that C and C++ traditionally do well.

      --
      SJW n. One who posts facts.
  38. Re:C was technically obsolete by the 1970s by Anonymous Coward · · Score: 0

    Partially because it allows focus on algorithms rather than fixing nasty bugs

    Anyone who has done any real world programming would call this guy a dirty liar. Almost all programs have bugs. Not because the language allows them but because we are lazy, tired, or just misguided. A SQL injection attack is just as likely to be made in C as it is in C# or Java. You could argue it is more difficult in C as you have to go out of your way to make it happen incorrectly. Where as there are many examples of doing it wrong in javascript/java/python laying around on the web. The only bug that the higher level languages helps protect against is buffer overflows or under runs. Even then that is not always true.

    Our memory issues stem from the fact that we sit upon a hardware architecture that allows it. I would argue even encourages it.

    The only reason these days I favor python over C/C++ is the ease of quick prototyping is just not there in C anymore for me. I can stand up a python program in a few mins. In C/C++ it takes longer but I get more power. As the project progresses the C/C++ library methods become faster to noodle out and build with. Where as python quickly falls in upon itself and you have to bend it to do things it is not really meant to do to make the thing work as a project. But with great power comes great responsibility. Valgrind and lint are your besties...

  39. Off by a lot by Anonymous Coward · · Score: 0

    And...

    BTW. Probably the most evil thing that C has inflicted upon the world is counting from 0. All pre C languages count from 1, as do children. And then it all changed. And we will live with off by one errors for the rest of time.

    ... now I know you're a terrible programmer.

    Indexing and counting are not the same thing. Thus, there's no way to escape off-by-one errors; there will always be both indexing and counting.

  40. Re:Solve the 'problems' of C now they aren't probl by phantomfive · · Score: 2, Insightful

    (1) Undefined behavior. UB is completely unacceptable in 2017

    You'll be sad to find out that your favorite language has undefined behavior as well, unless your favorite language is ML. It's just not worth the effort to fully define the language.

    --
    "First they came for the slanderers and i said nothing."
  41. lol by Anonymous Coward · · Score: 1

    Coding is a small, even tiny part of software development.

    Spoken like a "programmer" who's never written anything of significant size. Just because your idea of programming is to go suck on some bloated framework (and suffer the irreducible slings and arrows that result), that doesn't mean there aren't real application programmers doing real work out there.

    Coding is the very heart and soul of programming, at least until machines take the job over. Anyone who doesn't think so is an outright fool.

    1. Re:lol by Anonymous Coward · · Score: 0

      No you are a moron that hasn’t written anything of significance.

    2. Re:lol by brantondaveperson · · Score: 2

      at least until machines take the job over.

      Machines already have taken the job over, it' just that we call those machines "compilers", and they're really dumb so we have to explain to then what we'd like the software to do really, really precisely and clearly.

    3. Re:lol by Hognoxious · · Score: 2

      A bit like dealing with Wipro, then?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  42. Re:Solve the 'problems' of C now they aren't probl by Anonymous Coward · · Score: 0

    You can have stupid security issues in the strongest typed languages. That's a wash.

  43. C++? by Cesare+Ferrari · · Score: 1

    Unless I've totally misunderstood the article, why isn't he telling people to move their projects from C to C++? Isn't the basic concept a better C, with give or take no surprises recompiling your C with a C++ compiler, and trickling in new language features which are applicable to your code base?

    Of course, he could be lumping C and C++ together into one bucket, which to be honest, I tend to do but coming at it from the other direction (assuming you mean C++ when you say C). However, his mentions of what is wrong with C make me suspect he isn't. It's a bit of a major omission from the discussion if he isn't...

    Now personally I rather like C++ as i'm writing realtime software, both soft and hard, and so I need to worry about and control memory allocation. False sharing is a concern, performance is critical (there's no upper limit to the required throughput, faster is always better for this code base). Until someone can offer an alternative, i'll be sticking to C++.

    1. Re:C++? by Anonymous Coward · · Score: 0

      why isn't he telling people to move their projects from C to C++? Isn't the basic concept a better C, with give or take no surprises recompiling your C with a C++ compiler, and trickling in new language features which are applicable to your code base?

      Enough people, most likely esr included, believe C++ is not "better C".

    2. Re:C++? by Anonymous Coward · · Score: 0

      Unless I've totally misunderstood the article, why isn't he telling people to move their projects from C to C++?

      Because it is more than 50 years after Fortran and you still cannot create libraries manipulating multidimensional arrays in a standard way? Every library invents its own multidimensional array classes, all incompatible with one another.

      extern "FORTRAN" gives you LINPACK and BLAS.

      How fscking insane is that? 50 years, for Chrissake. I think C++14 finally had mandatory multidimensional array parameters with variable size. So C++17 had to go and make that part of the language _optional_. No wait, those were the respective C standards I think. C++ has not caught up yet even optionally.

  44. C, The Last Stepping Stone by Anonymous Coward · · Score: 0

    We don't need, want or deserve something safer, more elegant, less terse to avoid constant interpretation or near ambiguity. Briar rabbits wait for a prepared set of arguments to knock over.

    Remember, we won't be able to join the Galactic Federation until we.

    1. Get rid of nukes.
    2. Stop destroying our own environment.
    3. Enjoy world peace (yes, you also have to enjoy it).
    4. Stop oppression and supremacy.
    5. Find a replacement for C.

    Building a warp core might also help.

  45. Slashdot Subject Strikes Again by Anonymous Coward · · Score: 0

    Anyone else read this as 'ESR Sees Three Vitamin Alternatives to C?' Was thinking it was awhile since they invented a new vitamin, how disappointed I am that we still only have B, C, D, and uh some other ones that I can't remember.

  46. Re:Solve the 'problems' of C now they aren't probl by phantomfive · · Score: 1

    You're scare-mongering. At least, you're trying.

    --
    "First they came for the slanderers and i said nothing."
  47. Re:C was technically obsolete by the 1970s by PhrostyMcByte · · Score: 1

    Well written C# and Java is actually more efficient than C/++. Partially because it can do whole of program optimization. Partially because it can optimize for a particular processor rather than a generic one at a separate compile time. Partly because garbage collections minimizes the need to copy data structures (particularly in C++), and smart pointers are grossly inefficient compared to generational garbage collection. Partially because it allows focus on algorithms rather than fixing nasty bugs.

    As someone who writes a ton of C# and C++... no. C# might be fast enough, and things trivially transcribed can be faster due to default implementations, but, C++ will literally always win in the end. It might take two or three times longer to write the C++, but it will win. That's kind of the reason C++ still exists: if you need to, you can make it fast. For everything else there's [insert high-level language here]. Because things like C# only let you go so far with optimization, and then C++ lets you go ten steps further.

    The promise of "the JIT will just make it all faster in the end" is an old one that has been made for decades by JITed languages. The promise has never been fulfilled -- it's pie in the sky marketing fluff.

    GC is good for certain highly scalable lock-free algorithms, though. I'll give it that. Not much else.

  48. Fuck python by Anonymous Coward · · Score: 0

    Tab or space freedom

  49. What language will replace English? by tgibson · · Score: 1

    Isn't that the apropos analogy? Let's do something as simple as keeping English the same, except for making its spelling phonetical. Any takers? An argument can be made that putting the current and "improved" version of English side-by-side, the phonetic version makes more sense.

    Inertia, legacy, and culture are as much a part of C as the BNF diagrams are.

  50. There are no flaws in C... by bug1 · · Score: 3, Interesting

    There are no flaws in C that cant be fixed by becoming a better programmer.

    1. Re:There are no flaws in C... by Anonymous Coward · · Score: 0

      There are no flaws in C that cant be fixed by becoming a better programmer.

      There are more programmers than computer languages, so fixing the language is more efficient.

    2. Re:There are no flaws in C... by dunkelfalke · · Score: 1

      this is like saying that you can carry water in a bucket with a hole in it by becoming a faster runner. it is possible, but impractical and borders on masochism.

      --
      "It's such a fine line between stupid and clever" -- David St. Hubbins, Spinal Tap
    3. Re:There are no flaws in C... by drinkypoo · · Score: 1

      this is like saying that you can carry water in a bucket with a hole in it by becoming a faster runner. it is possible, but impractical and borders on masochism.

      Or you could stick your finger in the hole.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    4. Re:There are no flaws in C... by dunkelfalke · · Score: 1

      and that would be c++

      --
      "It's such a fine line between stupid and clever" -- David St. Hubbins, Spinal Tap
    5. Re:There are no flaws in C... by mark-t · · Score: 1

      Argh.... I hate you for using that analogy.

      Now I have that annoying song going through me head about there being "A hole in the bucket, dear Liza, dear Liza..."

      Damn you.

    6. Re:There are no flaws in C... by Anonymous Coward · · Score: 0

      +1 profoundly stupid comment. Exchange "C" with any other language, and you will see why.

    7. Re:There are no flaws in C... by Anonymous Coward · · Score: 0

      It is amazing how often technically true statements make the best lies.

    8. Re:There are no flaws in C... by phantomfive · · Score: 1

      There are no flaws in C that can't be fixed by becoming a better programmer.

      Nice quote.

      --
      "First they came for the slanderers and i said nothing."
    9. Re:There are no flaws in C... by Anonymous Coward · · Score: 0

      s/ C / anything
      s/ programmer / person

      Your statement may be true, but as a practical guide to - well, anything - it's meaningless.

    10. Re:There are no flaws in C... by serviscope_minor · · Score: 1

      Nah C++ would be building a much larger bucket which encloses 99.5% of the original bucket. Except the original bucket forms part of the side of the new one so it still leaks if you hold it at the wrong angle.

      --
      SJW n. One who posts facts.
  51. C versus C++ performance by Anonymous Coward · · Score: 0

    As the C++ compiler compiles most C just fine, I have a hard time believing that you canâ(TM)t make C++ as efficient as C.
    To be honest, I think it is an âoeurban mythâ, that C is faster and more efficient than C++ - just disable exceptions support in the compiler (it is useless anyway).

    Of course, when writing C++, you can easily end up with code not as memory efficient due to STL and templates, if you use then without thinking.

    I for instance, made an automatic serializer with templates at a former job: it ended up using 1.5Mb in typeinfo - was the platform had 16Mb RAM in total.
    Solution: compile without runtime type info and exception support and remove a lot of memory and runtime overhead.

    1. Re:C versus C++ performance by short · · Score: 1

      Memory is cheap, CPU is expensive. The problem of C is that it uses void *userdata everywhere as it has no templates. And unprefetched pointer reference is lethal for modern processors stalling for hundreds of cycles. As an illustration GCC was using horrific #defines to substitute missing templates and despite that after GCC got converted to C++ STL vectors got even faster.

  52. This is the bottom line by whyyisthissohard · · Score: 1

    C/C++ directly, logically, objectively follows from assembly language.
    Until the fundamentals of computer systems are changed, C/C++ is here to stay. FOREVER.

    Anyone who disagrees has fallen in with charlatans who are trying to carve out their piece of the pie by making maladapted tools for people who have no business programming anything to begin with. We don't need to market engineering to incompetents. In fact we need to NOT do that.

    Sure you have specialized languages for specialized tasks....but systems run on C/C++.
    The end.

    1. Re:This is the bottom line by Anonymous Coward · · Score: 0

      C/C++ directly, logically, objectively follows from assembly language.

      So where is my Carry flag? Where are the mixed precision multiplication and division operations? If you ever wanted to implement multiple precision arithmetic the way processors are designed and assembly language makes accessible, C really trips you up.

      Hooray for GCC's assembly language templates, but C they aren't.

  53. Problems with C pointers/memory allocation? by CustomSolvers2 · · Score: 1

    Although C was the first language I properly learned and I have extensive experience in quite a few C-based programming languages, I haven't used plain C much until since about 4 months. I relied on it for a reasonably complex and big development (although R&D, no-time-pressure one) and, as a way to compensate the numerous differences between C and the languages which I use on a regular basis, I created a set of methods to somehow emulate the modern-language conditions and simplify the pointers/memory allocation aspects (note that this piece of software is mostly dealing with string variables of any size). After some struggling, I have been able to come up with a light and reliable methodology allowing me to not worry about all the memory problems in C. I guess that experienced enough programmers are comfortable with their own approaches and that's why my question is for kind-of-newbie ones: will you, C-newcomer, appreciate a small library (+ clearly defined methodology to use those methods) allowing you to easily and safely deal with strings (arrays too if you wish) of any size (via malloc)?

    The aforementioned set of methods have been an unintended consequence of my adaptation from modern programming languages to C. I have got so used to these approaches that I will certainly rely on them for future C developments. In any case, I am completely aware about my relatively short experience in this language and the problems which the users face at the start; and I don't want to release a new library promising a solution for either a non-existent or solved-many-times-before problem. So, any developer having problems with these C aspects care to share his/her thoughts?

    --
    Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
  54. A new c... by fyngyrz · · Score: 5, Insightful

    I think if people wanted a broadly more powerful language they'd move right to C++, but they don't -- so we need to look at why that is, and maybe we'll have a better idea of what a "new C" could possibly look like.

    I think a "new c" might look a lot like Go - without the handicap of garbage collection.

    There hasn't been a garbage collector written yet that doesn't constitute an outright insult to performance and predictability.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:A new c... by Anonymous Coward · · Score: 0

      You should really watch some of the videos when Go 1.5 came out. The GC is no longer stop-the-world, and the performance hit is almost undetectable compared to other languages in 1.8 and newer. They've really achieved something amazing.

      Reference: https://www.youtube.com/watch?v=aiv1JOfMjm0

    2. Re:A new c... by roca · · Score: 1

      Sounds like Rust is for you then.

    3. Re:A new c... by fyngyrz · · Score: 4, Interesting

      I can report that in a Go project in which a raft of objects had to be moved out of the heap - because the Go garbage collector was constantly looking at them (this was a multi-million element tree) to see if they need to be dumped, some significant performance gains were achieved by getting 'round the GC. The final code eded up with nothing but the root of the tree in the heap, and the rest... not. GC time wasted was culled, overall it was a definite win. The code's in production and running well.

      Also - this was in June/2017. It was Go 1.8.

      --
      I've fallen off your lawn, and I can't get up.
    4. Re:A new c... by fyngyrz · · Score: 1

      Nah, c is for me. :) I just think Go has some of the right ideas, particularly WRT concurrency.

      --
      I've fallen off your lawn, and I can't get up.
  55. C is not an application programming lang by Anonymous Coward · · Score: 0

    Nothing else quite does what C does. It has no real competition (except maybe C++) in its niche.
    What you must recognize is that application programming is NOT C's niche.

  56. No, short of asm, c is the best performer. by fyngyrz · · Score: 2

    There are constructs I can create with template metaprogramming that even C cannot match the performance of.

    That just means you could be better at c. Because there is nothing you can't write in c; c gives you absolute control of everything. The questions are:

    o Do you have the time?
    o Do you have the skill?

    Most people aren't willing to say yes to the first, and most people can't honestly say yes to the second (and that's given us a lot of very bad c code. But it's not c that's the problem. It's the raft of so-so and worse programmers that have built things in it.)

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:No, short of asm, c is the best performer. by serviscope_minor · · Score: 1

      That just means you could be better at c. Because there is nothing you can't write in c; c gives you absolute control of everything. The questions are:

      Except you can say the same about ASM too, which does give you even more control than C. But as you pointed out, most people don't have the time.

      --
      SJW n. One who posts facts.
    2. Re:No, short of asm, c is the best performer. by fyngyrz · · Score: 1

      Well, you can't quite say the same, because going to ASM loses some significant cross-platform capability and in a cross-platform environment, there are indeed things you can't write in ASM.

      If you want to be (absurdly) reductionist, you can write pretty much anything in binary. But...

      I should mention that I love writing ASM, and have been doing it for many decades. :)

      --
      I've fallen off your lawn, and I can't get up.
  57. I see three viable alternatives to ESR by Anonymous Coward · · Score: 0

    Just kidding. It's more than three. I mean, ESR is a reimagining of RMS in a more modern manner, just without everything that would actually be important.

  58. Re:Solve the 'problems' of C now they aren't probl by roca · · Score: 2

    Yeah, but better languages eliminate whole classes of security bugs that plague C programs, including the bugs that hit dnsmasq.

    This is one of the lamest defense of C: "You can't prevent all bugs, so why bother trying to prevent any".

  59. Why C++ is an insane language by roca · · Score: 4, Informative

    The answer is here: https://bugs.chromium.org/p/ch...

    1. Re: Why C++ is an insane language by Anonymous Coward · · Score: 0

      You misunderstood the problem.

  60. Re:C was technically obsolete by the 1970s by Yaztromo · · Score: 2

    BTW. Probably the most evil thing that C has inflicted upon the world is counting from 0. All pre C languages count from 1, as do children. And then it all changed. And we will live with off by one errors for the rest of time.

    Can I just leave this here?. I feel like I need to leave this here for you to read.

    Yaz

  61. The Problem With Me-Too Languages by ytene · · Score: 4, Interesting

    I don't consider myself to be a programmer by profession, although I have been in the past, with experience spanning quite a range of different language types, including COBOL (74 & 85), FORTRAN 77, BASIC, JAVA, PHP, Visual BASIC (up to 5.0), VBA and Assembler (several different CPUs).

    When I started to learn programming languages at high school, the number available was relatively small (compared with today) and the differences between them relatively significant. Each language was specifically designed to solve a reasonably well defined set of problems. If you were working mainly with mathematical problems such as with physics or engineering, you'd use FORTAN. If you were developing applications for business, you'd use COBOL.

    Look again at the syntax and structure of these languages and their origins, architecture and design are clear.

    I am very (very!) sorry to all those professionals currently working in the field of programming language design if what follows is offensive, but we seemed to have entered an age in which a "fantastic" or "revolutionary" new language is released every few months. The better ones then follow the Gartner Hype Cycle before drifting back into obscurity. The mediocre ones never seem to make it even close to widespread adoption...

    We now seem to have reached a point where, instead of designing and developing a programming language to solve a specific business, scientific or technical problem, language designers are simply stealing primitives and ideas from existing languages and throwing them together into a framework before declaring their solution to be "The Next Big Thing (TM)". Of course this is a generalisation - every now and then we see some really remarkable innovation happening in the language space. JAVA for example, with it's aim of "write once, run anywhere" and it's much improved memory handling, would be a valid example.

    But in my ignorance I can't help but look at the current state of programming languages and think that too much of what we see today is just different, not necessarily better. Perhaps the most egregious mistake I see us making, as an industry, is that we're losing sight of the fact that programming languages should be designed to be easy. Remember the relevant portion of ESR's own "Art of Unix Programming", the Rule of Representation, which says, "Fold knowledge into data, so program logic can be stupid and robust."

    Do we see modern languages with the data handling sophistication of COBOL, for example? No. That's acceptable if the new language has a well-defined set of design goals that don't include data handling, but if not, I think we need to think very carefully about that old maxim, "all progress is change, but not all change is progress"...

    So whilst I'm always interested in learning about developments in programming language design, I think it helps if we ask a few fundamental questions of a new language:-

    1. What are the specific goals and design requirements of this language? How well does it meet them? Are there any compromises made in doing so ... and, if there are, are they acceptable?

    2. Of all existing programming languages that exist today, which one or ones are closes to this new offering in terms of goals and design requirements? Having identified the competition, what are the features and key differentiators of this new language that make the existing language obsolete? Are we certain (for example), that before embarking on an all-new language, that it is impossible to extend the legacy competition with new language primitives?

    3. Given that all design decisions are in fact compromises by another name, what is/are the impact(s) of the design decisions taken that differentiate this new language from the competition? [If these yield benefits, then wonderful; if they bring costs, then are we willing to accept them?]

    4. What is the learning curve like? Does the new language include weaknesses that yield to commo

    1. Re:The Problem With Me-Too Languages by Anonymous Coward · · Score: 1

      It is surprising in all these discussions that SPARK and Ada are not mentioned. Ada tends to be overlooked because it is an "old" language and no one would want to use it. Even SPARK is based on Ada. The problem is that they address those issues you mentioned better than other languages including "newer" ones. Search for 11 Myths about Ada (sorry, myths about Ada just finds things about diebetes or disability acts) if you want to find out why to consider Ada.

    2. Re:The Problem With Me-Too Languages by jrumney · · Score: 2

      I like how you dismiss newer languages as "simply stealing primitives and ideas from existing languages and throwing them together" but hold up Java as an example of a really innovative language for stealing a subset of the syntax from C++ and the VM and garbage collection from Lisp and throwing them together.

    3. Re:The Problem With Me-Too Languages by ytene · · Score: 2

      An entirely fair cop!

      I should have augmented my reference to JAVA with exactly the point that you raise - I did not mean to infer that it was somehow exempt from the problems seen elsewhere, only to offer it as an example of a language that had actually contributed some new thinking to language design. [ At least, I *think* that some of what JAVA offers is original thinking, although I'd be happy to concede that the example was poor if someone can correct me].

      If we could return to the principle, however, I think that programming languages has become one of those aspects of technology where we see "change for the sake of change", not "change because we have identified a better way".

      In some cases we can identify specific design requirements for languages that bring about diversity: for example, a language that was designed for GUI environments would necessarily contain architecture and primitives specific to the needs of handling GUI artefacts, whilst a language designed for batch processing [say on a mainframe] would have no such needs and could therefore be simpler and smaller.

      I acknowledge and embrace the value of [programming] language diversity as a means to solve different classes of problems, but I am far less tolerant of "new" languages that add nothing new or of value...

      Perhaps I could better express this a different way. Consider the class of software program that is the Word Processor. Now imagine that you have several different tasks to complete using your Word Processing program: you are going to write a book, write a letter to your sister, submit a legal motion for a court case and prepare a to-do list of chores that you need to complete around your house this weekend. These are all different use cases for a word processor, but would you seriously comprehend using 4 different text-editing applications, one for each task? In the vast majority of cases and with the vast majority of people, the answer would be know. We rely on our Word Processing package to have the right selection of capabilities to be there when we need them, including formatting, indexing, colour and font management, spell-checking and layout features.

      Why, then, do we expect to use four different programming languages when tasked with writing software to fit equally similar use cases or paradigms?

      I should stress that I'm *not* suggesting we revert to a one-size-fits-all solution when it comes to software. If that were the case we'd all still be writing in the first languages to be developed. But what I am suggesting is that the introduction of new languages no longer occurs because we've identified a new use case that no existing language meets, but because of far less stringent or valid arguments. As technologists, we should be wary of this sort of change to technology. It rarely leads to better.

    4. Re:The Problem With Me-Too Languages by ytene · · Score: 1

      I've not programmed in Ada, but I did come across a couple of guys - in fact when I was attending a COBOL course - who were converting. They both loved it.

      They told me that it was [in the mid-late 80s] still quite popular among defence contractors and within Western militaries]. Their assertion was that although it was not the easiest language to program in, once you had something compiled, you could pretty much guarantee that it would work as expected, because the compiler was ruthless when it came to rooting out bugs.

      I honestly don't know if any of that is true - it just stuck in my memory from a 30-year-old conversation. But if it is true, then it helps to show how a language designed to have the right features, for the right reasons, can be a real benefit to the user community. Let's be honest - would we feel safe flying in an aircraft with avionics written in some dodgy, scruffy programming language that had been invented a couple of month's previously? No. Aviation goes to excruciating lengths to ensure that "flying code" is robust and safe - they need languages that make that task if not easy then at least transparent.

      My concern with the non-stop flood of languages that we see coming to market today is that the authors may not have done as much diligence on the use cases as they have done with ensuring that the syntax-checking code is working. That makes me nervous...

  62. A speed comparison between some languages by CustomSolvers2 · · Score: 0

    After reading some of the comments in this thread, I went ahead and recorded a small video comparing the performance of various languages (C, Java, C#, PHP and Python) in a simple while loop. The results are simply unarguable. You can (dis)like C (or any other language) and use it or not; it might even not be recommendable under quite a few conditions. But, at least, be aware (or/and honest) regarding what it can do better than any other language. Here you have the video and, please, bear in mind that my talking-to-camera skills are quite bad :)

    --
    Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
    1. Re:A speed comparison between some languages by CustomSolvers2 · · Score: 1

      Downmodded as redundant?! This is new! Well... if the ideas in that video are clear to everyone (they should be, although quite a few comments here or in previous threads seem to indicate otherwise), I guess that everything is OK.

      --
      Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
    2. Re:A speed comparison between some languages by Yosho · · Score: 1

      The results are simply unarguable.

      Well, except that the only thing you've shown is that C is faster when the only thing you're doing is incrementing an integer inside a tight loop. There are a variety of reasons why that isn't necessarily applicable to real applications, not the least of which is that you would never actually do that in a real application.

      If you want to create a useful benchmark, you'll need to test a wide variety of operations -- floating point math, string manipulation, memory allocation/deallocation, threading, recursion, and so on. And I feel like you might be surprised at how Java's thread concurrency or large string manipulation perform compared to C's...

      --
      Karma: Terrifying (mostly affected by atrocities you've committed)
    3. Re:A speed comparison between some languages by CustomSolvers2 · · Score: 1

      Well, except that the only thing you've shown is that C is faster when the only thing you're doing is incrementing an integer inside a tight loop. There are a variety of reasons why that isn't necessarily applicable to real applications, not the least of which is that you would never actually do that in a real application.

      Sure. I highlighted this fact in different parts of the video. I wasn't implying that C is absolutely better in any scenario, but at least for the kind of applications where this language is supposed to be used. For example, in any implementation relying mostly on simple programming structures like loops, conditions and simple collections, C is definitively faster. Typical situations where you can find this are core/basic/engine parts taking care of the most essential actions. For more complex situations where other functionalities might be preferred (e.g., heavy use of modern-language in-built functions analysing different array aspects), the comparison and even weighting in things like implementation difficulty would be much more difficult to perform and the absolute superiority of a specific language very unlikely to occur.

      If you want to create a useful benchmark, you'll need to test a wide variety of operations -- floating point math, string manipulation, memory allocation/deallocation, threading, recursion, and so on. And I feel like you might be surprised at how Java's thread concurrency or large string manipulation perform compared to C's

      The main point of this video was to highlight the impressive superiority of C on a very specific aspect. I was quite surprised myself when I firstly saw it. In fact, I have confirmed that certain assumed-to-be-theoretically-faster algorithms are actually slower in C than the slower-in-other-languages-simple-loop-based alternatives! What I am showing in that video isn't just C being faster, but C loops being unrealistically faster than anything else!

      --
      Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
    4. Re:A speed comparison between some languages by CustomSolvers2 · · Score: 1

      BTW, have you donvoted the video? Is there anything wrong with it to deserve a so aggressive reaction, as opposed to mere inactivity? Is there any accuracy in what I am showing/saying that might have a negative impact in future viewers? Don't feel offended! I am always interested in understanding what is the motivation for people to easily downvote/censore others. Personally, I only do that when strictly required because of seeing it as some kind of aggression on others which, as such, should be have a fair motivation.

      --
      Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
    5. Re:A speed comparison between some languages by Anonymous Coward · · Score: 0

      So instead of just "feeling" that Java is fucking wonderful, why don't you do some work and surprise us with, you know, a demonstration using basic building blocks so that we can build some kind of model which permits us to extrapolate from said building blocks, non-linearly, according to the mix and complexity of the systems we are interested in?

      Because every time I look at a Java application, I am stunned by how poorly it performs in the real world. No doubt you'll be too busy to do this anyway, probably have to raise an emergency change to increase the heap size because your latest JMS monstrosity is flaking out and losing messages, or something.

  63. Three letters: jai by Anonymous Coward · · Score: 0

    Jonathan Blow's jai is the only promising c replacement I've seen.

  64. Kotlin Native by Yuki_Kitai · · Score: 1

    Kotlin Native is also a very interesting option

  65. Re:Solve the 'problems' of C now they aren't probl by MrMr · · Score: 1

    So memory guards and other clever debugging mechanisms are not a good idea for code that needs to run quickly? Any new language out there that is built on that idea, or do I just keep using the COMMON and EQUIVALENCE statements?

  66. If it isn't a viable alternative, it can't be... by Anonymous Coward · · Score: 0

    an alternative, so says the late great Edwin Newman. It can be an impractical, inelegant, unethical or fattening alternative, however.

    Meanwhile, we might have had a viable alternative to ESR, but what we got back from the transporter didn't live very long.

  67. Re:Is it time to Round Up the Muslims? by Hognoxious · · Score: 1

    The police department's job would be very difficult and expensive without guns.

    Because if guns didn't exist they'd have to use crossbows to deal with crossbow-armed robbers?

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  68. Re:Is it time to Round Up the Muslims? by drinkypoo · · Score: 1

    Except that's bollocks, and Samuel Clemens never invented anything, so what would he know about it? All of those things were major leaps, and the first man to make the major leap got the credit in most cases.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  69. Re: Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    My irony meter just exploded :(

  70. Re:Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    Samuel Clemens never invented anything

    Wrong. He received three patents for three inventions.

    so what would he know about it?

    More than you.

  71. Zero count by aberglas · · Score: 1

    When the C++ complains that parameter 1 of a method has an inconsistent type, which one is it talking about? The 1st or the 2nd? Example of confusion.

  72. Re:C was technically obsolete by the 1970s by aberglas · · Score: 1

    Have you ever measured it?

    I have.

  73. C0 by Anonymous Coward · · Score: 0

    The idea of Cx sounds very similar to the C0 project at Carnegie Mellon University. See

    http://c0.typesafety.net

  74. Re:Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    A filthy muslim invented the camshaft which converts rotational force (engine) into linear motion (like driving your car to a different place), which makes an even earlier invention (the wheel) much more useful. Unfortunately this includes American hot-rods and muscle cars. Each of them conceals a filthy muslim idea deep inside, which enables them to be totally badass -- instead of just a rumbling, gay piece of shit couch on wheels.

    Food for thought.

  75. *hint* by Anonymous Coward · · Score: 0

    https://dlang.org/

  76. Re:That's Beyond Fucking Retarded by Anonymous Coward · · Score: 0

    ESR is a fat, mentally-retarded homosexual

  77. Um, gee, why is this so difficult? by Anonymous Coward · · Score: 0

    These sorts of pronouncements are made every decade or so. Gee, what is it about C that makes it so popular as a low-level alternative to assembly?

  78. why go and rust? by nten · · Score: 1

    Why does everyone mention these two together? Rust has no GC and is faster than C++ in most benchmarks, and GO has tiny pause but low overall speed GC and is slower than java in most benchmarks. Benchmarks aren't real software but they do show trends. GO has trouble with memory allocation performance for instance. Rust's problems are mostly ergonomic (and nontrivial), performance and undefined behavior they have down. They are completely different languages for completely different uses.

    --
    refactor the law, its bloated, confusing and unmaintainable.
    1. Re:why go and rust? by mark-t · · Score: 1

      Rust has no GC and is faster than C++ in most benchmarks

      Uh... no. Not even close. The occasional benchmark might be faster, but definitely *NOT* most. Box and whisker plot comparing several languages, highlighting Rust

  79. Re: Solve the 'problems' of C now they aren't prob by Anonymous Coward · · Score: 0

    Except that's a strawman, nobody uses that argument. The analogy is that C is a razor sharp katana. You can hurt or kill yourself if you don't know what you are doing, and have not trained to use it correctly; yet it is far superior to go into battle with than, say, a pair of safety scissors. There are people out there that advocate safety scissors and say we should all be using them, but for going into battle they suck.

  80. Go -- long term alternative? by NikeHerc · · Score: 3

    Any developer worth his salt should be very, very wary of any tool or app that comes from google; they have a nasty habit of providing things that eventually disappear.

    --
    Circle the wagons and fire inward. Entropy increases without bounds.
    1. Re:Go -- long term alternative? by Anonymous Coward · · Score: 0

      > ...they have a nasty habit of providing things that eventually disappear.

      Read the fine license. It's immunity against this sort of behavior:

      https://github.com/golang/go/blob/master/LICENSE

      It's possible that one day noone will give a fuck about Golang and there will be zero people working on it, but the same can be said of _every software project on the planet_.

    2. Re:Go -- long term alternative? by Anonymous Coward · · Score: 0

      When it's delivered as SaaS, yes.

    3. Re:Go -- long term alternative? by Anonymous Coward · · Score: 0

      Normally I'd agree with you, but Google asserts that there is a very healthy outside contributor base to the core language and its library, and the entire language is MIT-licensed, so Google couldn't pull the rug out now even if they wanted to.

      I dearly hope Go is the exception to the rule; it appears to be getting widespread usage that will ensure it escapes the nest...

  81. ADA by Anonymous Coward · · Score: 1

    is still around and used

  82. Re:Go -- long term alternative? Not until... by CRB9000 · · Score: 1

    Not until they create Visual Go# and add it to the Mono project.

  83. College Curriculum Committee Meeting by Latent+Heat · · Score: 1

    Thanks for the tip on the Julia language for numerical work.

    A proposal came up in committee for an Engineering course emphasizing numerical programming. Julia was in the list of languages along with Matlab and maybe one other that the instructor proposed to approve for student projects. I didn't question that because we give a course proposer latitude in that sort of thing, but I wondered whether that was an odd personal preference by that instructor. One comment below suggests that Java is an odd personal preference on my part, but we actually have an introductory programming class taught in Java "on the books."

    I now know that Julia is a language other people are adopting for that use.

  84. BCPL by Anonymous Coward · · Score: 0

    Actually, the language that C is derived from is BCPL. BCPL begat B, B begat C, and C begat C++.

    If we were to follow this orderly procession, the next logical step is to program in P. I, for one, am looking forward to programming in P.

  85. Re:Solve the 'problems' of C now they aren't probl by Anonymous Coward · · Score: 0

    Yeah, that's the same technique I use with my girlfriends! Condoms aren't 100% effective at prefenting pregnancy and STDs, so I don't need to use them.

    dom

  86. Three alternatives to TV/Cable by Anonymous Coward · · Score: 0

    Youtube, Netflix, and SuperTVstreamer.com.

    One of these is different than the others. ...

    A standard Cx language introduction would get less coverage than a fake/presumptuous comparison.

    Nice try... it worked, I looked up Cx. But no interest until wider adoption.

    'Go' has traction. Node has traction.
    'Rust' has none. assumed dead.
    Cx needs some users/code before anyone would put it on a list.

  87. where did you find that? by nten · · Score: 1

    This is what I find.

    http://benchmarksgame.alioth.d...

    --
    refactor the law, its bloated, confusing and unmaintainable.
  88. wood considered passe by epine · · Score: 2

    C is perfectly fine for most of what it is used for, and there is a huge amount of legacy code (plus toolchains, IDEs, and much much more) that exist in the C domain.

    C persists because its designers decided to invent a language to express how the world actually is, rather than how faddish humans would like that world to be (in particular, even LISP doesn't entirely pass this test, because—like it or lump it—real computers are state machines).

    C is not perfectly fine, though it's perhaps the adequate and (mostly) comfortable marriage we've long had, warts and all.

    ESR, I've slowly learned, is generally full of shit. Long ago I was fooled by his giant, noisy he's-one-of-us hat. But over time I came to perceive that he is primarily a noisy propagandist, who almost always wades into a debate to noisily send it down the river in the wrong initial direction.

    Here he builds his entire case around the dangerous word "replacement", invoking the metaphorical reasoning processes associated with small, painstakingly divisible pies. What he is simultaneously hiding behind his back is the glove metaphor: that every language has a natural application domain where it excels for some people, at least some of the time (or it will soon wither and die).

    What's he's trying to argue is that some other languages now exist that don't instantly disqualify themselves (due to stupid, faddish design decisions) from potentially becoming the next hegemonic ecosystem for all things systems programming-ish (C would remain the size of India for decades to come, even if China ultimately asserts itself as the new, "uncontested" superpower).

    [*] Hegemonic thinking and the human predilection for fads are fused together at the hip bone.

    He also means that within the next five to ten years, C might develop and increasingly strong legacy body odor (as if your grandfather's shaving cream didn't already have such a smell).

    The legacy smell of C is that of a hearty pioneer, after many decades of a life well lived, who ain't dead yet, not by a long shot.

    Stewart Brand: Good Old Stuff Sucks (2008)

    The Christmas mail order catalog people know what my age group wants (I'm 69). We want to give a child wooden blocks, Monopoly or Clue, a Lionel train. We want to give ourselves a bomber jacket, a fancy leather belt, a fine cotton shirt. We study the Restoration Hardware catalog. My own Whole Earth Catalog, back when, pushed no end of retro stuff in a back-to-basics agenda.

    Well, I bought a sequence of wooden sailboats. Their gaff rigs couldn't sail to windward. Their leaky wood hulls and decks were a maintenance nightmare. I learned that the fiberglass hulls we'd all sneered at were superior in every way to wood.

    Remodeling an old farmhouse two years ago and replacing its sash windows, I discovered the current state of window technology. A standard Andersen window, factory-made exactly to the dimensions you want, has superb insulation qualities; superb hinges, crank, and lock; a flick-in, flick-out screen; and it looks great. The same goes for the new kinds of doors, kitchen cabinetry, and even furniture feet that are available — all drastically improved.

    Brand is a kinder, gentler, less rhetorically clueless ESR, and here he gives us a third metaphor: C as wood. Many an aspiring bullshitter has announced to the world this or that "wood replacement". For a long time, most of those wood "replacements" sucked. That was Brand's middle phase.

    Now for many purposes (e.g. window frames, etc. etc. etc.) we have wood replacements that don't suck.

    Roll the presses! Wood considered passe.

    The thing is, humanity has never really needed a wood replacement. Wood is pretty good at many things. We've been using wood for a long time. I mean—crikey!—Jesus once listed carpentry on his brief CV. But that doesn't mean we shouldn't continue to pursue other materials or not find other great ways to build stuff.

    It does mean, however, that wood considered passe is typical ESR weak sauce.

  89. Just stupid, "Cx?" did they mean C++? by mlwmohawk · · Score: 1

    I'm an old timer. I learned how to program on punch cards. That being said, I consider myself "current." I follow the trends, I look at the language fads. Try new things, etc. Pure and simple: the reason why "C" is what it is because it is a simple language who's constructs can be implemented natively on almost all computer hardware. No matter what comes next, if it can't do that, it can't replace C.

    That last attempt at improving C was C++. Sadly, C++ fell victim to what is going to kill any presumptive "C" replacement. The language wonks are idiots. Where computer languages work (IMHO) is where they allow better organization of code, i.e. structures, classes, functions, libraries of functions, etc. in the way computers work. Structures are a grouping of variables, classes are nothing more an enforcement of a naming policy. Where they fail, IMHO, is when they try to create meta constructs that aren't really based on the underlying hardware. Take for instance "lambda functions" there is no such thing in the computer hardware.. Dump out the assembly, its just a function. It serves no purpose other than to make some language wonk happy. It doesn't make the code more readable, doesn't make it more efficient, its just there to be cool. I'm old enough to realize that "being cool" sucks.

    So, getting back to my point. C is a truly functional language. It doesn't have the fashionable affectations that language wonks like, and that's why it will remain supreme in OS development.

    1. Re:Just stupid, "Cx?" did they mean C++? by david_thornley · · Score: 1

      "Language wonks", as you term them, spend a lot of time studying how programming languages are actually used and how they can be improved. They aren't always right, but don't dismiss them out of hand.

      The job of a computer language is not usually to be a better assembler. It serves as the bridge between programmer and computer, and needs to be understood by the programmer as well as the compiler. We can express problems in quite a few ways now and still have quick compilation to efficient code.

      The assembler languages I've used don't have functions. They're constructs in the language. The ones I've used most heavily, which are rather old, don't necessarily have floating-point arithmetic. A for() loop is another construct. Even C is abstracted from the machine.

      Lambdas are functions, yes, but they;'re functions that can be written where they're used, and can therefore be clearer and easier to read.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  90. intrinsics by nten · · Score: 1

    Also, it may not matter but many of those benchmarks where c and c++ win, like n-body, platform specific intrinsics are used. Rust is the fastest platform independent solution for n-body. I expect it to get even faster once they incorporate an llvm with newgvn enabled. The clear partitioning of speed is c,c++,rust, and then everything else. They stand alone of the languages in the benchmark game. If I were to take a step down to java speeds go would definetly be in the running along with swift and c#, but those are the languages I would compare go to, not systems languages that make absolutely no compromises to ease of use.

    --
    refactor the law, its bloated, confusing and unmaintainable.
  91. What about Ada? by Anonymous Coward · · Score: 1

    Are we just going to pretend it doesn't exist now?

    1. Re:What about Ada? by hedley · · Score: 1

      Use it all the time for my embedded stuff. Even on a $2 bluepill. http://www.hrrzi.com/

  92. Re:C was technically obsolete by the 1970s by mlwmohawk · · Score: 1

    "Well written C# and Java is actually more efficient than C/++."

    Provably false.
    First problem: Define "efficient."
    Second problem: You do know that java is written in C. Think about that for a moment.
    Third problem: Are you including the virtual machine in that assessment?

    " Probably the most evil thing that C has inflicted upon the world is counting from 0"
    Yes, because roman numerals work so well in math.

  93. Re:C was technically obsolete by the 1970s by mark-t · · Score: 1

    The fencepost error you are talking about was hardly invented with C. It existed in assembly, which C largely imitated, and for high level languages, I seem to recall that Basic had 0-based arrays as well, which itself was invented over half a decade before C.

  94. Some things just don't change by Anonymous Coward · · Score: 0

    The language wars is a team sport. Following the death of objectivity all we are left with is the exhortations and hand wringing from the inexperienced and uninformed looking for a new toy to love. A common behavior from those with a primary need for affiliation [1]. Ok everyone, dicks on the table. Let's see who's got what it takes.

    The truly experienced do not participate in the language wars. They get their jobs done and enjoy the fruits thereof.

    [1] - https://en.wikipedia.org/wiki/Need_theory

  95. The Nim Language by Feneric · · Score: 2

    I'd argue that the Nim language is another modern alternative to C.

  96. Re:Is it time to Round Up the Muslims? by Hognoxious · · Score: 1

    Yeah, but they were all like "... via the electric telegraph".

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  97. Re:C was technically obsolete by the 1970s by PhrostyMcByte · · Score: 1

    Perf is very important to me, so yes I've measured. You've reached a flawed conclusion from whatever you measured.

    When I started writing C#, coming from C++ it would drive me nuts seeing all the blatantly wasted instructions, memory bloat, indirection, and extreme lack of locality that .NET has. It relies very heavily on the CPU's branch target prediction and cache to be reasonably fast, which has the effect of your "hot path" needing to be smaller in C# than it needs to be in C++.

    It's been a decade since I started using C# and it still occasionally drives me nuts when I'm trying to write fast code. I do like C# for a number of its features, but performance is not one of them -- it is merely adequately fast for what I use it for.

  98. Re:Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    When you have mod points you can spend them. Otherwise shut the fuck up.

  99. Re:Is it time to Round Up the Muslims? by Hognoxious · · Score: 1

    which converts rotational force (engine) into linear motion (like driving your car to a different place)

    I thought the wheels did that.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  100. Oh right, I've heard this one before by Anonymous Coward · · Score: 0

    Hey look, Eric S. Retard discovered a new programming language. But he can't tell us anything about it because it's a secret known only to him. This is the girlfriend from Canada all over again.

  101. Re:Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    Okay, so in your mind, the engine is attached directly to the wheels, without any intervening bits, like axles or crankshaft. And the up-down motion of pistons firing just magically makes them turn in a circle.

  102. The very languages they expouse were written in C by raymorris · · Score: 1

    Assume for a moment that the creators of languages such as Python and Go indeed know something about programming languages. We can observe that python itself is written in C. "Use Python, not C", they say, but that's impossible because /use/bin/python IS a C program. Their "Python program" is nothing more or less than input for a C program that actually does the work. That actually is a good approach in many cases. One need not be a educated professional software engineer to write list.sort() ; one should, however, recognize that what that means is "ask the C program to sort it for me, using whatever algorithm the C programmer chose for me, because I don't know".

    https://github.com/python/cpyt...

    Rust was originally written in C, then a Rust compiler was written in C++. If the creators of Rust know about what makes a good programming language, and they chose to write Rust in C ...

      Now most recently they have the front half of a Rust compiler written in Rust.

  103. Modern C vs 1970s / 1980s C by raymorris · · Score: 1

    Sprintf and strcpy, really? Stuff that's been deprecated in all major compilers for over a decade? strNcpy was introduced in 1978 or 1979 - it predates even the standard IO library. So with strcpy you're talking about a function that was replaced almost 40 years ago. snprintf was officially standardized in 1997, after having been in use before that. So more than 20 years ago.

    > I could go on and on.

    Yeah why don't you go on to compare 10, 20, or 30 year old Rust and Go, since you're talking about how C was used in the 1970s and 1980s. Oh wait, the version of Go and Rust used 10 years ago couldn't even implement "hello world". I'd say a language that exists is a hell of a lot more useful than one that doesn't, so even if you insist on arguing about 1980s programming practices, C is still inarguably better, in absolute sense.

    Would you like to compare modern C practice to modern practice in some other language? Because if you want to talk about 1980s C, the obvious comparison is 1980s Rust, and obviously C wins, by being used to write software such as Unix, while 1980s Rust or Python couldn't be used to write "hello world".

    If you'd like to see some modern C, to get an idea on how it's used today vs in the eighties, you can look at the source code for Python or Ruby. These language author's, like most, we're smart enough to write their interpreters / compilers in C.

    1. Re:Modern C vs 1970s / 1980s C by roca · · Score: 1

      I agree that C was a good language in the 1980s, but it doesn't matter now what was the best language in the 1980s. People making language choices today need to consider what is their most suitable language today, and unfortunately the baggage from C's history is still holding it back.

      It's funny you mention strncpy. That is also broken! See https://randomascii.wordpress.... for example.

    2. Re:Modern C vs 1970s / 1980s C by Anonymous Coward · · Score: 0

      That is also something someone has complained about!

      ftfy

    3. Re:Modern C vs 1970s / 1980s C by david_thornley · · Score: 1

      strncpy() is NOT a length-safe version of strcpy(). I consider that a very real problem with the C standard library.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  104. This just in! by Anonymous Coward · · Score: 0

    New language to replace C! Looks and works just like C.

    More at eleven.

  105. Re:Is it time to Round Up the Muslims? by Hognoxious · · Score: 1

    engine is attached directly to the wheels, without any intervening bits, like axles or crankshaft.

    How can the engine be attached via the crankshaft when the crankshaft is part of the engine? Do you even have a clue what you're talking about?

    And the up-down motion of pistons firing just magically makes them turn in a circle.

    I'll tell you what doesn't do that - the camshaft, which was the original claim. No wait, the claim was that it converts rotation into propulsion, which is utter fucking rubbish.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  106. Re:The very languages they expouse were written in by IAN · · Score: 1

    Rust was originally written in C, then a Rust compiler was written in C++. If the creators of Rust know about what makes a good programming language, and they chose to write Rust in C ...

    The original Rust compiler was written in OCaml. There was never an official C or C++ version of the front end. The backend of the self-hosted compiler is LLVM, written in C++.

    Now most recently they have the front half of a Rust compiler written in Rust.

    Rust has been self-hosting since about 2011, which is not "most recently" in my book. There is an independent front end written in C++, which generates LLVM IR and still needs the LLVM backend. It is also incomplete, since it lacks the borrow checker.

  107. Living fossils. by Larsen+E+Whipsnade · · Score: 1

    Or maybe... cysts.

  108. running Valgrind on test suites? by Larsen+E+Whipsnade · · Score: 1

    Here's the problem. Hard real time embedded code needs to run fast IN TEST MODE.

    No, I'm not anti valgrind. I'm just saying it's doesn't fix everything.

    1. Re:running Valgrind on test suites? by thejynxed · · Score: 1

      Indeed it does, especially in manufacturing and medical devices. I imagine airplane avionics is another segment where that code needs to run as fast and reliably as possible even in test mode.

      --
      @Mindless Drivel: 100% of Twitter posts ever Tweeted.
  109. Rust Code of Conduct by Larsen+E+Whipsnade · · Score: 1

    The fact that they even have a Code of Conduct is a big red flag. When you sign up with a company and they make you sing a big long thing about sexual harassment, doesn't that always turn out to be an awful company to work for?

    I'd be all for Rust if they were all for freedom and prioritized solving technical problems. But with time, you learn to distrust anyone who doesn't make solving technical problems a top priority. Even if you agree with their values on other things. These people just don't know how to keep it real.

    You can't work productively with others if you can't agree to disagree. Especially on matters unrelated to programming.

    Grownups don't need a code of conduct. Codes of conduct are for children. Never try to work with someone who thinks of you as a child.

    1. Re:Rust Code of Conduct by The+Evil+Atheist · · Score: 1

      Grownups don't need a code of conduct.

      Unfortunately don't see too many grownups in programming these days.

      --
      Those who do not learn from commit history are doomed to regress it.
  110. Re:Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    I'll tell you what doesn't do that

    Yeah I'll tell you what doesn't do that: the wheels. The wheels don't do that... which is what "you thought"... Do you even have a clue what you're talking about?

  111. There are no better programmers... by Larsen+E+Whipsnade · · Score: 1

    that can undo all the damage done by all the lesser programmers out there.

  112. I see 2 viable alternatives by DrXym · · Score: 1
    Rust or Go. Rust for when you want absolute performance and reliability at the expense of programming convenience, and Go when you don't mind sacrificing a bit of performance and reliability for ease of programming convenience. Whatever Cx is doesn't stand a chance.

    And the general sentiment that C or C++ is good enough if you program them right flies in the face of reality. Yeah they can be programmed right but rarely are. Rust for example shuts down classes of programming error from even happening.

  113. Re:Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    poobah says its time for you to do self pleasuring, go away from the screeny

  114. Re:Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    Can you enumerate some of that 'great stuff' China, India & the Middle East were doing which helped in a measurable way the civilization to reach the point where it is now?!

    ICE CREAM, the Chinese invented ICE CREAM nom nom nom

  115. Re:C was technically obsolete by the 1970s by aberglas · · Score: 1

    You do not get weird memory corruption bugs in .Net/Java. The sort that produce strange effects long after the bad code runs. Buffer overflows, accessing freed memory etc.

    You do still get threading errors, which is another issue. But one nasty class of bugs is gone. Every time you read about a buffer overflow security violation think that that would never happen if they had not used C.

  116. Re:C was technically obsolete by the 1970s by aberglas · · Score: 1

    Traditional basic counted from 1, just like Fortran. Later ones let you define both the upper and lower bounds. It was fairly late, post C, that the default lower bound moved to 0. Strings always count from 0, so instr can return 0 if not found.

    And the 0 lower bound in visual basic is an absolute pain. Excel, for example, counts from 1. So when you copy some cells into an array, where do they end up?

    This is C pollution.

  117. Most: highest. Most recent: more recent than other by raymorris · · Score: 1
  118. I see three viable alternatives to ESR by Anonymous Coward · · Score: 0

    This guy is a complete joke. I'm not sure why anyone keeps reposting anything he says.

    He's contributed nothing to this community but hard feelings

  119. The language with greatest capital invested wins. by ShamblerBishop · · Score: 1

    Nobody is going to shift the enormous capital invested in tools and optimizations geared towards C++ - in the development of the language itself - and of the innumerable codebases using this language. Nothing will ever offer all that C++ does in this regard. It has never been and will never be, a case of the best language winning - the most widely supported language, with the most capital invested in it, will always be the one that wins - and C++ just has that level of unsinkable critical mass, that will not be shifted in our lifetimes.

  120. Re:C was technically obsolete by the 1970s by mark-t · · Score: 1

    I did not mean to suggest I was sure about the thing with Basic... the point about assembly remains, however. 0 based arrays make sense if you think of the array index as an offset, in units of the underlying data type, from the beginning of the array instead of an absolute position. This is, particularly coming from an assembly programmers point of view, a very intuitive concept

  121. C+ or ++C? by Anonymous Coward · · Score: 0

    Name as in C/C+/C++ or C/++C/C++. It should be superset of C, with addition to C ..aka ++C but OOP removed from C++?

  122. Adoption by Tony+Isaac · · Score: 1

    Ideas are a dime a dozen. Getting people to use a new idea is the hard part.

    The problem with a "successor" to C (whatever that means) is not that such languages don't exist. It's that developers need to work in a community. Every part of the community has different needs, so what this guy comes up with won't work for a wide spectrum of developers. This means that many others have to buy in, provide components, provide hardware support, etc.

    The language has never been the problem with finding programming language nirvana. The problem is adoption.

  123. Who cares? by blocked_lol · · Score: 1

    What actual, important contributions to *any* project has ESR made? He seems like a perpetual hanger-on who occasionally inserts himself into conversations on mailing lists to start flame wars. (a racist, sexist, misogynist hanger-on at that)

  124. Pacal? by Anonymous Coward · · Score: 0

    I don't think pascal was ever popular - apart from schools. It wasn't something you'd use in the real world

    1. Re:Pacal? by wiretrip · · Score: 1

      I don't think pascal was ever popular - apart from schools. It wasn't something you'd use in the real world

      ...apart from Delphi (Object Pascal). Skype, KazaA and just about every antivirus suite are written in Delphi.

  125. Re:Is it time to Round Up the Muslims? by haruchai · · Score: 1

    China, India & the Middle East were doing great stuff long before Europe

    Then succumbed to religious extremism and became shitholes.

    Plenty of religious extremism, of the Xtian kind, in the great old USA.

    --
    Pain is merely failure leaving the body
  126. Re:Is it time to Round Up the Muslims? by Hognoxious · · Score: 1

    If you lift the wheels off the ground, or interfere with their contact (say by putting oil or ice on top of the road) it tends not to move so well. So yes they are what converts rotation into propulsion. Stop lying.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  127. Re:Solve the 'problems' of C now they aren't probl by Lanthanide · · Score: 1

    When those debugging techniques prevent the code from properly responding to hardware interrupts in time, to the extent that the code locks up and doesn't operate at all, yes.

  128. 2 + 1 = 3 by Anonymous Coward · · Score: 0

    30 years of programming in C makes you unable to count to three?

    "Now we have two such visions...and there is another."

    Umm, two plus one equals three...

    1. Re:2 + 1 = 3 by Anonymous Coward · · Score: 0

      "There are two viable alternatives to C: Rust, and Go, and now Cx... three! There are THREE viable alternatives to C!"

  129. Re:Is it time to Round Up the Muslims? by Anonymous Coward · · Score: 0

    The wheel maximizes the efficiency for a specific application of force. Ironically, what it does best is minimize the friction. You have jumbled concepts of wheel vs tire & conversion vs traction. The conversion between linear and rotational force is done by camshafts & crankshafts. Both items were invented by a muslim. Learn to read.

  130. Re:Solve the 'problems' of C now they aren't probl by Anonymous Coward · · Score: 0

    1 is a feature, not a bug. Undefined behavior gives the compiler room to optimize certain kinds of problems. You would know this if you actually wrote C++ for a living.

  131. You lost me at "ESR ..." by shess · · Score: 1

    I guess his writings are "truthy", but I'm going to be honest, anyone who even bothers to call out a broad replacement to C is pretty much delusional. It will continue to take a smaller percentage of things, due to overall growth in the field, but said growth will probably continue to increase the absolute number of C programmers.

  132. What comes after C? by Anonymous Coward · · Score: 0

    "D", of course.

    http://dlang.org/

  133. Re:Is it time to Round Up the Muslims? by HornWumpus · · Score: 1

    'Nobody ever writes anything original, they just regurgitate the same thoughts they read...'

    Mark Twain was likely just taking a piss on Edison, his associate/friend.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  134. Re:Is it time to Round Up the Muslims? by HornWumpus · · Score: 1

    Lifter pegs are _much_ older than that. First invented by the Chinese, but independently reinvented many times.

    The connecting rod/crankshaft is the most basic rotational to linear motion mechanism. First used with animals for power.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  135. Re:Is it time to Round Up the Muslims? by HornWumpus · · Score: 1

    Crankshafts existed long before the Mohamed was born. So did peg lifters. Try again.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  136. Nah... by Anonymous Coward · · Score: 0

    If anything replaces C, it'll probably be Python - The Visual Basic of modern times!

    Computers are now so powerful nobody can be bothered to write programs properly any more - It's all about getting it done fast rather than doing it right - Everything is about rapid development; Optimization takes much longer than laying down the bulk of the code quickly - It's probably the second most time consuming thing after debugging - and the people in charge don't have any pride in the work like the small programming teams would have in 'the old days' - so they don't give any time for it.

    This is partly why it takes my Windows 10 machine just as long to boot and login as my Windows 95 machine despite the machine's processing and I/O being several orders of magnitude faster.

    This is one of the more gratifying things about Linux - Every time I buy a faster machine and move my Gentoo over to it, it shows dramatic increases in performance, but when I upgrade it to a new kernel or update the WM or whatever I don't get the associated slowdown (Althoughv I also don't use KDE or Gnome so that might help :P)

  137. Re:C was technically obsolete by the 1970s by aberglas · · Score: 1

    Correction. Stirngs always count from 1, not 0. Oops.

  138. NOPE by Anonymous Coward · · Score: 0

    Code is invalid. Therefore doesn't compile.
    Much better than it running and doing something unexpected, like you'd get in a scripting language (JS)