Slashdot Mirror


C Alive and Well Thanks to Portable.NET

rhysweatherley writes "So C is dead in a world dominated by bytecode languages, is it? Well, not really. Portable.NET 0.6.4 now has a fairly good C compiler that can compile C to IL bytecode, to run on top of .NET runtimes. We need some assistance from the community to port glibc in the coming months, but it is coming along fast. The real question is this: would you rather program against the pitiful number API's that come with C#, or the huge Free Software diversity that you get with C? The death of C has been greatly exaggerated. It will adapt - it always has."

582 comments

  1. FOR THE LAST TIME... by gid13 · · Score: 4, Insightful

    ...stop telling me things are DYING, maybe let me know when they're DEAD.

    1. Re:FOR THE LAST TIME... by MukiMuki · · Score: 4, Funny

      Isn't this the part where a troll brings in the "NetBSD is dying article" with C as the replacement modifier value? C'mon, they HAVE to have an atomatic generator by NOW.

    2. Re:FOR THE LAST TIME... by MukiMuki · · Score: 0, Redundant

      Atomatic generators, of course, allow you to change a text document's protons and electrons; it's Nano-Programming(tm)!

      Okay, I'm an idiot and this is the second twice in as many posts that I've made a stupid spelling error that will haunt me for many replies to come. I figure this time I'll get the jump on 'em.

    3. Re:FOR THE LAST TIME... by Anonymous Coward · · Score: 2, Funny

      ...OR wait until Netcraft confirms it.

    4. Re:FOR THE LAST TIME... by jandersen · · Score: 5, Insightful

      Agree!

      It is at best stupid to talk about how 'C is dying' anyway, seeing as it is still the most popular language in many areas, as well as the single biggest inspirator for 'new' languages.

      I can't remember how many times the impending deaths of such things as COBOL, FORTRAN, BASIC, mainframes etc etc have been announced, but they are still going strong all of them.

      Following the same arguments, C# and .net are obsolete and dying too..

    5. Re:FOR THE LAST TIME... by Grizzlysmit · · Score: 3, Funny

      ...stop telling me things are DYING, maybe let me know when they're DEAD.

      Maybe we could have special section on the main page, sort of like a bullet list, only instead of bullets we have either red (dying) or green (getting better/alive again) graphic's, then we could watch them blinking away as various things die and undie :-D
      --
      in my life God comes first.... but Linux is pretty high after that :-D
      Francis Smit
    6. Re:FOR THE LAST TIME... by geminidomino · · Score: 1

      I dunno, a simple substitution creator like that one COULD be called "atomic," if you take "atom" to mean a part of the regex. I.E. s/FreeBSD/C/ig

    7. Re:FOR THE LAST TIME... by Anonymous Coward · · Score: 0

      Ehm.. You don't think it already has been applied?

    8. Re:FOR THE LAST TIME... by gauchopuro · · Score: 5, Funny
      It is at best stupid to talk about how 'C is dying' anyway, seeing as it is still the most popular language in many areas, as well as the single biggest inspirator for 'new' languages.

      I agree 100% that C is the biggest inspirator for new languages. One can only take being burned by C's shortcomings so much before deciding that there has to be a better way.

    9. Re:FOR THE LAST TIME... by cerberusss · · Score: 1
      It is at best stupid to talk about how 'C is dying' anyway, seeing as it is still the most popular language in many areas

      Well dead is a bit subjective in this case, but when I search on monsterboard.com, in my country:

      • I get 6 hits for COBOL
      • I get 175 hits for C++
      • I get 446 hits for Java
      So some things are DEFINITELY dying in terms of popularity (read: employability).
      --
      8 of 13 people found this answer helpful. Did you?
    10. Re:FOR THE LAST TIME... by Anonymous Coward · · Score: 1, Funny

      The correct term for C# and .Net is 'stillborn'.

    11. Re:FOR THE LAST TIME... by cshark · · Score: 1

      Or maybe a green thumbs up, and a red thumbs down. That would be funny.

      I don't think languages die. They just morph. It could be argued that cobol and fotran are alive and well today in other forms that most newer programmers would never expect. Funny that.

      --

      This signature has Super Cow Powers

    12. Re:FOR THE LAST TIME... by Ba3r · · Score: 2, Insightful

      This seems like comparing apples & oranges to me. Languages are built around providing the best tool for the situation.

      If i need to develop applications fast, flexible, and portable, I will use an interpreted language, like c#, java, or (if i am a masochist ;) vb.

      On the other hand, if i am coding in a microcontroller, coding OS level stuff, or coding extremely demanding software (i.e. massive simulations), I would choose C, as it gives me a chance to really monitor whats going on in terms of memory, and eliminates the overhead of the interpreter (and chances are i am not so concerned with code reuse).

      Using C in the .NET environment is foolish, .NET is very strongly typed, and C barely knows what type is. Using java on a microcontroller (they have this!!) is also foolish, why waste 50% of the 3kb of memory for the interpreter, or 5% of the clock cycles.

    13. Re:FOR THE LAST TIME... by medication · · Score: 1

      um, inpspirator? i think you meant to inspiration.

      --
      "If you're flammable and have legs, you are never blocking a fire exit." - Mitch Hedberg
    14. Re:FOR THE LAST TIME... by Anonymous Coward · · Score: 0

      Try doing a search for C. I came up with over 5000 hits on monster.com.

      I guess C is more alive than ever. Why it's almost as popular as E!! :-P

      Sorry, couldn't resist.

    15. Re:FOR THE LAST TIME... by Anonymous Coward · · Score: 0
      From the "Thomas/Ritchie/Kernighan" "confession" as to how C came about:
      We stopped when we got a clean compile on the following syntax:

      for(;p("\n"),R-P("|"))for(e=C;e-;P("_"+(*u++/8)%2) )P("| "+(*u/4)%2);

      To think that modern programmers would try to use a language that allowed such a statement was beyond our comprehension! We actually thought of selling this to the Soviets to set their computer science progress back 20 or more years. Imagine our surprise when AT&T and other US corperations actually began trying to use Unix and C! It has taken them them 20 years to develop enough expertise to generate even a marginally useful applications using this 1960's technology parody, but were impressed with the tenacity (if not common sense) of the general Unix and C programmer.

    16. Re:FOR THE LAST TIME... by Bush+Pig · · Score: 1

      Er ... you _do_ realise this was originally published on 1st April (don't know the year), don't you?

      --
      What a long, strange trip it's been.
    17. Re:FOR THE LAST TIME... by Artraze · · Score: 1

      One can only take being burned by C's shortcomings so much before deciding that there has to be a better way.

      I suppose this trying to be funny, but the interresting thing about C is that there are no shortcomings. It's very much like assembly: simply tell the processor what to do. It does, however, provide a more convienent and portible interface.
      That's the glory of C. It's only shortcomings are those of the computer and programmer.
      C forever!

    18. Re:FOR THE LAST TIME... by Anonymous Coward · · Score: 0

      Java?

    19. Re:FOR THE LAST TIME... by skaffen42 · · Score: 1

      Like your sig, though I can think of a better word than "Cretin"...

      Also starts with "C", rhymes with "runt"... :)

      --
      People couldn't type. We realized: Death would eventually take care of this.
  2. What about C++? by ace123 · · Score: 4, Informative

    Isn't C++ widely portable while giving mast if not all of the features of C# (except for being interpreted)

    1. Re:What about C++? by lpontiac · · Score: 2, Flamebait

      Notice that the KDE camp are humming along quite happily with qt and C++. Everyone clamouring for Mono seems to come from the "just C thanks" GNOME community.

    2. Re:What about C++? by davebrot · · Score: 3, Insightful

      True enough, but that's not really the point of the posting. Lots of people know how to program C and not C++. Regardless of how one feels about procedural vs. OO languages, a .NET runtime for C does demonstrate the hardiness (or maybe just the deep entrenchment) of C.

    3. Re:What about C++? by condensate · · Score: 5, Insightful

      True, and C++ is more than a better C. But how in the world do you do numbercrunching with a bytecode language? Tried to do so once for Java, and I'm NEVER going to do it again. Compilers do exploit the specific processor, VMs can do so, too, but why should I introduce a level of complexity, when I just want my processor to calculate things for me? It doesn't get easier, just more portable, but then, C++ seems fairly portable, using templates all along and letting the compiler do the nasty stuff. This means for C it's going to be macros. But hell, isn't it great when you actually know what happens? If you start out on some byte code language, you actually have no idea about the basics of your system. How can you program this system then? And for the anti-FORTRAN fraction. It is still the fastest thing out there!!! Anyone who tried solving a system of linear equations containing 1000 equations knows what I mean. My eyes still pop out when I see a FORTRAN subroutine at work that will do the job in seconds on a normal PIII desktop. So please stop this thing about dying languages which are in fact not dying but a little hard to cope with. This doesn'd make them old. It's just that some people don't want to go through the trouble of learning them, yet they are simply too good to be left out.

      --
      Black holes were created when god tried to divide by zero
    4. Re:What about C++? by H4x0r+Jim+Duggan · · Score: 3, Informative

      One of the design goals of GNOME was to support as many programming languages as possible.

      I'm not very familiar with KDE's language binding availability right now, but I know that being written in C++ would make it more difficult to provide alternate bindings. C, being the lowest portable denomiator of programming languages is simple to create alternate bindings for.

    5. Re:What about C++? by Anonymous Coward · · Score: 0

      No. C++ is such a complex and bloated language that not one compiler implements all of its features, except possibly gcc.

      Really, C is much simpler and more elegant. C++ programmers tend to think of programming as a feature contest, and proficiency is measured by how many features you can memorize. It's much more geeky to use a simple orthogonal language like C, and to get creative in how to use it.

    6. Re:What about C++? by Anonymous Coward · · Score: 1, Insightful

      anti FORTRAN fraction... There is one in the company I work for but they know only other languages. Notice how evolution has back tracked? How Fortran and Java are similar in referencing by reference and not value. And not allowing pointer arithmetic. Fortran was ahead of its time.

    7. Re:What about C++? by Yokaze · · Score: 1, Informative

      > And for the anti-FORTRAN fraction. It is still the fastest thing out there!!! Anyone who tried solving a system of linear equations containing 1000 equations knows what I mean.

      I beg to differ.
      At least, about the linear algebra part. There are some very fast numeric libraries out there. I mean, its not like you are wroting the code to solve the equations in Fortran yourself.

      --
      "Between strong and weak, between rich and poor [...], it is freedom which oppresses and the law which sets free"
    8. Re:What about C++? by condensate · · Score: 3, Informative

      Ever compared LAPACK to some other oonumeric library? I mean one that does NOT rely on LAPACK by itself. Check oonumerics again. Most of the linear algebra libraries rely in some way on the basic linear algebra subprograms, which are of course FORTRAN subroutines. There are ports to C++ that are as fast, but you have to code quite efficiently to actually top FORTRAN. Personally, I prefer C++ and link against the subroutines by the extern "C" directive. This involves finding the appropriate libraries, but as soon as the whole thing links, no problem. Check Todd Veldhuizens page again, and you will see a graph that shows that his Blitz++ librariy equals FORTRAN. But Blitz++ relies on expression templates in C++ which are widely known to drive you mad when you encounter them the first time. The technique Veldhuizen uses is quite complicated and relies on the fact that C++ templates are evaluated by the compiler and subsequently inlined in the code. Compared to that , even FORTRAN code is very readable.

      --
      Black holes were created when god tried to divide by zero
    9. Re:What about C++? by arivanov · · Score: 2, Interesting
      And for the anti-FORTRAN fraction. It is still the fastest thing out there!!!

      No it is not. Been there. Done it. For ultra fast solving of linear equation systems actually. A good hand coded vector library written in ASM will beat it outright. Been there done it. 12 years ago. Wrote vector libraries for TP which used routines specific to each of the CPUs at the time 286/287 (standard, AMD and Harris), 386/387, 386/IIT and forgot what else (it was just before 486 came out). Took 4 weeks of work to write and optimize instruction ordering to keep the puny 15 byte 286 pipeline always full. The result was 4-5 times faster then fortran for the same platform. And 100 times more usefull because you could use them in a proper high level language with OO.

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    10. Re:What about C++? by Peorth · · Score: 3, Insightful

      C++ isn't a "better C", really, so I suppose I'm somewhat in agreement. C++ seriously breaks compatibility with C, of course, though uses roughly the same syntax to extend itself over the top.
      Objective C is compatible with the underlying C (it's compatible with C99 too, last time I checked), while using a different "new" syntax for the object orientation, as well as providing a nifty class library and dynamic type checking.
      In some respects, it's like C#, including the decently poor class library API (compared to Java, anyway), but to me, it's basically what C++ should've been. The only real "downside" in my opinion has been that it doesn't have class-local storage, but instead uses the exact same storage as C, which can make tracking data "globally" through an application slightly difficult, since you're either forced with global storage, or function-local storage (and then passing it around through everything via pointers), or some other more "traditional" means of throwing data about. C++ is nice that it's compatible with C libraries in general, and you can keep functions and data together in classes, which makes a decent amount of sense, though I've been told that the way C# does some of the more "trivial" data types (bools, attributes, etc) is a little more efficient relating to class storage.
      But...here I am going on and on, too.

    11. Re:What about C++? by digitalsurgeon · · Score: 2, Insightful

      but c is better suited for embedded applications is it not? where the performance if of utmost importance ?

    12. Re:What about C++? by sosume · · Score: 1

      hmm, well, here's some byte crunching in bytecode. The folowing function is written in C#, a language often called 'java clone' and 'high level'. unsafe { byte * p = (byte *)(void *)Scan0; int nOffset = stride - b.Width*3; int nWidth = b.Width * 3; for(int y=0;y 255) nVal = 255; p[0] = (byte)nVal; ++p; } p += nOffset; } }

    13. Re:What about C++? by Deusy · · Score: 2, Insightful

      I'm not very familiar with KDE's language binding availability right now, but I know that being written in C++ would make it more difficult to provide alternate bindings. C, being the lowest portable denomiator of programming languages is simple to create alternate bindings for.

      I cannot believe this tripe is modded as 'insightful'. What ignorant rubbish (both the comment and the moderation of it).

      It is relatively easy (as easy as with C) to create bindings for C++. And even if it wasn't, you can create C bindings for C++, so you could simply then create the bindings for other languages using the C layer.

      --

      Free Gamer - Free games list and commentary

    14. Re:What about C++? by Anonymous Coward · · Score: 0

      Kde Also has C# bindings, its called qt-sharp

      Marcus Urban is doing a great job of maintaing them and they beautifully.

      http://qtc-sharp.sourceforge.net

    15. Re:What about C++? by Viol8 · · Score: 3, Funny

      Yes , that optimised x86 assembler will come in *real* useful on a Sparc, PA_RISC, 68000, Power-PC etc etc architecture won't it when you need
      to drop an equation solver into your OO program.

    16. Re:What about C++? by Viol8 · · Score: 1, Insightful

      Sorry , Objective-C is a dogs breakfast. C++ might not be perfect but at least it attempts to be a logical continuation of C's syntax and mode of operation.
      Obj-C on the other hand looks like the designers thought to hell with C , we'll design our own new-look language and shoehorn it kicking and screaming
      into C. Embedded SQL aside I've never seen such an ugly kludge of a language in my 15 years of working in the computer industry.

    17. Re:What about C++? by vegetasaiyajin · · Score: 0, Troll

      True, and C++ is more than a better C.
      Yes, it is a more bloated, complex and difficult to learn version of C.

      --

      My heart is pure, but make no mistake, it's pure evil
    18. Re:What about C++? by gauchopuro · · Score: 4, Interesting
      It is relatively easy (as easy as with C) to create bindings for C++. And even if it wasn't, you can create C bindings for C++, so you could simply then create the bindings for other languages using the C layer.

      The problem is in trying to make use of C++'s more advanced features, such as templates and classes, from some other language. Many C++ libraries depend upon the use of these features to function correctly. Mapping a C++ class heirarchy to some other language is almost sure to require a large amount of work. While I agree that a C binding can be created for a C++ library, this may not be a trivial task.

      Consider, for example, trying to crate a C binding for STL vectors. Since C does not support templates, the work will not be easy. One option would be to create some kind of C preprocessor that could add generics to C; but this is exactly how C++ started in the first place (as a preprocessor). Another option is to create a pure C interface, then to implement that interface using vectors.

      The problem is that there is a huge semaintic difference between C++ and C. Most languages include some sort of C interface, since C is low-level and an easy target for interoperability. Few languages come with support for interacting with C++. For interoperability, C's semantics are simple: just functions and data structures. Calling C functions from some other language usually boils down to just a wrapper for the function, along with appropriate marshalling code to convert data types. On the other hand, C++'s model of OOP is a one-of-a-kind. Higher level languages simply do not share C++'s view of OOP. While there are definitely similarities that are shared among most object-oriented languages, the differences are so wide as to make a general interface to C++ impossible.

    19. Re:What about C++? by sbrown123 · · Score: 2, Informative

      Ive seen too many benchmarks that show Fortran dusting every other high level language out there when it comes to math. C++ is almost at a tie with Java outside using floating point.

    20. Re:What about C++? by sbrown123 · · Score: 2, Interesting

      I dont think its performance or assembly would be king. Its more of compiled executable size and ease of use where c finds a good place on embedded systems.

    21. Re:What about C++? by sbrown123 · · Score: 2, Interesting


      Yes, it is a more bloated, complex and difficult to learn version of C.


      No, I have always taken it that C++ is good if you dont know C and C is good if you dont know C++. Once you learn the one you become suddendly jaded towards the other.

    22. Re:What about C++? by gauchopuro · · Score: 2, Insightful

      The sad thing is, though it should run fine on a modern x86 processor, it is almost certainly slower than code that a decent C++ compiler with processor specific optimizations would produce. If the code had been written in C, it would be able to take advantage of MMX and SSE instructions with nothing but a recompile. I have seen hand-optimized assembly code for doing 64-bit arithmetic that was written a few years back; replacing this code by using __int64 and normal arithmetic operators resulted in a speedup.

    23. Re:What about C++? by Anonymous Coward · · Score: 0

      If you write in C++ and need this kind of interation, you write the code differently. Templates can be used just fine in the inner guts of any program without worrying about the outside interfaces. Besides, if you are publicly using STL containers, something is usualy wrong in the code (They should be wrapped or contained most of the time anyway). The worst you usually end up doing making the C++ langauge accessable elsewhere are making normal methods which duplicate what sugar methods do (operator overloads, etc).

    24. Re:What about C++? by gauchopuro · · Score: 2, Insightful

      I agree that if you want to allow other languages to interface with your C++ code, you write it differently. The thing is, with C++, this must be one of your design goals; if you write in C, your library is much more likely to be usable without an additional interface wrapper layer.

    25. Re:What about C++? by sabre · · Score: 2, Informative

      Check out LLVM: http://llvm.cs.uiuc.edu/

      It gives the advantages of bytecode compilation (linktime & runtime optimization, JIT compilers, etc) to both C and C++ (using the GCC parsers). In addition it has a powerful interprocedural optimizer, so it generates code that truely thwomps GCC in some cases. :)

      -Chris

    26. Re:What about C++? by Anonymous Coward · · Score: 0

      C++ is more than a better C

      What kind of a statement is that? Have you ever tried to write any sort of OS or device driver in C++? It can be done, but talk about a PITA! The crap that C++ goes through to mimic object-orientedness just isn't worth tracing through.

    27. Re:What about C++? by gte910h · · Score: 3, Insightful

      You're just a little too young. Objective-C is a cross between C and Smalltalk. I would say its a wonderful blend. If you know both of those languages, you pretty much will get most of Obj-C right the first time you try to do anything in it.

      As classes are first class objects, I love it. However since its only used on Macs, I cry.

      --
      Want to see every step I took to start my company? http://www.rowdylabs.com/blogs/pitchtothegods
    28. Re:What about C++? by metamatic · · Score: 1
      Most of the linear algebra libraries rely in some way on the basic linear algebra subprograms, which are of course FORTRAN subroutines.

      They may have been originally, but on modern CPUs they aren't. For example, on OS X on a G4 or G5, the BLAS routines are implemented as Altivec code which runs directly on the CPU's vector processor. It's many times faster than the FORTRAN implementations, and you can call it from C++ or Objective-C; I haven't tried Java. So, it's very easy to write OO code which will top FORTRAN on a G5.

      On a G3, I believe the fallback implementation of BLAS is in assembler, but I confess that I haven't checked. If you're doing any kind of linear algebra on a G3 you're using the wrong hardware anyway.

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    29. Re:What about C++? by Fulcrum+of+Evil · · Score: 2, Funny

      Obj-C on the other hand looks like the designers thought to hell with C , we'll design our own new-look language and shoehorn it kicking and screaming into C.

      After meeting the designer, I'm inclined to agree.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    30. Re:What about C++? by deadlinegrunt · · Score: 1

      No, I have always taken it that C++ is good if you dont know C and C is good if you dont know C++. Once you learn the one you become suddendly jaded towards the other.

      This is especially true when the programmer fails to recognize the mentality of one as a language of expressions and the other as an expressive language.

      --
      BSD is designed. Linux is grown. C++ libs
    31. Re:What about C++? by poot_rootbeer · · Score: 1


      So you're saying a routine written natively in well-optimized assembly code will be faster than one written in a higher-level language and then compiled down? WOW!

    32. Re:What about C++? by Anonymous Coward · · Score: 0

      Well, except most compilers won't take advantage of MMX or SSE except in the simplest cases. Intel's compiler is a bit more aggressive about optimizing vector ops, but that's mainly because the Pentium 4's FPU (and the x87 architecture in general) is so anemic that they basically have to push SSE for everything.

    33. Re:What about C++? by CCRancor · · Score: 1

      A non-interpreted languages is just as portable as its compiler. Hence most compilers are written in C.

      --
      Open source is the art of letting other people write your bad code.
    34. Re:What about C++? by baruz · · Score: 1

      Only on Macs?

      What about POC? Plus, of course, every GNU GCC compiler has an Objective-C front end!

      --
      He was a verray parfit gentil knight.
    35. Re:What about C++? by ceeam · · Score: 1

      Interpreted?? Well, I'm always the first to give a good kick to any MS abomination, but you don't quite know what you're talking about. On my (PC) machine .NET exes on benchmarks I throwed at it has been pretty much on par with native compilers _and_ beating many of them for that (Intel C compiler still rules though). No wonder, when you think about it - .NET adaptively compiles bytecode to whatever (modern) features your CPU may have (SSE being the most notable) while all the "traditional" compilers are bound to target least common denominator (386).

    36. Re:What about C++? by Progman3K · · Score: 3, Insightful

      Believe me or not, I've met a few programmers (I can honestly say 3!) that were able to program in C++, but not in C!

      All three were fresh out of school and were working as professional C++ programmers!

      When I say "unable to program in C", I mean that exactly; they were unable to deal with pointers, didn't understand the basic variable types, couldn't write an application without the Visual C++ application-wizard generating a skeleton for them!

      "What's a main?"

      "ints have a range?"

      "why is my unsigned variable never decrementing to -1?"

      "Pass by reference???" *blank stare*

      If I asked any questions like - "How do you think printf is implemented?"

      I'd get a typical response like "dunno"

      OK you say, printf is big, etc...

      But when I'd ask "What does this code you wrote last month do?" and get "dunno" as an answer, it was sort of shocking.

      You see, I think everyone trying to lower the bar by getting rid of C and anything low-level like that will backfire, if these fresh-out-of-school examples are any indication:

      After finding them so useless at getting the job done except when everything was just about completely pre-chewed and put into their mouths, I did what I had to.

      I laid-off one of them.
      Another left out of boredom and apathy because I gave him the task of fixing his own bugs.

      If we lower the bar, it won't prevent problems from existing and needing to be solved, you see, and only the programmers with TRUE aptitude will succeed, and they won't mind C one bit.

      --
      I don't know the meaning of the word 'don't' - J
    37. Re:What about C++? by gte910h · · Score: 1

      I know its compilable on other platforms, its just not used by any signifigant numbers of developers on other platforms.
      When I write software for myself that I don't intend to maintin, I might use it. But if I EVER would want another human to keep up a piece of software on an non-Mac platform, I'd not write it in Obj-C.

      --
      Want to see every step I took to start my company? http://www.rowdylabs.com/blogs/pitchtothegods
    38. Re:What about C++? by Anonymous Coward · · Score: 0
      Isn't C++ widely portable while giving mast if not all of the features of C# (except for being interpreted)

      No. C# has plenty of non-(core-)C++ features; almost everything Java has on top of C++ features. Things like garbage collection, default run-type type identification and automatic bounds-checking (all of which can be bolted-in to C++ with extensions or optional features, ie. non-portable); classes (methods, fields) as first-class objects, RMI, in-built threading, class metadata, dynamic code loading (which, without bytecode, would be non-portable by definition)... just to name few of them.

      And as to C++ portability, compared to C# or Java; main difference is that while C++ language itself may finally be reasonably portable, libraries may not be. And libraries that are portable cover much smaller functionality than C#/Java core libraries (which, agreed, many programmers find too all-encompassing).

    39. Re:What about C++? by gunpowder · · Score: 1

      I know its compilable on other platforms, its just not used by any signifigant numbers of developers on other platforms.

      GNUstep is there and is ported on many platforms: all kinds of Unix variants (Linux, *BSD, Solaris etc.), Windows and even Mac OS X.

      It is very stable (actually for quite a long time now), OpenStep Foundation is implemented 100%, but just AppKit (graphical stuff) is missing some things.
      And of course the stuff that was added in Cocoa and was not part in the OpenStep specification is also added in GNUstep when possible.

      BTW, we always look for developers (both for GNUstep and for apps that run on GNUstep)!

  3. So... by Raindance · · Score: 1

    I'm not a programmer.

    Is this a good thing or bad thing is alive?

    1. Re:So... by Anonymous Coward · · Score: 0

      I'm not sure what you're asking, but nothing happened yet, and no disasters will occur in the near future.

    2. Re:So... by Zardus · · Score: 4, Informative

      Linux is written in C, SDL is written in C, X (I think) is written in C. The gimp is written in C (along with GTK). Gaim is written in C. There are almost 13000 projects on sourceforge that are registered as being written in C.

      C is neither bad nor dead (not that it doesn't have its problems). Whoever wrote this article and the previous one about it on slashdot is a moron.

      --
      You can mod your friends, you can mod your nose, but you can't mod your friend's nose.
    3. Re:So... by js3 · · Score: 0, Troll

      This project only proves that C is dead. When a language has to piggy back on another or come up with these weird combinations you know it is on it's way out. I recently used c# for something that would have caused me many headaches just debugging etc with plain C.

      --
      did you forget to take your meds?
    4. Re:So... by j-pimp · · Score: 4, Insightful

      When a language has to piggy back on another or come up with these weird combinations you know it is on it's way out. With that logic every language with a .NET version is dead. First of all their are plenty of projects that hanve ane will continue to be written in C and compiled into good old unmanaged binary executables that execute without any of this newfangled bytecode. Also the whole point of .NET and the JVM is compile once, run anywhere. Java and Foo# are just languages well suited for such tasts. Programmmers always find a way to use whatever weird language, library, or methodology with whahtever new technology.

      --
      --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
    5. Re:So... by mpmansell · · Score: 3, Insightful

      So, by that argument, shouldn't Java and C# both have been stillborn? Both piggy back on VMs and are the same 'weird' combination?? :)

    6. Re:So... by Foole · · Score: 5, Informative
      Whoever wrote this article and the previous one about it on slashdot is a moron.
      No one in this article or the other one actually said that C is dead. This is another case of a quote being taken out of context. The original quote was "To me C is dead." which has a very different meaning.
      --
      This is not a turnip.
    7. Re:So... by Anonymous Coward · · Score: 0

      Somehow I doubt that a Linux kernel would compile in C.Net, much less run, much less run well. But maybe bits and pieces could be used to provide a compatibility layer for windows .NET crap.

    8. Re:So... by GnuVince · · Score: 5, Insightful
      What's more, Miguel de Icaza (the guy who said that) was talking about user applications. Unless someone can explain to me why a garbage collector for an IRC client or a payroll application is a bad thing, why I should fear buffer overflows, problems with pointer arithmetics, etc. in those kind of applications, please tell me. Does the programmer need to spin my hard drive backwards or something? It seems to me that high-level languages will do just fine for those tasks.

      You know the old adage, "Use the right tool for the right job?" Well, use C when you need it. C is probably the most misused language I've ever seen. But of course, this is Slashdot, the land where opinions are forged and are never to change.

    9. Re:So... by Anonymous Coward · · Score: 0
      why I should fear buffer overflows, problems with pointer arithmetics

      Here's the solution: only use apps that are created by qualified programmers. If your program suffers from this, it's due to lack of brain power, not because of C. I swear, if today's programmers would quit taking the easy way out (VB, PHP, Python, *gasp* Perl) maybe today's applications would be more stable and useful.

    10. Re:So... by Tumbleweed · · Score: 1

      Geez, if I have to explain to you why you should use C to create a GUI window that says, 'Hello World," well, there's just no hope for you.

      *just joking!*

    11. Re:So... by Anonymous Coward · · Score: 0

      I agree. Why do things the easy way when you can do them the hard way? Using C where it doesn't make sense makes me feel manly.

    12. Re:So... by Anonymous Coward · · Score: 1, Insightful
      The problem is not that C is the best language for the job, but that the alternatives are atrocious, for example with respect to performance (Java, .NET) or maintenance/clarity of expression (Perl), and some languages are just more complex, tricky, bug-inducing versions of C, pretending to be something better (C++).

      C is often chosen because it is the least of many possible evils, not because it is ideal.

      Unless you choose something which really tries abstracting away from the underlying machine, like LISP or Mathematica, you're not making great leaps and bounds in moving from one language to another anyway. But many problems are so trivial (in the mathematical sense) that they're not worth the programmer's effort in coming to terms with the new paradigms[tm].

    13. Re:So... by pjt33 · · Score: 1

      Java doesn't piggy-back on a VM. The Java platform was designed for the Java language. Likewise C# - the VM was designed for the language. It's all .NET languages other than C# which piggy-back on its VM.

    14. Re:So... by mpmansell · · Score: 1

      it does piggy back. One of the original intentions for java was to run on native hardware, not a VM. I believe the project was called Oak.

      But, you are missing the point. It doesn't matter whether, or not, the VM was specifically designed for the language - it is just another abstraction layer for execution and thus does piggy back on it. It the designers of a VM have done their job correctly then, specifically designed, or not, it should be turing complete and is an execution model in its own right. Because of this, languages with a similar paradigm should also run on it correctly.

      Looking at the .net languages will show this. VB.net and VC++.net have both been modified from their progenitor languages to fit the .net model. They piggy back on it no more, or less than C#.net

    15. Re:So... by cpghost · · Score: 2, Insightful

      It has been said many times before, but it's worth reiterating: [nearly] all of those wonderful runtime environments, and interpreters are written in C. Sometimes, language designers try to implement a self-hosting interpreter (like, say, scheme in scheme, ...), but even here, it still has to be bootstrapped somehow. Unless you want to do this in (unportable) asm, you still need C.

      --
      cpghost at Cordula's Web.
    16. Re:So... by Anonymous Coward · · Score: 0
      But of course, this is Slashdot, the land where opinions are forged and are never to change.
      Like this very one ?
    17. Re:So... by pjt33 · · Score: 1
      Your assertion that Oak was intended to run on native hardware seems to contradict Sun's history of Java. It could be revisionist history, but do you have a source for your claim?

      I think part of our disagreement is over the meaning of "piggy-back". To me, the term implies exploiting the existence of a product to build on it, saving yourself some effort - like, say the languages which are compiled by source-to-source translation into C followed by C compilation. Thus Jython piggy-backs on the JVM. But the JVM wouldn't exist without Java.

      You point out that VB.NET and VC++.NET have been modified to fit the .NET model. Why don't you say the same about C#.NET, and thus establish your case that they piggy-back on it to the same extent? I submit that it's because you can't, because C#.NET and the .NET framework were developed together to work together, and thus effectively the other .NET languages are piggy-backing on C#'s platform.

    18. Re:So... by Anonymous Coward · · Score: 0

      With C# and the CLI you are less bound to Microsoft or Sun etc etc unlike VB, C (depends on what libraries you use but you arnt going far without some form of interface which natively ties you to a platform - MFC, WFC, Win32, you pick your poision) at least with C# you can are less bound to the underlaying architecture).

      Not forgetting less bs mop n bucket code, faster dev cycles (with the current economic climate, you dont have the luxary of being "l337" so do that at home, not at work).

      As for languages like SML etc those never see the light of day outside academia.

    19. Re:So... by mpmansell · · Score: 1

      I suspect it is revisionist history. In today's corporate climate, there is a tendency to conveniently forget about failed or cancelled projects. Shareholders may not like to hear about them. The sources were from Sun themselves back around 95-96. There was a lot of interest in the project at the time since it offered the opportunity for simple and clean execution models for embedded environments. It was sad to see it not come to fruition, but then in the meantime performance of general purpose CPUs increased to a point where it is likely that an emulated system would outperform a small production run processor which would never keep pace technologically.

      I don't really have time atm to dig further, but there is some info here: http://ei.cs.vt.edu/~wwwbtb/book/chap21/javaplatfo rm.html concerning JavaChip. It is possible (tho this is a stab in the dark) that the JavaChip did live on in the JavaCard product lines, but this is pure speculation on my part :)

      The point I'm trying to make re. the VM is it makes no difference what it was originally developed for. If it is turing complete then it makes absolutely no odds whatsoever. It will implement a virtual platform, and this is independent of the languages. Thus, C#'s relation ship to IL is possibly symbiotic, but it still piggy backs upon the virtual system. The same goes for Java and it's JVM. Any other language implemented targeting the VM is no more, nor less, symbiotic with the VM.

      C#.Net is not C#. C# is one language, while C#.Net refers to the language with all the .Net bindings. C# could be implemented outside of .Net and I do believe people are doing so. The .Net framework and its APIs were designed together. While I've nothing to back this up, I was under the impression (years back) that .Net was being developed with VB and J++ in mind for its initial platform languages. The rumour goes that C# only came into prominence when MicroSoft and Sun got to going at eachother with legal 2x4's.

      Be that as it may, I have seen nothing convincing to suggest that C# was instrumental in the creation of .Net. From a CS point of view, were this the case, I would risk limiting the ultimate usefulness of .Net by potentially limiting the development opportunities open to developers.

      One may as well say that most implementations of any language piggyback upon C since it is likely that the compiler (or tools and libs used to build it) were built in C, as is the OS (which, like a VM, is just another execution environment). Following that argument, then they are all piggybacking off of assembler and a whole roomfull of computerscientists and mathematicians might argue that it all piggybacks (abstractly, but that could be said to be another way of saying 'virtual') on their mathematical models :)

    20. Re:So... by matfud · · Score: 1

      Hardware that directly runs bytecode has and still is being used in a number of areas.

      http://www.particle.kth.se/~lindsey/JavaCourse/B oo k/Part3/Chapter23/javaConcreteMachines.html

      matfud

    21. Re:So... by Anonymous Coward · · Score: 0

      Garbage collection doesn't make much difference.
      If you made those apps in Java you would have different problems- but still problems.

      null pointer exceptions, buggy JVMs, setup nightmares.

      I like C because it is the closest to the hardware without working in assembler (and I often do).

    22. Re:So... by Anonymous Coward · · Score: 0

      Misused? Maybe.
      But then - there is no real alternative.
      Java is incredible slow (don't talk about thread-sync issues or sth. like that - about all Java-apps are about unusable on my box (1.2ghz duron / 512 mb)), C++ is *ugly* and g++ just sucks. (it's fscking slow *and* produces slow code)
      Perl.. perl is fucking ugly aswell. And not the fastest language either.
      I don't like Python forcing me how to indend my code duh.
      Ruby doesn't scale well for big gui-apps IMHO. (there are too many ways to do stuff - gets confusing sometimes)
      C# is not tested enough IMHO. A 'lil irc-client and an image viewer doesn't count, no.
      I could go on...

      C might be misused but semi-oop C isn't *that* bad.. yea, you waste a lot of time copying stuff - but it makes you think about it. You tend to write better designed code that way. IMHO.

    23. Re:So... by maxwell+demon · · Score: 1

      Not really. You could also write your bootstrap compiler in Fortran, Pascal, Ada, Java, ...

      Now, having a .NET implementation in Java would be fun: The program in .NET bytecode interpreted by a program in Java bytecode interpreted by a program in machine code interpreted by the processor (the last step is unavoidable, of course).

      --
      The Tao of math: The numbers you can count are not the real numbers.
    24. Re:So... by Anonymous Coward · · Score: 0

      depends on what libraries you use but you arnt going far without some form of interface which natively ties you to a platform - MFC, WFC, Win32, you pick your poision

      wxWidgets
      SDL

    25. Re:So... by Anonymous Coward · · Score: 0

      Here's the solution: only use apps that are created by qualified programmers.

      Hell yes. The only trouble with that is that they're expensive. Companies would rather pay for two cheap programmers than one good one. Or even better, one cheap programmer.

    26. Re:So... by GnuVince · · Score: 1
      I myself am a big Smalltalk fan. VisualWorks Smalltalk is a very real alternative. It runs fast, on multiple platforms, has all the bindings you want, a great GUI, etc. It is faster than Java, it is far clearer than Perl, it is easier than C. Smalltalk just needs to get rid of his '70's reputation of being big, slow and expensive, because that's not the case anymore.

      If you are interested in Smalltalk, you should get the non-commercial version of VisualWorks or Squeak.

    27. Re:So... by Anonymous Coward · · Score: 0

      How does being a right-wing nutjob influence your coding decisions?

      (I've sent similar messages to left-wing nutjobs, so spare us your knee-jerk anti-liberal response; we can read your screeds on your website, if we cared)

    28. Re:So... by j-pimp · · Score: 1

      How does being a right-wing nutjob influence your coding decisions?
      Well mainly its probally why I believe people have a right to write closed source software. I also believe that the market will correct itself, and deal with the Balmer's and McBrides of the world. As far as the auctual writing of code, well I am a C bigot that thumps on my K&R book like its the King James. However, I'm firmly against living to the letter of any paradim, so why my code tends to be procedural when I'm not writing java, their are a few gotos and some of my C code has object oriented aspects.

      --
      --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
  4. Communix by Anonymous Coward · · Score: 0, Funny

    Coming soon... Communix.org. Put your blood, sweat, and tears into this Unix variant so that it can benefit your fellow comrades. No pay, long hours, and the glory of the state awaits you.

  5. Adaption, but.. by Debug+This · · Score: 0
    Sure, it will adapt -- all languages do. But wasnt this thought of FORTRAN and COBOL too? It is a little short sighted to say that C is indestructable; its variants will (and have) come, but eventually it will be phased out.

    Remember when punch cards went obsolete?

    1. Re:Adaption, but.. by xenocyst · · Score: 1

      sure punchcards went obsolete, and _someday_ C will to, but like BSD, it is dying, and will be for many many years to come... ;)

      --
      And, no, I should not have used the goddamn Preview mode first.
    2. Re:Adaption, but.. by Anonymous Coward · · Score: 1, Funny

      Remember when punch cards went obsolete?

      No, I'm not a dinosaur.

    3. Re:Adaption, but.. by jayjaylee · · Score: 2, Funny

      Remember when punch cards went obsolete?

      Yes. :'(

      I'm old enough where my toddler drinks Pediasure, my wife drinks Boost (to give her nutrients during her pregnancy), and I'm on Slimfast.

      I'll cry myself to sleep tonight ...

    4. Re:Adaption, but.. by irokitt · · Score: 2, Insightful

      I still use punch cards, you insensitive clod!
      As for Fortran and COBOL, Fortan is still an entry requirement to the California college system, and COBOL is still everywhere - deeply embedded into the payroll and employment operations of many businesses. And there are still vestiges of punch cards too - Scantrons and the like. So things don't die as easily as you might think. Much as we sometimes wish them away, they hang on.

      --
      If my answers frighten you, stop asking scary questions.
    5. Re: Adaption, but.. by Black+Parrot · · Score: 1


      > It is a little short sighted to say that C is indestructable; its variants will (and have) come, but eventually it will be phased out.

      Old languages don't die; they just fade away. Surely there's still some Algol 68 running out there somewhere?

      I suspect we should be discussing the half-lives of languages rather than their lifetimes.

      --
      Sheesh, evil *and* a jerk. -- Jade
    6. Re:Adaption, but.. by stephentyrone · · Score: 2, Informative

      "Fortan is still an entry requirement to the California college system"

      where can I get some of whatever you're smoking? there are classes where it's used, for sure, but "entry requirement"? no.

    7. Re:Adaption, but.. by blowdart · · Score: 2, Interesting
      Well if producing a CLR version is proof of life (and how exactly do they provide C pointers when every object is supposed to be by reference anyway) then COBOL is alive with Fujitsu COBOL.Net, and Fortran has 2 zombies, with ftn95 and Lahey/Futisju Fortan

      Who would have though that a mainframe manufacturer would keep prompting dead langauges? <g>

      Whilst Algol isn't there, Oberon is, as is Ada, a shareware version of Forth, Haskell, Eifell, Pascal, Perl, Python (twice) and SmallTalk

    8. Re:Adaption, but.. by usrusr · · Score: 1

      i really don't think c will ever be the language to run on top of a bytecode layer. there are enough languages which at least look like variants of c that are much better fitting for those projects that are suspect of being run inside a bytecode box.

      instead, what i could imagine in a future in which nearly everything goes the bytecode way, is c at some day being the only remaining language for the down&dirty stuff that is compiled to native machine code, although certain variants of c are unlikely to completely move to bytecode land as well.

      --
      [i have an opinion and i am not afraid to use it]
    9. Re:Adaption, but.. by csirac · · Score: 5, Insightful

      Saying C will die out is like saying that assembler will die out.

      There will _ALWAYS_ be parts of an Operating System, hardware-oriented realtime or embedded app that _needs_ to be close to the metal. C/ASM is predictable, consistent, flexible and fine-grained in the things you can do with it. You certainly don't want a time critical interrupt handler routine that is supposed to be done in 5ms to suddenly decide that it needs to do some garbage collection or page in some hashing function to access an array of some sort.

      Plus, C is great because it isn't assembly.

      Even then, sometimes you just gotta write some ASM.

      Sure, someone might make a "better" C that has similar goals (structured around ASM-style thinking rather than human-style thinking), but if they did it surely would be some incarnation of C. Compare traditional K&R C with the current features of GNU C (hooray for structure member tags!) or even the ANSI C99 specification.

      Even though there has been no great change in the approach to programming itself (compare to LISP, haskell or Perl), C has nonetheless had continuous improvments along the way, from language and data structure standards to libraries, compilers, debugging tools, code profiling, and so on.

      I find it hard to believe that we're going to have OS-level DMA transaction code written in Java or C#.

      I once read in a visual basic for dummies manual (or was it Delphi?): "Trying to write an Operating System in Basic is like trying to fly to the moon in a hot air balloon".

      At some point, you've _GOT_ to talk to the hardware.

      - Paul

    10. Re:Adaption, but.. by blowdart · · Score: 1
      I find it hard to believe that we're going to have OS-level DMA transaction code written in Java or C#.

      Who says that's what it's for though? Consider a large set of legacy libraries, doing data munching, or file IOs or other stuff which could be rewritten, but no-one has the time or the documentation. Now, whack it into a CLR object, then call it from whatever language you like. You've suddenly migrated your old codebase.

      Just because you use C doesn't mean you HAVE to talk to the hardware.

    11. Re:Adaption, but.. by ace123 · · Score: 1

      And also there's Whitespace.

    12. Re:Adaption, but.. by csirac · · Score: 1

      I was responding to the idea that C would be phased-out somehow, nothing to do with C for .NET. I guess I was being OT...

      Just because you use C doesn't mean you HAVE to talk to the hardware.

      I'm sure C for .NET will have its uses, it's just that I'm more of a hardware guy so that's why I'm trying to imagine a world without native C.

      Other than re-using legacy C code as you've suggested, I would feel that the advantage of using a bytecode environment like .NET would be in using the new languages and features they offer, instead of writing even MORE C with functions that leak and void pointer arithmatic :-)

      Re-using C code for use from a different language is a good idea though.

    13. Re:Adaption, but.. by blowdart · · Score: 1
      Re-using C code for use from a different language is a good idea though.

      That's one of the nicest things about .net (imo), the cross language object support. Need Perl? Whack up a Perl object, then use it in C#

    14. Re: Adaption, but.. by Anonymous Coward · · Score: 0

      Lifetime = Half-life / (ln 2)

    15. Re:Adaption, but.. by Tumbleweed · · Score: 1

      I firmly believe that many people's objections to C have little to do with it's power or flexibility, and mostly to do with it's obscure syntax.

      That and the lack of a string type without using a library, of course. :)

    16. Re:Adaption, but.. by certsoft · · Score: 1

      Delphi 8 also produces .net code from object pascal source. Not sure how well the resulting code will run on Mono or DotNet.

    17. Re:Adaption, but.. by Fallen_Knight · · Score: 1

      i think its more people find it to hard to grasp pointers, now that they have switched to java for CMPT 101,201 and such when people get into a course where C is used many are helpless and never truly learn pointer, then just deal with them.

      And why would you want a string type??? a string is a array of chars, char[x] or char *cp, that IS a string. unless i'm missing something a string type is not needed.

    18. Re:Adaption, but.. by mpmansell · · Score: 1

      I once read in a visual basic for dummies manual (or was it Delphi?): "Trying to write an Operating System in Basic is like trying to fly to the moon in a hot air balloon".

      Perhaps if it was filled with the hot hair from the doom-sayers, it would build up enough momentum to get there :)

    19. Re:Adaption, but.. by arafel · · Score: 1

      Although (if doing hardware stuff) you do then have the trouble of making sure that the runtime gives you all the flexibility you need - aligned, often physically contiguous, non-cached buffers, for example, in the case of DMAs. :)

    20. Re:Adaption, but.. by csirac · · Score: 1

      An improvment the C string libraries could make is using Pascal-style strings.

      Pascal strings have the length of the string coded in the first few bytes of the "string data".

      So all the string functions know exactly how long the string is, since this is encoded at the beginning, which is often handy. In fact, I vaguely remember that you can access element zero of a pascal string as if it were an array, ie:

      string[0]

      - would hold the length of the string. Since, IIRC, arrays in Pascal can start/end at any limit (ie. non-zero) but default to starting at one, and so an index > 0 would give you the char value just like in C (I could be wrong - its been years!).

      - Paul

    21. Re:Adaption, but.. by matfud · · Score: 1

      The joys of internationalisation mean that char[]
      is often not sufficient.

      matfud

    22. Re:Adaption, but.. by smittyoneeach · · Score: 1

      She drinks boost?
      Surely your child will be a template meta-programming ninja. Good onya, and don't let the secret out.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    23. Re:Adaption, but.. by Anonymous Coward · · Score: 0
      Compare traditional K&R C with the current features of GNU C


      all my c is K&R C

  6. Er.. by iswm · · Score: 5, Insightful

    C is still alive and kickin' in the NIX community I'd say. It seems it's really just Windows where other languages (C++, C#) seem to be taking over. Just because C isn't being used much in the Windows world doesn't mean it's dying ot is going to die anytime soon.

    --
    Buckethead
    1. Re:Er.. by Anonymous Coward · · Score: 0

      I nearly always use C when I'm programming on Windows. The Win32 API is straight-C friendly (structs, functions) without much need for C++ classes or OOP. Speed is important to me and I don't code in C++ unless it's absolutely necessary.

    2. Re:Er.. by Graff · · Score: 4, Interesting
      C is still alive and kickin' in the NIX community I'd say.

      C is going strong on Macintosh also. Cocoa programmers use mainly Objective-C which is fully backwards-compatible to C. You get the best of both worlds there. You can use C for the parts of your program where you really need the speed of C and can you use Objective-C where the advantages of object-oriented design best suit your program. Programmers who use the Carbon libraries instead of the Cocoa libraries also mainly program in C or C++.

      There are many other languages available for Mac OS X but I would say that C, C++, and Objective-C are by far the most used. Since C++ and Objective-C are largely supersets of C, I would say that C is doing just fine under Mac OS X!
    3. Re:Er.. by Endive4Ever · · Score: 2, Interesting

      Thank goodness the Pascal on Macintosh has finally (mostly) faded away.

      --
      ---
    4. Re:Er.. by Epistax · · Score: 1

      C is also alive in the Computer Engineering industry. When you have severely limited ram and rom (say, a few k), you need a lean programming langauge. It's pretty much assumed to either be in assembly or C. C++ is too bulky, and those other languages don't really exist (aside from Basic on some chips) at this level. There is no operating system to drive them. Before C can ever be declared dead, we need massive change in the world of FPGA's, etc.

      "The ATM I use is programmed in C#!"
      (God help us all)

    5. Re:Er.. by Anonymous Coward · · Score: 0

      C++ is too bulky?? Both produce nearly identicaly sized binary code until you start pulling in fat libraries left and right. Granted C++ libraries are a bit fatter, but its your fault if you pull them in. If you are in a lean environment you are going to either be writing that kind of stuff yourself, or using the same libraries you would in C.

    6. Re:Er.. by AndroidCat · · Score: 1

      Really? Why is that a good thing?

      --
      One line blog. I hear that they're called Twitters now.
    7. Re:Er.. by angel'o'sphere · · Score: 1

      What bothers me when I see those posts ... no offense ... is the strange ... and wrong ... emphasizing on speed.

      Why are so many people claiming C is faster than C++ or Objective C?

      This is simply wrong. Why should anyone use C to write a time critical loop when the same time critical loop is in C++ just as fast?
      Looping over an array of ints or floats and doing some math has nothing to do with OO ... and a OO Program doing that is just the same as a C or fortran program.

      for (int i =0; imax;i++)
      sum += val[i];

      This is the same in C/pascal/C++/Java/Delphi/Modula2!!!

      And in fortran:
      DO i 0,max
      sum = sum + val(i);

      Thats also exactly the same!!!

      Why would one think that OO concepts make a "language" slow? OO languages are in most circumstances faster than non OO languages. There is only one exception: a VM is involved. As soon as a VM is involved you have of course new situations which slow things down until the benefits of the VM cause a counter effect (e.g. hot spot/jit compiling).

      A lot of Mac OS X programs are written in Java .. a similar amount in Objective C.

      OO languages make programming easyer for "mid range" programmers. Those create "mid range" code, which runs at "mid range" speed. I would say its a matter of coders not of languages.

      Any procedural freak/geek claiming his code is faster because its procedural and not OO should throw his geek hat into the fire.

      Better become an OO geek and AFTER that look back on your old procedural habits and choose again.

      You just behave like an expert WW 2 pilot, claiming he can out manouver every Gulf War pilot. Sure, you may be right ... in a dog fight a Mustan might even out manouver a F 16 ... but a sidewinder fired from 30 km distance ... thats a different matter. Why not flying both air crafts? And choosing the one you like more depending on yout mood?

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    8. Re:Er.. by AnotherBlackHat · · Score: 1

      What bothers me when I see those posts ... no offense ... is the strange ... and wrong ... emphasizing on speed.

      Why are so many people claiming C is faster than C++ or Objective C?

      This is simply wrong. Why should anyone use C to write a time critical loop when the same time critical loop is in C++ just as fast?
      Looping over an array of ints or floats and doing some math has nothing to do with OO ... and a OO Program doing that is just the same as a C or fortran program.

      for (int i =0; imax;i++)
      sum += val[i];

      This is the same in C/pascal/C++/Java/Delphi/Modula2!!!

      And in fortran:
      DO i 0,max
      sum = sum + val(i);

      Thats also exactly the same!!! ...



      Most people make the claim that C is faster based on the emperical evidence.

      I think that if you actually benchmarked those snippets of code, you would be surprised at the results. C compilers often can make optimizations that C++ compilers can not. Fortan compilers can do even better. (and often do)

      For example;

      for (i=0; i < max;i++)
      array1[i] += array2[i];

      can compile to dramtically different code in C and C++ (thanks mainly to the possibility of operator overloading)

      Cray fortran actually reduces that to a single instruction which runs vectorized. About 64 times faster than the C equivilant.

      But IMO the reason C code is generally faster than C++ is more subtle.
      In general, a programmer is able to estimate fairly accurately how long a piece of C code will take.
      In C when you see "a++" you can be pretty sure that's going to be only a few instructions of assembly.
      In C++ you can't really be sure - maybe someone overloaded the '++' operator, maybe a is a complex data type and incrementing it will access the disk. Or maybe it's just a plain int, and will run the same speed as the C version.
      You can't really tell at a glance.

    9. Re:Er.. by akuzi · · Score: 1

      > There are many other languages available for Mac
      > OS X but I would say that C, C++, and Objective-C
      > are by far the most used.

      True, although Apple seem to be trying to promote Java along with Obj-C as the main languages for Cocoa programming. C++ is used also in some places such as the IOKit device driver framework.

      Obj-C is in some ways a much nicer language to program than Java or C# too because it supports true Smalltalk-style dynamic binding and untyped objects whereas Java and C# are both strongly typed. This may sound like a bad idea, but it improves code reuse and generally makes code a lot more flexible. You can avoid unnessarily complex class hierarchies and some clunky designs. It also allows for funky features such as message forwarding and categories (dynamic extension of classes as runtime).

      I think the original poster is half-right though - C is dying for business/enterprise development, but C and C++ are still the main languages for writing any high performance GUI app or system software.

    10. Re:Er.. by abertoll · · Score: 1

      This post made me cry...

      (not tears of joy either)

      --
      "he drew his sword Ringil that glittered like ice... and he wounded Morgoth with seven wounds..."
    11. Re:Er.. by angel'o'sphere · · Score: 1

      I can not follow you.
      In C++ you can't really be sure - maybe someone overloaded the '++' operator, maybe a is a complex data type and incrementing it will access the disk.
      The compiler allways knows exactly if it is supposed to call a user defined operator or the build in one.
      The build in one is allways the same like in C. Hence the speed is exactly the same.
      C++ defines very well under which cirumstances which overhead is introduced. As long as you do not need to use a feature introducing overhead, your C++ program is exactly as fast as the equivalent C program.
      In case you need to use the overhead, again a similar solution in C is of compareable speed or even slower.
      Ever tried to use a big switch statement? Ever heared about the visitor pattern? In case you have to traverse hughe data structure composed of nodes of different types and you have to do a specific operation on every node, hence you use a switch .... Using a visitor patter and an oo approach is in most cases faster. Except: you code the visitor pattern in C using a table of function pointers and some type tag in the nodees as index.
      Surprisingly: this is exactly was a C++ compiler does as well: result is, both solutions have similar speed.
      For every C program you claim it is faster than an equivalent OO/C++ program, I write you a C++ program which is faster or at least of same speed(by just compiling your solution with a C++ compiler).

      The matter wether a language (sig) is faster than an other is just a matter of the compiler crafters. C++ is more complex, so it is more complex to get a compiler crafted and hence you spend less time in the trivial part: the code generator.

      There are plenty of C++ compilers in the price range of $10.000 per installation. Why is one going to pay the prise? Because they generate fortran quallity code.

      E.G.: www.edg.com (Edison design group)

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    12. Re:Er.. by Endive4Ever · · Score: 1

      The curly braces key is broken on my keyboard.

      --
      ---
  7. C?? by Neo-Rio-101 · · Score: 4, Funny

    C?

    Yeah, just kill it off already... I wanna go back to using Commodore 64 BASIC.

    --
    READY.
    PRINT ""+-0
    1. Re:C?? by Anonymous Coward · · Score: 0

      Hmm. We could modify vice to act as an universal scripting engine...

    2. Re:C?? by maxwell+demon · · Score: 1
      Bah, if at all, then ZX Spectrum Basic. Or could your Commodore do the following?
      10 LET a$ = "2*SIN x"
      20 LET x = PI
      30 PRINT VAL a$: REM gives 0 (or something close)
      40 LET x = x/2
      50 PRINT VAL a$: REM gives 2 (or something close)
      The a$ of course would typically come from an INPUT statement.

      Of course it would be a nightmare if you need security, because e.g. typing "USR 0" as input would restart the computer (USR was a function to call machine code, and address 0 was just where the computer started on power-up). OTOH the USR was a single token (it wouldn't work with the three letters "U", "S" and "R"), so scanning for it before execution would have been easy.
      --
      The Tao of math: The numbers you can count are not the real numbers.
    3. Re:C?? by ceeam · · Score: 1

      You do realize that C is older than that?

    4. Re:C?? by rabs · · Score: 0


      ...Which would be a great name for a new language.

      "C-ques-ques."

      S'gotta nice ring to it.

      - rabs

  8. Wow! by stevens · · Score: 4, Funny

    All the advanced language features of C with all the speed of an interpreted VM!

    Can I get them to compile asm to java bytecode next?

    1. Re:Wow! by metlin · · Score: 1

      That is one of the most insightful yet really funny comments I've ever read on Slashdot. Simply fabulous!

    2. Re:Wow! by minus_273 · · Score: 4, Interesting

      "Can I get them to compile asm to java bytecode next?"

      Not as funny as you think. It would be a truly awesome program that can do that. Why? take MS office, disassemble make it java byte code then run it on the platform and OS of your choice.
      dont see anything like that happening for a while, but it certainly is not funny.

      --
      The war with islam is a war on the beast
      The war on terror is a war for peace
    3. Re:Wow! by tupshin · · Score: 4, Informative

      http://www.xwt.org/mips2java/

      Takes compiled mips binaries and converts them to functional java classes.

    4. Re:Wow! by Gopal.V · · Score: 1

      Think about it ... a single C binary which will run on various platforms by adapting to the structure layout , pointer/int sizes , endianess and syscalls.

      I'm not talking about switching everything to .NET , I'm just saying "C# sucks for performance" ... if you want .NET don't do MS's Managed C++ (which is not x86 + .NET hacks) , use pnet's Managed C++

    5. Re:Wow! by ron_ivi · · Score: 1
      "Can I get them to compile asm to java bytecode next?"

      I've actually had a job doing this by hand. Worked a bit on a chip with a hardware java core and was porting DSP algorithms to Java Bytecodes.

    6. Re:Wow! by Sivar · · Score: 2, Informative

      Have you used C#?

      C# is not run as interpreted bytecode (which would be slow); it is "compiled" to bytecode and then, when the program is first run, compiled to native code. It is about 10-20% slower than a similar program written in C++, but for most GUI apps on modern machines, this does not matter.
      Of course, for "real programmers", C and C++ still grant you much more power. Function pointers, inline assembly, easy bitwise operations... C# is fine for many programs, but just TRY to implement a network protocol using it! MD5 is another good one. I haven't tried it myself, but have a friend that was forced to by a company thoroughly brainwashed by Microsoft.

      Pain.

      --
      Computer Science is no more about computers than astronomy is about telescopes. --E. W. Dijkstra
    7. Re:Wow! by Anonymous Coward · · Score: 0

      I develop the Portable.net VM ... Compare Portable.net's MD5 algorithms with your C code ...

    8. Re:Wow! by Anonymous Coward · · Score: 0

      Can I get them to compile asm to java bytecode next?

      Um, yes? That's been an option for years.

    9. Re:Wow! by toriver · · Score: 1

      Er, in both Java and .Net the virtual machine usually compiles to native code, which is what actually runs.

      Yes, you can force interpreted mode instead, but why would you ever want to other than to stroke some "slowness" misconception?

    10. Re:Wow! by pjt33 · · Score: 1

      Ah, but Java bytecode isn't purely interpreted, at least not by Sun's current VMs. And HotSpot can probably do a better job of optimising than you can, so it might actually speed up your hand-crafted assembly code.

    11. Re:Wow! by pt99par · · Score: 1

      The .NET VM is a Just In Time compiler which can perform in theory just as fast as a native or faster than a native compiled program.

    12. Re:Wow! by sploxx · · Score: 1

      Thanks alot for this link!!
      I was looking for this (or a similar C/C++ -> JVM bytecode converter) since YEARS!

    13. Re:Wow! by pt99par · · Score: 1

      Correction: Microsoft .NET runtime JIT MONO JIT Portable.NET Interpreted The IL bytecode can run on all of theese platforms so the C code compiled with portable.NET will probably run fast on mono and ms impl but not very fast on Portable.NET itself but will be highly portable which is just as important in some cases..

    14. Re:Wow! by Anonymous Coward · · Score: 1, Informative

      C# doesn't suck for performance. It's actually a quite performant language and the overhead versus straight tuned native code is quite small - on the order of 5% or so. The DirectX .NET libraries show only a 2% performance loss over the native C++ thanks to their skill at understanding how the runtime works - even with all that underlying marshalling going on.

      I've written computer vision / image processing algorithims in C# that were as fast as their C equivalents. It's just a matter of understanding what you are doing and what the underlying runtime is going to be doing.

      Yes, you can use pointers - thats why there is the unsafe {} keyword. (Its still managed, unsafe != unmanaged).

      I don't mind losing 5 or even 10% on my application if my development productivity is doubled.

    15. Re:Wow! by jonnosan · · Score: 1

      No need to implement MD5 in C#, just use the crypto APIs that come with .Net.

      It's plenty fast.

    16. Re:Wow! by actiondan · · Score: 4, Informative


      You do know that the .NET runtime uses JIT compiling rather than interpreting to actually execute applications, don't you?

      One the app is running, the processor is dealing with native, optimised machine code rather than the IL bytecode.

      Dan.

    17. Re:Wow! by Lord+Crc · · Score: 1

      How on earth is it insightful? If you read some of the interviewes with the people involved in designing .Net, their IL was designed to target a JIT. Quote: I think one of the key differences between our IL design and Java byte code specifically, is that we made the decision up-front to not have interpreters. Our code will always run native. So, even when you produce IL, you are never running an interpreter.

      But appart from that, it was kinda funny.

    18. Re:Wow! by Caine · · Score: 2, Informative
      Of course, for "real programmers", C and C++ still grant you much more power. Function pointers, inline assembly, easy bitwise operations... C# is fine for many programs, but just TRY to implement a network protocol using it!

      C# gives you access to function pointers, inline assembly and has the same friggin bitwise operators every other language in the world has. I've also implemented sockets encrypted at the sockets level which went just fine.

    19. Re:Wow! by Ctrl-Z · · Score: 1

      C# is fine for many programs, but just TRY to implement a network protocol using it!

      The managed SQL Server provider for Mono has its protocol implemented in C#. Or is that not what you meant.

      --
      www.timcoleman.com is a total waste of your time. Never go there.
    20. Re:Wow! by Anonymous Coward · · Score: 0

      I believe it is not given that the program will JIT. JIT is nice and sexy to talk about but there is nothing that specifies the .NET has to be JIT-ed. It usually will be though.

    21. Re:Wow! by balliet · · Score: 1

      If anyone is interested in Mips2Java please drop us a line at the core@xwt.org mailing list (http://lists.xwt.org/listinfo/core). The web page his horribly out of date. We've done a lot of cool stuff since we put up that page.

      -Brian

    22. Re:Wow! by metlin · · Score: 1

      Hmm, the reason I said it was insightful was because C was originally designed for hardware level interaction - a little higher level of abstraction than asm, but with the same kinda power.

      It was written for writing operating systems, drivers and the like - hence the kind of power that it came with. However, its a double edged sword - if not handled properly it will cause issues that the original poster mentioned.

      However, by introducing a VM in between, you are defeating the very purpose for which C was designed with those seemingly flawed features.

      Hence my remark of it being insightful! :)

  9. Weren't you guys beaten to it by CNet? by Ratface · · Score: 3, Funny

    Sorry - someone had to say it!

    --

    A little planning goes a long way...
  10. Ummmm.... by Phidoux · · Score: 0

    With all the memory leaks in the .NET framework (I'm talking about the MS version of the .NET framework here) why would anyone, in their right mind, want to turn their C code into something that runs like crap?

    1. Re:Ummmm.... by BlueTrin · · Score: 1

      Nobody will notice that it is your app which is leaking memory under longhorn if it stays like the build 4053 =)

      --
      Don't you know it is now both immoral and criminal to think beyond the next quarterly report?
  11. Because there was no more room in hell? by Anonymous Coward · · Score: 5, Funny

    C lives on; driven by an insatiable unreasoning swarming hunger. Until the day when the seventh seal is broken, the sun dies, and all the languages are at last bound to it's dark will. Then all of man, in the Doom of our time, will writhe in agnoy for a thousand years of darkness until the, strongly typed, Rapture casts the dark empire back into the pits of hell, and scatters the damned to the winds.

  12. Keep it real... by seanmcelroy · · Score: 5, Insightful

    QUOTE: The real question is this: would you rather program against the pitiful number API's that come with C#, or the huge Free Software diversity that you get with C? The death of C has been greatly exaggerated.

    Now what a spin. The .NET API's are by no means 'pitiful in number', and they can be embraced, extended, and overridden as desired. C *can* adapt, but the point of a C# based desktop system or development platform is not solely to exclude C, but to bring the benefits of managed code to other system consumers. C could adapt, but not without a lot of overhead and fundamental changes that really is the point behind C#. I'm sure we'll be in a backwards-compatible, C-friendly world for a long time to come, but there's no reason to bash something new and different because it is new a different. That's just FUD.

    --
    Be very, very careful what you put into that head, because you will never, ever get it out. -Thomas Cardinal Wolsey
    1. Re:Keep it real... by forgoil · · Score: 5, Insightful

      Not to mention the fact that the developers of C# (i.e. the people developing the language, not with the language) made sure that one can easily make use of C and C++ code and binaries already in existance. You can already call all the C/C++ APIs.

      I'm not sure or clear of why one would want to code in C instead of C# when developing for a .NET environment (be in Microsoft or Mono or something else). It can't be because you can't make use of already written APIs (since you easily can call them), so we killed that point. It can't be because of the "speed" of C, since it will be running the same IL on the same CLR. We are basically down to the language of C.

      So is this because someone feels that OO could be too big for very small devices (Java MIDP showed us this very clearly, since it is completely missplaced and awful on mobile phones)? I can buy that.

      Or is it because of some form of hatred towards C#? That makes it sad. The APIs for .NET are far better than any C API I've stumbled upon thus far (win32, POSIX, Solaris, GNU, etc), contains a vast amount of useful things, and easily calls unsafe (.NET terminology, look it up if you don't actually know what it means) C/C++ APIs.

    2. Re:Keep it real... by Anonymous Coward · · Score: 2, Funny

      The real question is this: would you rather program against the pitiful number of security holes that come with C#, or the huge Security Hole diversity that you get with C?

    3. Re:Keep it real... by Sique · · Score: 2, Insightful

      Or is it, because there are lots of work already done in C, and adapting the code to .NET seems more feasable than porting it to C#? Or because the algorithms are given in C, and it makes no sense to reinvent them in C#, because they don't make any usage of an object oriented design? (Think about huge numerical packages.)

      --
      .sig: Sique *sigh*
    4. Re:Keep it real... by TummyX · · Score: 3, Insightful

      Um think about it. P/Invoking involves calling native DLLs (meaning you'd need a different binary DLL for each platform). By compiling your C libraries into IL using Portable .NET's C compiler you can distribute one set of binaries for your applications.

      For example, if you need good JPEG decompression routines in your ".net" application you could recompile libjpeg with pnet's cscc compiler and keep your application 100% "managed".

      Far too many people on this thread know *nothing* and are talking crap.

    5. Re:Keep it real... by Phroggy · · Score: 1

      Far too many people on this thread know *nothing* and are talking crap.

      You must be new here.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  13. Punch Cards by Detritus · · Score: 5, Insightful
    Punch cards did not disappear, they just became virtual.

    FORTRAN and COBOL are still in wide use, even if they aren't as popular as they once were.

    --
    Mea navis aericumbens anguillis abundat
  14. C's not dead because nothing better.... by bangular · · Score: 5, Insightful

    C has it's problems. You could complain about C all day, the problem is, it's the best thing we have right now. One of the problem with modern languages is, you can't write an operating system in them. One of the problems is half the new languages are scripting perl/python like langauges and the rest compile to byte code. Maybe C would go away if there was a compiled langauge that wasn't largely controlled by one company that produced fast code and was portable. The closest thing to that besides C is C++.

    1. Re:C's not dead because nothing better.... by Ambassador+Kosh · · Score: 2, Informative

      Python does compile to bytecode. It just does not require a separate step to compile to bytecode like java does. If the bytecode is out of date it will be recompiled and used automatically.

      --
      Computer modeling for biotech drug manufacturing is HARD! :)
    2. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      *WHOOSH*

      (the point, flying right over your head)

    3. Re:C's not dead because nothing better.... by John+Courtland · · Score: 1

      Uh, you can't run bytecode on a raw machine. C and Assembler are what make the computer world run. You can't make Java in Java. C turns directly into executable binary (or object files then linked into executables). Java cannot. I suppose that if you were insane enough, you could make a bytecode to opcode converter, but then you lose 100% of the point of the langauge, probably a lot of the efficiency, and at that point you may as well use C.

      --
      Slashdot is proof that Sturgeon's Law applies to mankind.
    4. Re: C's not dead because nothing better.... by alice_in_cipherland · · Score: 1

      There are compiled languages that are arguably better than C, such as Eiffel, Modula-3, and D. These may be promoted by companies, but surely not controlled. C is popular because it's simple and powerful, is good enough, and has inertia. But that doesn't necessarily mean it's the best.

    5. Re:C's not dead because nothing better.... by infiniti99 · · Score: 4, Interesting

      The closest thing to that besides C is C++.

      For general purpose programmming, C++ is often overlooked because it suffers from the same problem as C in this scenario, which is that there isn't really much in the standard library to draw from. C#, Java, Perl, Python, etc, all have lots of "foundation" underneath which allow you to build applications quickly.

      However, this is not so much an issue of language as it is of API, and C++ has the language features necessary to build a good API. All that is needed is a good library then, such as the Qt C++ library. With Qt, you get nearly the same foundational API as Java, but with natively compiled code. C++ may not be the end-all be-all of languages (no language can claim this), but it is much more capable than many people think. If you wouldn't touch C/C++ with a 10 foot pole, you haven't tried Qt. You can have your cake (large, well constructed API) and eat it too (native code).

    6. Re:C's not dead because nothing better.... by SpaghettiPattern · · Score: 5, Insightful

      C has it's problems.
      C has no problems. It does exactly what it's supposed to do.

      You create problems when using C for business purposes. Business programmers don't want to waste time chasing memory leaks and array overflows.

      --

      I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
    7. Re:C's not dead because nothing better.... by Tore+S+B · · Score: 1

      One of the problem with modern languages is, you can't write an operating system in them.

      And that's a disaster? Poppycock. C is a brilliant middle-level language, but the world needs a language that is capable of doing stuff on a higher level.

      --
      toresbe
    8. Re:C's not dead because nothing better.... by LegendLength · · Score: 1

      I find C can be the best choice when dealing with Win32 APIs.

      I admit that some of this may be because of ignorance of COM or other new APIs. But I would add that I find it understandable that developers would be weary of investing too much of their time into new MS APIs. I for one am a little cautious after dealing with such bad design in the past from them.

    9. Re:C's not dead because nothing better.... by grumbel · · Score: 3, Interesting

      There is Ada95 which should come pretty close to your requirements, its pretty much like C, just with a whole lot safety added.

      But you are right most of the new languages really don't touch the areas where C is successfully today. I think one of the major problems, at least in the Unix world, is that pretty much every library is written in C, so if another language should take over, you would have either to rewrite all libraries out there or at least create bindings to your new language and since that is a major overtaking it won't happen anytime soon.

    10. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      A simple device driver.

      A boot loader.

    11. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      C has no problems. It does exactly what it's supposed to do.

      Ok. How do you printf a value of type size_t portably?

    12. Re:C's not dead because nothing better.... by Imperator · · Score: 4, Informative
      at least in the Unix world, is that pretty much every library is written in C

      Actually some of them that look like they're written in C are actually written in C++. They're just careful to make sure that all the public interfaces are extern "C". They can then use whatever fancy C++ features they want in implementing the library.

      I think this is one of the real strengths of C: because the ABI is so simple, pretty much anything can link to C and almost anything can create C bindings.

      --

      Gates' Law: Every 18 months, the speed of software halves.
    13. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      Bad examples: Assembly could be even better choice for those.. linux kernel is more like it.

    14. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      One of the problems is half the new languages are scripting perl/python like langauges and the rest compile to byte code.

      True. Common Lisp, Haskell, SML, OCaml, Felix, D, and all the other dozens of portable modern languages with native code compilers simply don't exist.

    15. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      Qt has all the disadvantages of Java (big bloated blob of code that makes platforms look and work alike -- all like Windows in this case), with none of the advantages. It is, quite frankly, the worst of all worlds.

    16. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      We can be sure that size_t is never going to be real so just cast it to the largest integer available:

      printf("%li", ((uint64_t)my_size_t_var));

      If size_t is larger than 64bit than you'll be using non-portable functions anyway.

      comp.lang.c anal-retentives may now flame me.

    17. Re:C's not dead because nothing better.... by 0123456 · · Score: 1

      Boot loader perhaps, but assembler is unlikely to be a better choice for a device driver unless it's really, really time-critical. I've written drivers in both assembler and C, and it's much easier in C (not to mention more portable)... sure, you could use C++, but that introduces a whole host of problems of its own.

    18. Re:C's not dead because nothing better.... by Savant · · Score: 1

      There spoke someone with insufficient experience coding in both. For starters, Qt allows you to "skin" your apps to look like they came off any of a number of OSes.

      I spent most of a year maintaining a compiler written in Java. I came to miss pointers badly in certain places - when you come to the limits of the String class, not having a way to bypass it and tinker directly with the data makes life harder. It wasn't particularly snappy. I didn't come away from the experience wanting to use Java over everything else. Java has some good points, but it also has its own frustrations.

      I've spent the last couple of years working with Qt on a 3D graphics app. Qt interfaces really rather nicely with OpenGL - you'd be stupid to even try implementing cutting-edge graphics in Java. Qt is pretty sharp performance-wise, and certainly in a different speed league to Java. It's at least as well-documented. It gives you all of the advantages C++ still holds over Java, plus great cross-platform portability, and I frankly feel it pushes Java toward irrelevancy.

      Savant

    19. Re:C's not dead because nothing better.... by interiot · · Score: 1

      Is there nothing in Windows that provides standard library functions to C users? Given that Microsoft's MO is to put their hooks in any API they can possibly find, does such a library exist in windows?

    20. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      Business programmers don't want to waste time chasing memory leaks and array overflows.

      NOBODY wants to waste time chasing leaks and overflows, do you? Time waster.

      We all love those easy to debug MACROS and DEFINES that are PREPROCESSOR SUBSTITUTED, same for TEMPLATES. Not even the concept of "properties".

      Dont you mean Cludge++ or Cludge language? Thats what its become.

    21. Re:C's not dead because nothing better.... by coldtone · · Score: 1

      Agreed,

      C is very good at programming operating systems, drivers, and any time you really need to have a piece of code run extremely fast. The power in directly manipulating memory are must sometimes.

      But C really sucks when it comes to building a business app.

    22. Re:C's not dead because nothing better.... by rve · · Score: 1

      What are these problems you feel C has? It's small, simple, fast, elegant, ubiquitous. I would use it for anything that java or a scripting language aren't fast enough for.

      C++ is the opposite. It is slow, no faster than java for most things. It is also ludicrously complex, takes ages to compile, makes it very easy to introduce obscure and almost undiscoverable bugs, and very hard to write portable code. I can't really see why you would still want to use it.

    23. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      Yup:

      a) (less severe) What the heck is this uint64_t?
      b) (more severe) "%li" is the format specifier for signed long and I suppose uint64_t isn't that.

      Try "%zu" in C99 or "%lu" in C89 with cast to unsigned long. (IIRC size_t cannot be bigger than unsigned long on C89 but don't ask me for c&v)
      The thing is, without historical screwups this'd be trivial, so C isn't perfect for its job.
      If it was, writing unconditionally portable programs wouldn't be next to impossible due to stuff like integral promotions that may suddenly make things unsigned when you're expecting signed on all "reasonable" platforms etc.

    24. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      What the heck is this uint64_t?

      I was under the impression it was introduced with C99. Havn't not read C99, and as K&R havn't released a 3rd edition, I'll admit I could be wrong.

      "%li" is the format specifier for signed long and I suppose uint64_t isn't that.

      Sorry, my bad. GNU'isms are showing through there; I don't think GCC will warn if you use %li with an integer as I did. I'd check but my *nix box is currently busy, uh, compiling Gcc as it happens.

    25. Re:C's not dead because nothing better.... by be-fan · · Score: 4, Informative

      You could complain about C all day, the problem is, it's the best thing we have right now.
      Hardly.

      One of the problem with modern languages is, you can't write an operating system in them.
      Sure you can, with little more ASM code than is required for a C-based operating system. Heck, lots of OSs have been written in things like Lisp. Actually, C is a terrible language for writing operating systems. Because its not safe, you have to have an MMU to protect programs from each other. This sucks for performance. Not only do you have the hit of memory protection, but you have to have bounderies between userspace and kernelspace, and between programs. That's why it takes 600(!) clock cycles on my P4 to do something trivially simple like gettimeofday()! If you use a safe language, you don't need memory protection, or even a kernel/userspace boundry for that matter. You get completely fine-grained protection for all objects. See this SF project for an OS written in a safe language.

      One of the problems is half the new languages are scripting perl/python like langauges and the rest compile to byte code.
      I don't know what's the current fetish with VMs, but most of the really advanced languages (Lisp, ML) compile to well-optimized native code. Look at the recent comp.lang.lisp thread where they ported Almabench to CMUCL, and got within a few percent the performance of C.

      Maybe C would go away if there was a compiled langauge that wasn't largely controlled by one company that produced fast code and was portable.
      Common Lisp
      Another Common Lisp
      Ocaml
      Scheme
      Dylan
      Another Dylan

      We have lots of languages that are much more powerful than C (hell, they're much more powerful than Java/C#), safer than C, and very close in performance. It is merely a failure of programmers and the software industry that we have not been able to utilize them.

      --
      A deep unwavering belief is a sure sign you're missing something...
    26. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 2, Interesting

      C has no problems. It does exactly what it's supposed to do.

      Sure it does, parts of its standard library are moronic.

      Business programmers don't want to waste time chasing memory leaks and array overflows.

      C does not inherently cause memory leaks and array overflows. Programmers cause memory leaks and array overflows, C just doesn't prevent them from doing so.

      I use C++ every day, and while it's not the same, it's close enough to fall under the same criticism. I haven't had a memory leak or array overflow in a very long time. It's trivial to avoid them.

      So why are there so many? Lack of skill, lack of attention. This is why you wouldn't use them for business purposes, you have to hire more expensive programmers.

    27. Re:C's not dead because nothing better.... by fitten · · Score: 1

      One word: strings

      The one singular thing I hate most about C (and is actually one of the biggest problems with worms and the like) is the lack of a string (I love C, though, on the whole). Programmers habitually use strcpy and such when they shouldn't and this creates buffer overruns which leads to all kinds of other junk. Not only that but dealing with passing strings/buffers down layers through libraries suck. You have to determine who will do the allocation/deallocation and, if the passed in buffer isn't big enough, somehow let the caller know to call you again sometime later when they have a big enough buffer. These things lead to complex code which leads to bugs and lots more development time. Having a decent string "class" (which folks tend to write a lot, over and over in C - reinventing the wheel many times) would solve lots of problems.

    28. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 1, Informative
      Actually some of them that look like they're written in C are actually written in C++. They're just careful to make sure that all the public interfaces are extern "C". They can then use whatever fancy C++ features they want in implementing the library.

      a very good example of such a case is SGI's GLU library - internally it is written in C++ but none of its guts are exposed and nobody that hasn't looked at the code is aware that it is not C.

    29. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      You really shouldn't be using String to do extensive manipulation of strings. Strings are immutable, so they need to be created and destroyed all over the place when you want to make any sort of changes to them. This is a common Java programming fallacy. Anyway, the correct solution is to use a StringBuffer, which does give you the sort of flexibility you want in twiddling with individual characters of a string.

      Incidentally, considering Java strings are UTF-16, I'm not sure if you really want to be mucking around with them in a character-by-character fashion. Seems like working with byte arrays would be the way to go.

    30. Re:C's not dead because nothing better.... by Anonymous Coward · · Score: 0

      So, when you program in most of the languages you listed, how long does it take to wear off the keytops of your nine and zero keys?

      Maybe you like to read Lisp (or Lisp-like) code, but I sure as hell don't.

      I've seen obfuscated perl that looks better than (((some (of) ((the) crap) I've)) ((seen) (written) ((in) Lisp).

    31. Re:C's not dead because nothing better.... by Arkaein · · Score: 1

      The standard C API on Windows is the Win32 API. It works, but basically blows compared to APIs for more modern graphical toolkits like Qt. It has been available for a long time though.

      In many ways it is actually superior to Microsoft's C++ APi from before the whole .NET thing, which is MFC (Ficrosoft Foundation Classes). MFC is basically a bunch of objects which wrap the Win32 C API, and as such offer only small benefits over it compared to what a true, from the ground up object oriented API would offer, and in some cases makes it harder to get things done..

      Maybe someone who's actually done .NET programming can comment, but I would guess that a lot of .NET functionality is implemented through hooks to the standard Win32 API.

    32. Re:C's not dead because nothing better.... by Panaflex · · Score: 1

      heh.. reading time generally means going out on the bus (The south bridge in PCI architecture) and hitting a timer chip. Because this means a lot of latch/unlatch on the bus, plus cache coherency there's going to be a hit. Try reading random locations from memory.. say on your AGP card, and you'll find the same issues.

      Not a function of your C compiler, try again.

      As for a safe language, that is a nice utopian ideal, but thank goodness that MS didn't write windows in it. Can you imagine all the Virus and trojan horses? Memory management is a must. What about the case where a removable device failes to work because of a bad contact? With an MMU this is fairly trivial to kill the whole process and cleanup the bus. With a safe language, there would be an enormous amount of exceptions which would have to individually handle many different cases.

      However, I will completely agree with your last point.. software can be a lot more powerful, usable, and safer than it is. Whoever invents it is going to be a hero!

      Pan

      --
      I said no... but I missed and it came out yes.
    33. Re:C's not dead because nothing better.... by be-fan · · Score: 1

      heh.. reading time generally means going out on the bus (The south bridge in PCI architecture) and hitting a timer chip.
      Not on anything more recent than a Pentium. They've got a time-stamp counter that can be read from in a few clock-cycles.

      Not a function of your C compiler, try again.
      No, a function of the fact that there is a kernel userspace boundry, necessitated by the fact that C code can, by error or maliciousness, corrupt memory. Switching from userspace to kernel space costs 500-600 clock cycles on my P4. The fastest its ever been on recent x86 processors is about 150 clock cycles on the P6 series. A single system call negates the advantage of a whole bunch of saved array checks!

      As for a safe language, that is a nice utopian ideal, but thank goodness that MS didn't write windows in it. Can you imagine all the Virus and trojan horses?
      Don't you think there would be fewer viruses and trojan horses given a language in which buffer-overflows cannot occur? Where array-overflows cannot occur? Its much easier to get the compiler's range-checking code correct than to write tons of C programs free of memory-related security errors.

      Memory management is a must. What about the case where a removable device failes to work because of a bad contact? With an MMU this is fairly trivial to kill the whole process and cleanup the bus.
      I don't get this example. There is no difference here between the MMU and safe-language case. Hardware devices are not protected via the MMU, so a misbehaving hardware device would corrupt random memory, and thus require a restart of the system. If, instead, it just confused a process talking to it, you could still kill it in a safe language, and the GC would clean up all the resources used by the killed process.

      --
      A deep unwavering belief is a sure sign you're missing something...
    34. Re:C's not dead because nothing better.... by be-fan · · Score: 1

      Lisp code is real pretty, once you get used to the parens. Certainly, parens are a lot more pretty than curly-braces :-/ And since every Lisp IDE worth using auto-completes parens, it really doesn't bother you. Since Lisp programmers use indentation to show structure, the perens don't really hurt readability. In any case, they are good reason. Its makes procedural macros much easier and more powerful to use.

      And Lisp and Scheme are the only prefix languages in my Lisp. ML and Dylan are infix languages.

      --
      A deep unwavering belief is a sure sign you're missing something...
    35. Re:C's not dead because nothing better.... by chthon · · Score: 1

      Yep, and for business purposes COBOL still rules.

    36. Re:C's not dead because nothing better.... by Panaflex · · Score: 1

      The time stamp counter is not used for keeping time, dude, only the number of clock cycles since bootup.

      http://www.cs.wm.edu/~kearns/001lab.d/rdtsc.html

      Secondly, your premise that changing the software compiler language will save the world is a load of foo. CPU's running all code in kernel space would bring us back to the dark ages in terms of protection against hacks and security of data to name a few.

      I suppose you think that Java will save the day? Little do you know how much java depents on native code execution (JNI). Parts of java are written in C, for instance. Just look up java security flaws in 2003 on google for an overview.

      And yes, in memory mapped IO, the MMU controls access to the bus. When a call to an illegal memory location is detected (for instance, by a malfunctioning driver) the MMU will trigger an exception on the processor. Since most devices use a mixture of MMIO and interrupt driven drivers this is easily handled.

      Removing the mmu and bounds checking every memory access would cause your shiney new opteron to run at much reduced speeds. To try this out, run a few complicated Java Swing applications.

      Listen, I'm not disagreeing that "We need to change software." What we need despirately is better testing tools, languages that scrutinize inputs from foreign sources such as user, network, and disk. Compilers that really analyze not just optimize.

      I'm open to new ideas, but I'm tired of cookie cutter development tools. It's good to see things as a child in this respect, to look at what should "just happen"

      Thanks for your insight, and don't give up. It's time to revolutionize software. The advent of HTML brought millions of people into the computing world, and it's ripte for a fresh change.

      --
      I said no... but I missed and it came out yes.
  15. Everything old is new again... by SuperKendall · · Score: 1

    An interesting trck, but it has been thought of before...

    A more interesting question is why you wouldn't rather just use C on these various devices, which by their nature are constrained and lend themselves to code that squeezes all you can get out of them.

    A C to .Net bridge won't help you if there's some native feature of the device with no Compact.Net library support.

    And then of course there are the number of devices that support Compact.Net... wouldn't you be better off finishing up that C->Java compiler so you could write bytecoded C for things like the blackberry or sidekick or Treo?

    Seems kinda astroturfy to me.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  16. C is dead for me! by phsdv · · Score: 0, Flamebait

    I prommised myself that I will never program in C again. And so far, almost a year now, I am sucseeding in this! I even think that I already forgot what * and & are meaning. In the past, I have programmed many different projects in C, including a very complex embedded system. But when I have the change I will use a modern language like Python. Maybe it is slow(er), but the total time spend is so much less. But that I do not have to tell that to /. right?

  17. Huh? by drgonzo59 · · Score: 3, Funny
    I wonder if Microsoft can then compile the .NET framework into IL and run .NET (on top of .NET)* ?

    In the meantime I'll just risk being labeled "old-fashioned" and compile C straight to binary

    1. Re:huh? by Anonymous Coward · · Score: 0

      you

  18. Declaring "X is dead" is just a cheap shot. by Biotech9 · · Score: 5, Insightful

    And its done by someone with a new technology to get people talking about it. Look at all the debates and forum chatter that got sparked off by intels "Bluetooth is dead". "C is dead", "CISC is dead"....
    ,"Apple is dead".
    When technologies really do die, its when noone gives a damn about them, and so noone will be writing a story about it.

    1. Re:Declaring "X is dead" is just a cheap shot. by Anonymous Coward · · Score: 0
      Oh my god! Oh my God!

      X is dead, oh my, what are we all going to do go back to the comandline.?

      oh wait...

    2. Re:Declaring "X is dead" is just a cheap shot. by andy55 · · Score: 1

      omg... that apple death knell counter page is hysterical! thanks for sharing that--i laughed damn hard at it... it really is funny how many ppl look for every reason to reject macs and make headlines.

    3. Re:Declaring "X is dead" is just a cheap shot. by Anonymous Coward · · Score: 0

      "X is dead" is dead.

    4. Re:Declaring "X is dead" is just a cheap shot. by master_p · · Score: 1

      But there are things that are really dead...GW Basic, the Amiga, the Atari ST, the ZX Spectrum...I can go on and on and on...

    5. Re:Declaring "X is dead" is just a cheap shot. by Anonymous Coward · · Score: 0

      Declaring that someone said "C is dead" is an even cheaper shot. Almost beneath contempt in fact, and Rhys Weatherly should be ashamed of himself.

      Icaza is frequently less than careful with his words... but he made it quite clear that "C is dead TO ME." Referring to his general app development. C is heavily used in the Mono VM, and will continue to be used for operating systems/device drivers etc etc.

    6. Re:Declaring "X is dead" is just a cheap shot. by 0x0d0a · · Score: 1

      Except Miguel never said that C is dead. This was a misquote by the Slashdot article that people are happily throwing around.

      If C is dead, a lot of Miguel's code is going to suddenly disappear. :-)

  19. Right tool for the right situation. by Slayk · · Score: 2, Insightful

    It seems to me (even with my limited knowledge of programming and software engineering) that when such statements are made about the death (or undeath...mmm...CZombie...."HEADERS....HEADERSSS") , the idea that C# has its place in fitting in with the .NET framework, C has its place in things like...say...stuff like the Linux kernel (though that isn't near its only use), Java and it's being cross platform, etc is totally ignored.

    Just because you can hammer in a screw if you try hard enough doesn't mean the screw driver is dead.

  20. Insightful by SuperKendall · · Score: 5, Interesting

    When you hear someone declare "X is dead" it usually means they have a vested interest in X actually dying, and wish to further that belief. Either that or it's more like a mafia situation where a statement like "X is dead" is more of a prediction with a strong likelihood - it all depends on the power of the speaker.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Insightful by Anonymous Coward · · Score: 0

      god is dead

    2. Re:Insightful by deadlinegrunt · · Score: 2, Funny

      How can C be dead regardless?
      I thought C can't die, it just gets cast to void.

      --
      BSD is designed. Linux is grown. C++ libs
    3. Re:Insightful by Ctrl-Z · · Score: 1

      When you hear someone declare "X is dead" it usually means they have a vested interest in X actually dying, and wish to further that belief.

      I think a lot of people would like to see X die.

      --
      www.timcoleman.com is a total waste of your time. Never go there.
  21. Broader Perspective by VoidEngineer · · Score: 5, Funny

    Summary of argument to date (translated from geek-speak):

    > Queens English is so dead.
    > Yo, it's all about Ebonics.
    > Dude, Southern Drawl is *soo* slow... Surfer speak is a way better language.
    > Like, Valley Speak is, like, the best networking dialect to know!
    > Well, if you want a job with a blue-chip company, go with Chicago Twang.
    > I hear that they're porting the Queens English libraries to Chicago English, btw.
    > See? Queens English is not dead...

    Dialects, people... just dialects. Try to see things in the broader scheme of things. (punny, eh?).

    1. Re:Broader Perspective by Hairy+Dude · · Score: 1

      > Queens English is so dead. Is that really Queens English or *the* Queen's English?

    2. Re:Broader Perspective by Anonymous Coward · · Score: 0

      Good point.

      They don't speak English in Queens.;-)

  22. C? Dead? by Anonymous Coward · · Score: 0

    I think it's a bit silly to say that C is "dead." As a Christian, I won't write anything in C (obviously), but it's hard to call a language "dead" when there are billions of lines of C code out there and running everything from ATMs to nuclear power plants. What language do you think that your Linux kernel or your Windows XP internals are written in? How many processor-intensive image processing systems are written in C, and do you think that these systems are going to be ported to Java or BASH? C isn't going anywhere anytime soon. It has its problems as a language but it still remains a powerful tool if your particular belief system is compatible with its philosophy.

    1. Re: C? Dead? by Black+Parrot · · Score: 2, Funny


      > As a Christian, I won't write anything in C (obviously) [...] and do you think that these systems are going to be ported to Java or BASH?

      As a Christian, you should clearly support J4V4 in all things.

      --
      Sheesh, evil *and* a jerk. -- Jade
    2. Re: C? Dead? by Anonymous Coward · · Score: 0

      How come Homer and Krusty look like clones?

      Its funny. I have been wondering about this for a long time

    3. Re:C? Dead? by timmarhy · · Score: 0, Troll

      wtf has a computer language got to do with your believe system, you fucking freak?

      --
      If you mod me down, I will become more powerful than you can imagine....
    4. Re:C? Dead? by Anonymous Coward · · Score: 0

      I was just about to call him the crappiest troll I've seen in a long time and then 'lo and behold you, the biggest idiot I've seen in a long time, come along and actually fall for it. Just promise us all you won't reproduce, O.K?

  23. It's not dead. by Teddy+Beartuzzi · · Score: 4, Funny

    It's just pining for the fjords.

    1. Re:It's not dead. by Eric_Cartman_South_P · · Score: 1
      Pining for the fjords? What kind of talk is that?

  24. *yawn* by sweepkick · · Score: 2, Interesting

    I'll start worrying when I see entire OS's and their requisite device drivers written completely in a bytecode language.

    *shrug*... bring it on.

    1. Re: *yawn* by Black+Parrot · · Score: 1, Interesting


      > I'll start worrying when I see entire OS's and their requisite device drivers written completely in a bytecode language.

      I don't suppose you'll like my idea for a metalanguage, which can be interpreted at run time into the bytecode language of your favorite bytecode interpreter?

      --
      Sheesh, evil *and* a jerk. -- Jade
    2. Re:*yawn* by zhenlin · · Score: 1

      There are several JVM-in-(micro/nano)kernel with purely Java drivers and in some cases, purely Java services usually implemented in-kernel.

      http://jos.sourceforge.net/ is one of them. There was another one that I looked at before, but I don't remember its name or address.

  25. Well.... by Anonymous Coward · · Score: 1, Funny

    if we could only get a compiler that does what I think I'm doing instead of what I actually told it to do....then we'd have something

  26. Yup that exists by Julian+Morrison · · Score: 4, Informative

    http://cat.nyu.edu/~meyer/jasmin/

    1. Re:Yup that exists by zarr · · Score: 1

      Of course, Jasmin just compiles java VM assembly into java bytecode, not x86, mips or any other *real* assembly language. The java VM is stack based, so it's a pain to program for in assembly. The java compiler will probably do a much better job at optimizing it anyways...

  27. Let it die! by Lux · · Score: 1, Flamebait


    We need C like we need more buffer overflow vulnerabilities!

    Let the miserable wretch die, or overhaul it to be type safe.

    There are some things that are better buried.

    1. Re:Let it die! by zalas · · Score: 2, Insightful

      Screw that! We need more programmers aware of vulnerabilities in systems and to be able to deal with it. Dumbing down a language at the expensive of performance is only going to dumb down the programmers. Well, to a point. My ideal programming language would be something that allows me to do practically anything with it and leaving its internals exposed. You can program with a safe subset if you're beginning, but you can then expand to advanced programming without the language limiting what you can do.

    2. Re:Let it die! by Temporal+Outcast · · Score: 5, Interesting

      Flamebait.

      Remember, a language does not cause overflows - careless and stupid programmers do.

      C is built for low-level interface, and its best suited for that purpose. Its lean and mean, and thats how its meant to be.

      If you want complex exception handling and all that, you are probably using the wrong language for the task.

      Blame the people who used C for the wrong task, not the language.

      --

      Vote for a Man, Vote for Bush!
      Not a liberatarian flipflop hippie.
    3. Re:Let it die! by mpmansell · · Score: 2, Insightful

      Phew!! Thank god for your comment. It saved me a lot of typing :)

      On the subject of careless and stupid programmers with C, how about starting a movement to execute people who ignore warnings because they are only 'warnings' :)

    4. Re:Let it die! by Anonymous Coward · · Score: 0

      You need C to run all your bytecode, which runs anywhere only on C OSs. Funny how "run anywhere" is an accepted hype.

    5. Re:Let it die! by LarsWestergren · · Score: 2, Insightful

      Remember, a language does not cause overflows - careless and stupid programmers do.

      But why have a language that enables the possibility for careless and stupid programmers like myself to do overflows?

      "Sir, perhaps its the fact that we put the self destruct button next to the light button on our new combat vehicle that causes a large number of them to explode?"
      "Button proximity does not cause explosions! Careless operators cause explosions!!"

      When I subscribed to Bugtraq, it seemed most of the vulnerabilites discovered (a couple per day) was caused by buffer overflows. The number of vulnerabilites discovered in Java systems (for instance) were rather few, and tended to be for things like DOS attacks, not getting your whole system security compromised.

      Not that I think C is going anywhere, it is still going strong in Unix/LInux land and I like the fact that there are many different languages around. Just commenting on that particular sentence above. :-)

      --

      Being bitter is drinking poison and hoping someone else will die

    6. Re:Let it die! by Anonymous Coward · · Score: 0

      But why have a language that enables the possibility for careless and stupid programmers like myself to do overflows?

      Because you can't write a kernel or a device driver in a bytecode interpreted language which doesn't have pointers or tries to GC your memory.

      Besides which your argument is about as sane as "Why have sharp knifes that enables the possibility for careless and stupid idiots to hurt themselves?"

    7. Re:Let it die! by hughk · · Score: 1
      Sir, perhaps its the fact that we put the self destruct button next to the light button on our new combat vehicle that causes a large number of them to explode?" "Button proximity does not cause explosions! Careless operators cause explosions!!"
      Seen at a holiday residence (dasha) for US consulate staff in Russia - two adjacent switches. One turns on the lights, the other is the panic button summoning marines, the local police, etc. Neither switch is that distinctive. I hate to think how many times that particular button was pressed by accident.

      Back to the subject in hand. OOP is great and suprisingly enough, it can even be done in C. C++ is, after all, based on a C preprocessor. However, it slows things down which sometimes you don't want.

      --
      See my journal, I write things there
    8. Re:Let it die! by Anonymous Coward · · Score: 0

      C was not designed to hold your hand. It was to help you make programs.

      char *pChar;
      sprintf(pChar, "lalala");

      Is a VERY bad thing. Yes it is, but I *KNOW* this. I am supposed to! C is the tool by which I get things done. Its like the carpenter he *KNOWS* do not put your finger in the running router its a VERY bad thing.

      If you do not take the time to *KNOW* the tool you are using; I call you a lazy programmer and you deserve every memory overrun you get.

      As for Java having few vulins they used to say the same about Linux. Guess what? It was RIFE with them. How long before people start picking apart something that is by and large starting to be ignored in favor of other 'sandbox' type languages. You may not be ignoring it now. But remember Pascal was *THE* language to know just a few short years ago. Language fads come and go. The current one is the 'sandbox' type. Who knows what the next one will be. C is the only one that has sorta stuck. Sure it lets you bash your thumb with the hammer. But that hammer is also usefull for driving in nails. Right tool for the right job and all.

      Also your Sir, perhaps its the fact that we put the self destruct button next to the light button is rather one sided and trying to make C look bad. Yet you could design a bad interface on a java app also. If some of the web pages out there that I have seen is any indication. A bad design can sink you quick in *ANY* language. The best thing to remedy that is the thing holding apart your ears. Not any 'language'.

      How about I turn it around a bit. Have you ever created a variable accidently in one of these type mutable langs? How about changed types when you didn't want to? How about the garbage collector getting in the way? You see you have tradded one set of problems for another set. Right tool right job. If my app will never be on the net who CARES that it has potental buffer overflows in it?

    9. Re:Let it die! by Lux · · Score: 1

      Not flamebait at all, as a second year grad student whose research focuses on security, I think my position on the matter is pretty well-informed. Multics predates C, was an operating system, and had no known buffer overflow vulnerabilities.

      That's because it was written in a language that made them less likely to appear. Not impossible. Just less prone. Well-designed standard APIs for example. Imagine that.

      The way pointers and arrays are interchangable in C is pretty dangerous too. Makes it impossible for the compiler to do bounds checking. Why do you need retarded stuff like that for a low level language? Are all low level programmers just too lazy to cast properly? I hope not!

  28. To be sure, check Google News. by Futurepower(R) · · Score: 4, Funny


    However, you should check News.Google.com frequently in case the world ended and no one told you.

  29. It's Dead Jim by myownkidney · · Score: 2, Interesting
    Not it aint!

    I have never used, and will never use this bytecode languages running on VMs. I won't the minimum distance between my program and the machine instructions. Currently, C is the best language for this purpose.

    Unfortunately, a lot of CS courses are teaching people the importance of "managed code" and "strong typing" etc. I say to hell with that. If I feel like messing up with memory at AF345F12:BA231DCE then I shell do so. I don't want to hide behind "type safety". I know what I am doing.

    I have no faith in these OO language crap either. The real world maybe OO, but once your code is compiled, it is going to run us a sequence of statements: i.e., like an imperative language. Not to say that people have not tried to build processors which had OO machine code, but none of them caught on. I work mainly with the Intel architecture. It's not natively OO.

    Long live C

    1. Re:It's Dead Jim by mpmansell · · Score: 1

      I agree with much of what you say, but it is unfortunate that these feelings need to be tempered in light of the other programmers who may be around:)

      I am one of C's greatest fans and have even (in the dim distant past) gone as far as writing and using my own compilers. However, like most pwerful tools it has its hazards. While more modern systems are usually managed so that a stray pointer is less likely to destroy you hardware, when I started this was not the case. If this was the only threat, then C would still be a good, but arcane, language for general use. However, the advent of the internet has opened up a whole new area of risk that many of the current crop of programmers are just not qualified to handle with a reasonable degree of risk. While changing industry attitudes to put more emphasis on professional qualifications may help this, in the meantime the handholding that managed code provides can reduce the chances of many types of bugs occuring. (At the cost of speed and space - not very elegant to us old-timers).

      Not to put all the blame for needing "nanny languages" on inexperienced or poorly trained developers, Management is often at fault. Constant spec changes and reluctance to give proper proper provision for design, analysis and documentation leads to intemperate coding that breaks code security. Managed code allows their incompetence to slide past unaccounted ;)

      At a low level, I agree that OO is awkward, and that at many other levels, it can lead to ineffcient code, but even I am now beginning to see the value of OO for many applications. As with choosing C over another language, choosing OO over functional or procedural paradigms is a measured engineering descision. Hopefully made by engineers :)

    2. Re:It's Dead Jim by Anonymous Coward · · Score: 1, Insightful

      I won't the minimum distance between my program and the machine instructions. Currently, C is the best language for this purpose.
      Nope, assembly is the best langage for that purpose (i.e. 0 difference between your language and the machine instructions). Programming languages exist to abstract away from the details of the hardware. This allows you to write less buggy, more portable code that can be compiled to run efficiently on lots of different architectures. C code will never run efficiently on, say, a massively parallel computer, but Haskell code might because its semantics aren't tied to a particular machine model.

      Unfortunately, a lot of CS courses are teaching people the importance of "managed code" and "strong typing" etc. I say to hell with that. If I feel like messing up with memory at AF345F12:BA231DCE then I shell do so. I don't want to hide behind "type safety". I know what I am doing.
      Sure you do. It's a mistake to think that programming languages which have PDP-11 oriented semantics and weak typing are giving you more "power" or "control". Power comes from modular code and well-designed algorithms, and control comes from a language which supports these things by abstracting away from irrelavent hardware issues. Why should I have to think about pointers to iterate through an array? Why should I have to write my own buggy and inefficient memory management code when it could all be done by a finely tuned and heavily tested GC?

      C is not even the only language you can use for writing low-level code. Operating systems have been written in Lisp, for example. Nor is it the only language which compiles to efficient machine code: ML, Lisp, etc. can all run at comparable speeds.

    3. Re:It's Dead Jim by SpamJunkie · · Score: 1

      That's pretty funny, lol!

      I know what I am doing.

      I nearly bust a gut!

    4. Re:It's Dead Jim by LarsWestergren · · Score: 4, Insightful

      I have no faith in these OO language crap either. The real world maybe OO, but once your code is compiled, it is going to run us a sequence of statements: i.e., like an imperative language.

      Well, DUH. In the end its just ones and zeroes no matter what language you use. OO does not change the way computers operate much, it is a way to help programmers think about the problem domain in a way that hopefully is a bit easier for most of us. Jeez.

      If you don't like it because it cramps your "bursting with geek studliness" style, that's fine. But if you don't even understand what high level languages are for, I doubt you know what you are doing.

      --

      Being bitter is drinking poison and hoping someone else will die

    5. Re:It's Dead Jim by alex_tibbles · · Score: 0, Flamebait

      Regardless of your true intentions, I'm surprised that you havn't been modded troll of flamebait. (The speeling mistakes, the jingoism...)

      Then again, the content of the post will strike a cord with Slashdot arrogance.

    6. Re:It's Dead Jim by Anonymous Coward · · Score: 0

      Slashot moderating system

      Write absolutely meaningless rants on the virtues (existant or otherwise) of linux, and you get +5 Interesting/Insightful

      Write something that's perfectly true, valid, and relevant, but even slightly criticizes linux, and you get -1 Offtopic/Troll

    7. Re:It's Dead Jim by StarsAreAlsoFire · · Score: 1

      Screw that. If I'm going to fsck something up, I'm going to do it right: ASM for me baby.

      Actually, I really do write in ASM -- a few breeds, but mostly for the Motorola 68HC12. Have you ever actually looked at all the CRAP that C dumps down when you compile to ASM? Its bloody *PAINFUL* people! Even with a sweet compiler (which I don't get to use now that I have graduated and don't play in the university labs). Real men^H^H^H programmers write in ASM, then call their routines from C (or whatever). Or at least for real-time control systems.

      You must be the cocky bastard who wrote the code for my local ATM machine --- the one that had the Invalid Page Fault on the screen the last time I went to use it (and I mean THE LAST time!). Remember boys and girls: your account balance is NOT stored at an invalid memory address :~) (hmmmm... So, what would it take to cause a int underflow on an ATM machine? Think it'd work?)

      For reference, I write code in Java and ASM. Java rocks, although memory optimization can be a bit hairy when you have to do it (and you will... yes, yes, you will...), but it is lightyears better than debugging poorly documented ASM. If you think muses are hard to keep around, you should SEE all the documentation fairy carcasses around here -- floors just thick with 'em.

    8. Re:It's Dead Jim by slim · · Score: 1

      I have no faith in these OO language crap either. The real world maybe OO, but once your code is compiled, it is going to run us a sequence of statements: i.e., like an imperative language.

      The real world may be OO (the jury's out) but one of the first preconceptions I had to lose was that coding OO was about mapping the Real World to objects. If you look at Design Patterns or similar, you'll find many OO patterns that have no resemblance whatsoever to the way you might naturally try to represent reality.

    9. Re:It's Dead Jim by matfud · · Score: 1

      I have never understood why OO is taught to people as a good mapping of reality. (All those examples of Employers/Managers/Employees. Reality rarely falls into nice neat categories from which class heirarchies can (should) be derived. Reality is too messy and prone to change to warrent inheritence. Design patterns however are wonderful uses of inheritence, polymorphism, et al.

      matfud

  30. Embedded/Real-time systems still need C by aarondsouza · · Score: 4, Informative

    There are a huge number of applications that have very stringent time constraints, especially in real-time control. Other than coding in assembly, there isn't any other language out there that is as efficient (both size *and* speed count) as well optimized C code.

    As an example, our lab works with humanoid robots that run in a 5ms control loop, which means that the next command (computation of inverse dynamics, etc.) has to be ready in that timeslice. If you want to do fancier stuff like machine learning and AI, you'll have to squeeze in many more operations into that tiny window. Sure, additional processors are a plus, but you still need very fast and memory efficient code.

    --
    "In mathematics, it's not enough to read the words -- you have to hear the music"
    1. Re:Embedded/Real-time systems still need C by spongman · · Score: 2, Insightful
      there isn't any other language out there that is as efficient (both size *and* speed count) as well optimized C code
      Sure there is. C++ (with exceptions and RTTI disabled) is just as efficient as C [1], plus it's type-safe, has nested namespaces, classes & templates.

      [1] as long as you disable exceptions & RTTI and stay away from virtual/multiple inheritance & pointers to member functions.

    2. Re:Embedded/Real-time systems still need C by ipjohnson · · Score: 1

      So what your suggesting is using C++ like C and you'll get the same performance .... how interesting.

      Why not just use C in the first place (large set of experienced developers to draw upon)?

    3. Re:Embedded/Real-time systems still need C by WARM3CH · · Score: 2, Insightful

      Actually, in many scientific applications thanks to the templates you can have a very efficient code WITHOUT disabling exceptions, RTTI, ... and beat the pure C code simply because you could not write so much inline code that the inline expansion of all sorts of usage of all your template classes would result. In a simple tight loop with simple operations, calling simple function C may beat C++ but in a more complex application C++ can be faster.

    4. Re:Embedded/Real-time systems still need C by Anonymous Coward · · Score: 0

      Huh? Most apps don't need RTTI or exceptions and that was all he was really advocating not using. Templates, the ability to declare variables anywhere, public/protected/private, references, inner enums/structs/classes, and basic inheritance are all still available and are the bulk of what is useful and not 'bloated'. It seems from the 'C is everything' crowed, that if more of them learned C++ they would know this.

    5. Re:Embedded/Real-time systems still need C by be-fan · · Score: 1

      Well, there are a lot of performance-related things you can do in C++ that you cannot do in C. For example, you can have well-optimized generic containers. Generic containers in C are usually slow, because they're based on void-pointers and use function pointers as predicates. In contrast, templated containers compile to code specialized for each type, with predicates inlined. Unless you are willing to maintain seperate containers for each type in your code, it ends up being faster to use the templated containers in C++.

      --
      A deep unwavering belief is a sure sign you're missing something...
    6. Re:Embedded/Real-time systems still need C by spongman · · Score: 1
      because you get all the things I mentioned: type safety, abstraction & all the good things that go along with that.

      Sure, you could limit yourself to C developers, but I'd say that if you're capable of learning the good programming practices that the above features help you with, then you're capable of learning how to implement them in C++.

    7. Re:Embedded/Real-time systems still need C by Anonymous Coward · · Score: 0

      I heard about this. In fact, isn't there a web site with a bunch of C++ templates for numerical applications?

      Maybe you can explain to me: why does the addition of templates to C++ let the compiler optimize as well as as Fortran compiler? I heard that it has something to do with pointer aliasing, but I don't know what this is.

    8. Re:Embedded/Real-time systems still need C by Anonymous Coward · · Score: 0
      My gripes with C++:
      • You can grow old and die waiting for GCC to compile your C++ code. Why is GNU software so slow?
      • C++ is a moving target. It didn't _have_ namespaces until a few years ago. What spiffy, must-have feature will they add tomorrow?
      • Though you can make tight code with it, this requires using a different programming paradigm than what is usually taught. An example: compile the C and C++ code snippets in this Usenet post. I did. The C++ object code is -- I shit you not -- 10 times bigger than the C object code. Yeah, yeah, yeah -- memory is cheap...except in embedded systems which ship in million-unit quantities. Then every dollar matters.
      Regarding exceptions and RTTI: there was some discussion of this on one of the OS development forums. It seems there are no hard numbers here: everyone just knows (i.e. assumes) that RTTI and exceptions are slow and bloated. It would be a massive effort, but writing a small OS in C++ with and without these features would be very illuminating.

      I'm not going to say C++ is useless. In fact, I have a success story. I had some code that used floating point variables and was too slow on the target system (a 486SX). So I went through the code, changed all "float" and "double" to "fixed", dropped in a C++ 16:16 fixed-point class, et voila, a stunning increase in speed, with almost no changes to the original C code.

  31. C is Dead by WankersRevenge · · Score: 5, Funny

    I know. I killed him. I ran him down in my PHP-mobile while drag racing with those Ruby punks on their friggin crotch rockets. At least C++ had the sense to step out of the way. I guess they were arguing about how their half-witted brother C# knocked up his half witted twin sister, Java, and produced some hideous premature birth thingy who they called Mono. I would have turned around and hit C++ had I not blown a module and had to stop. Those Ruby punks gave me the bird, but you wait and see. I got this new Zend nitrus which knock the socks of those badboys but I don't know how plug it in. Anyone got the number of a good mechanic?

  32. Saying C will be killed by a runtime architecture by StevenMaurer · · Score: 4, Insightful

    ...is like saying too many busses will eliminate sports cars.

    The C design paradigm (low level, varied environment, highly optimized, developer control) is intended to solve an entirely different class of problem than Business runtimes (higher level, standard interface, managed resource, developer handholding). The two aren't in competition much at all.

    Nor do I think much about trying putting a racing-wheel on a bus either. We already have C# and "Managed C++", both which can look quite a bit like C, if you want them to. All you have to do is ignore that they're fundimentally different in the way they treat resources due to the underlying runtime or lack thereof. (Which is like equating a bus to a sports car, ignoring the size and speed issues.)

  33. Didn't RTFA but have some questions anyway :) by idiot900 · · Score: 2, Interesting

    Does this include *all* of C? How do they compile the following C features into VM bytecode?

    - Pointer arithmetic
    - Hardcoded type sizes instead of using sizeof() (i.e. assuming sizeof(int) == 4)
    - Lax rules for casting
    - And so on

    1. Re:Didn't RTFA but have some questions anyway :) by ncaHammer · · Score: 1

      IL code has all of them and you can enable them in C# in methods signed as unsafe.
      In many cases the unsafe mode C# "behaves" as inline C.

      http://msdn.microsoft.com/library/default.asp?url= /library/en-us/csref/html/vcwlkunsafecodetutorial. asp

    2. Re:Didn't RTFA but have some questions anyway :) by Gopal.V · · Score: 3, Informative

      Does this include *all* of C? How do they compile the following C features into VM bytecode?

      - Pointer arithmetic
      A: YES
      - Hardcoded type sizes instead of using sizeof() (i.e. assuming sizeof(int) == 4)
      A: WTF ? .. C never had that ... C never had a fixed size for integers ... anyway malloc(20) will work
      - Lax rules for casting
      A: YES .. had to work a lot to get those function pointers castable !!
      - And so on
      A: Hey, porting glibc ... remember

    3. Re:Didn't RTFA but have some questions anyway :) by 0x0d0a · · Score: 1

      I can give examples of how they *might* do it. I didn't RTFA either.

      * Pointer arithmetic

      Pointer arithmetic becomes an operation that calls a function that knows what chunks of memory were allocated and checks before mucking with it.

      * Hardcoded type sizes instead of using sizeof() (i.e. assuming sizeof(int) == 4).

      I don't see why there would be any problem doing this. This isn't correct C code, though, and hasn't ever been (that being said, C does not natively provide certain guarantees that people require for basic functionality, so I suspect most C code is somewhat broken WRT integer sizes).

      * Lax rules for casting

      Why would there be a problem? If pointer dereferences are checked, what's wrong with misinterpreting a float as an integer or visa versa?

  34. What about f77? by nate.sammons · · Score: 1

    When can I get an f77 to IDL compiler so I can watch an atmospheric simulator die on Windows? ;-)

    1. Re:What about f77? by blowdart · · Score: 1

      f95 do? Don't like that version? Try this instead.

  35. Does it work with MONO? by tgraupmann · · Score: 1

    So now you can write C code and it compiles for .NET. Does that mean it works for MONO as well?

    1. Re:Does it work with MONO? by Anonymous Coward · · Score: 1, Funny

      Should work ... but MONO thinks "C is dead" .. so might run into dead code elimination of the JIT.. ;-)

    2. Re:Does it work with MONO? by bizcoach · · Score: 1
      So now you can write C code and it compiles for .NET. Does that mean it works for MONO as well?

      The answer to your question is: yes, the compiled C code is truly portable and so it works not only with the "ilrun" runtime engine of DotGNU Portable.Net but also with Mono's runtime engine and with Microsoft's .NET runtime engine and with any other runtime engine that implements the standard.

      By the way, please don't think of DotGNU Portable.Net as something that merely "compiles for .NET"... the goal of our project is to compete with Microsoft's .NET platform and eventually render it obsolete similar to how GNU/Linux is currently rendering the proprietary Unix versions obsolete.

  36. Why C needs help by ttfkam · · Score: 5, Insightful
    The real question is this: would you rather program against the pitiful number API's that come with C#, or the huge Free Software diversity that you get with C?
    Or read a different way, would you rather program to a uniform API for GUIs that are accessible to many languages including C# or the huge Free Software diversity of GUI APIs that are all incompatible but still just make a button and a checkbox.

    Or we can look at it like this: "Wouldn't it be better to have many different toolkits that allow string concatenation and tokenization than one standard library of string functions?"

    Or maybe this: "Isn't it great that we have several different native APIs for threads, processes, and IPC depending on underlying platform, five different and incompatible implementations for cross-platform usage, and no way to easily switch between implementations after the project is underway?"

    And next shall we talk about databases? Or maybe sound processing? Or regular expressions? Hmmm...

    The thing that C zealots fail to recognize is the need for clean, standardized APIs (NOT implementations). If you write code that uses strncmp(...), aren't you glad that you don't have to worry if the C implementation is the BSD libc or glibc or MS Windows' C library? Don't you wish the same could be said for the user interface libraries -- for example being able to swap out the Qt or GTK+ implementations at compile or link time? Or the database libraries? (ODBC? Don't make me laugh.) But you can't because each implementation has its own interface even though a button is a button, a checkbox is a checkbox, a database connect is a database connect, a regexp is a regexp, etc.

    This is what .NET gives; Not the mandated implementation, but much better it gives the recommended interface. If the C folks get it together and standardize more than just things like printf(...) and linked lists, you will get no end of gratitude from me and the gratitude of folks who are tired of reinventing the wheel and solving problems that were adequately solved twenty years ago. Unless that happens, you're gonna see more and more people moving to things like .NET and Java, warts and all.

    POSIX was a good start, but it has stagnated and is showing its age.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re:Why C needs help by Brandybuck · · Score: 1

      Or read a different way, would you rather program to a uniform API for GUIs

      Not everything in the software world needs a GUI. Only end-user applications do. In the broad scheme of things, that's a pretty thin slice.

      --
      Don't blame me, I didn't vote for either of them!
    2. Re:Why C needs help by Temporal+Outcast · · Score: 2, Informative

      I agree with some of your points, but I will have to disagree on some.

      The thing that C zealots fail to recognize is the need for clean, standardized APIs (NOT implementations).

      Ahh, but this is where you are wrong. C was initially written to be used for writing an Operating System - something above Assembly but a little more sophisticated.

      The basic language needs to adhere to a standard ANSI C, or whatever - that is all. Which it does.

      Now all other frills and bells and whistles cannot really be blamed squarely on C - its like blaming MFC and OWL and STL for being non-standardized in C++. APIs are not platform independent, and hence how can the implementations be different?

      The thing is that, there is no real need for C in enterprise level applications until they have some kind of low-level interface.

      But I do realize that most of your points are valid, however am just offering my 2 cents.

      Just that when you use the wrong tool for the task, some problems are inevitable :)

      --

      Vote for a Man, Vote for Bush!
      Not a liberatarian flipflop hippie.
    3. Re:Why C needs help by Anonymous Coward · · Score: 2, Informative

      DotGNU Portable.NET has a C# compiler and a C# class library which can be called from managed C (and vice-versa). Managed C in pnet is the first step towards a _portable_ managed C++ (MS's managed C++ is completely unportable). DotGNU is all about Free(dom) Software for webservices and fighting against vendor-lockin traps. Portable.NET is DotGNU's way of providing reasonably easy migration away from MS.NET, by providing a compatible C# library and IL runtime system.

      As a GNU project, we also want to make it easy for existing Free(dom) Software to be used with the CLR (common language runtime). At the very least, our portable managed C makes calling out to native C libraries easier. Rhys worked some magic and now the type sizes and layouts match those for the platform it's on, so data marshalling is greatly simplified (i.e. there's no more need to write a C wrapper of the native libs just to write a C# binding to that wrapper for wrapping native libs... cut out the middle man ;).

      As hackers who have had to dig into every corner of the ECMA and MS C# apis in order to implement them, we are very familiar with just how much they suck (e.g. most of the MS api designers seem to be incapable of writing anything even remotely OO).

      By the way, there's absolutely nothing in the ECMA or MS apis related to sound. Rhys mentioned something about providing a portable sound api for managed code, though, not too long ago. He's probably got it on the back burner for now, but since he's a hacker god, it should come out great once he gets to it. ;)

      Rich

      P.S. That whole problem with lots of GUI apis seems to be addressed quite nicely, imo, by the Y Windowing System.

    4. Re:Why C needs help by humankind · · Score: 2, Interesting

      C gives you huge control over your operating environment, without obligatory overhead. This is a tremendous advantage in any scenario where you need stability and performance. Higher-level languages make you much more dependent upon the environment.

      I wrote a shopping cart application that uses 23K of RAM and processes more than $2M in transactions online a week. I can handle more than 300 times the traffic than a comparable Windows server with this application and it's rock solid. I don't worry about bugs in the API; I don't worry about stability issues. Things work the way they should.

      Then again, I get paid to get things done, not by the hour, so that's why I work with C.

    5. Re:Why C needs help by geminidomino · · Score: 1

      Then again, I get paid to get things done, not by the hour, so that's why I work with C.
      Just FYI, the above has been fed to my .SIGmonster. ;)

    6. Re:Why C needs help by slim · · Score: 1

      Not everything in the software world needs a GUI. Only end-user applications do. In the broad scheme of things, that's a pretty thin slice.

      The OP only used GUI APIs as an example. He went on to cite sound APIs, data structure APIs, yada yada yada.

      I'm no great fan of Java, but I do like the way that there is One True API for most things I might want to do.

    7. Re:Why C needs help by Haeleth · · Score: 1

      I'm no great fan of Java, but I do like the way that there is One True API for most things I might want to do.

      So in the case of Java GUIs, is the One True API Swing or SWT? In case you forgot, there's still an ongoing holy war on that one.

      What about .NET GUIs? What's the One True API there, System.Windows.Forms or GTK#? Hmm... looks like Microsoft .NET and DotGNU only support System.Windows.Forms, while the Mono project is advocating GTK#...

    8. Re:Why C needs help by master_p · · Score: 1

      Amen, brother. A programming language is so successful as its libraries are. That's why Java is slowly taking over.

    9. Re:Why C needs help by Guardian+of+Terra · · Score: 0

      gtk# build scripts are not pnet compiler-friendly, but compiled gkt# libs work with DotGNU just fine. And DotGNU portable System.Windows.Forms works fine with mono - there might be package soon.

    10. Re:Why C needs help by slim · · Score: 1

      (Me)
      I'm no great fan of Java, but I do like the way that there is One True API for most things I might want to do.

      (Haeleth)
      So in the case of Java GUIs, is the One True API Swing or SWT? In case you forgot, there's still an ongoing holy war on that one.

      Ah, touche.

      I'm going to weasel out of that one by not including GUIS in the set of things that I might want to do: myself being the kind of person who runs away from client side programming and towards servers wherever I can.

      Yeah, Java has exceptions to the rule, but in most cases a standard is being settled on... and even for GUIs, Two True APIs, while not as good as One True API, is a better situation than "several dozen APIS: pick one".

      This presupposes that the APIs are any good. I'm not a GUI programmer, but people in general seem happy with either Swing or SWT.

    11. Re:Why C needs help by 0x0d0a · · Score: 1

      You know, while I *vastly* prefer to use C-based applications over Java-based ones, I have to say that your example is one of the ones where I would consider Java before C.

      You have an application that is presumably a custom job. Developer time is expensive and resource usage is cheap on custom or vertical market jobs. Furthermore, Java does a better job of providing built-in safety checks, and your application deals with money.

    12. Re:Why C needs help by aled · · Score: 1

      Yeah, with Java we have the best of both worlds:
      a pitiful number of APIs AND huge Free Software diversity (check Sourceforge).
      For pitiful I mean I feel pity for those who doesn't have a full featured library as Java has.

      --

      "I think this line is mostly filler"
    13. Re:Why C needs help by zoglmannk · · Score: 1

      I agree. Most of my professional work has been with Java. I think those are the same reasons that people flock to Java--the clear and consise documentation, and extensive *standard* API that comes with any Java installation. People might complain that the standard JRE installation is getting relatively HUGE, but that is a good thing. For example, the more that is *standard* the less I have to worry about looking at code that uses three different regular expression packages!

      And in deploying applications, its great if you don't have to worry about class path's to additional JARs.

      Rant following:
      Who ever came up with the extensions directory needs to be shot. On occasion we have had difficulty tracking down particularily hard bugs because multiple versions of a package were stuck in the extensions directory. And there was a need for both versions, but someone failed to realize that there was already one in the extensions directory. We have found out the hard way that you cannot expect different OS JVM's to load in extension JARs in the same order from platform to platform. The solution is simple, simply move both jars out of the extensions directory and add the needed jar to the classpath of the application/utility.

      To further deal with startup mess (executable JARs do not go far enough) for multiple OSs I have written an ingenous startup script. If you want a copy of it, just email me. :)

    14. Re:Why C needs help by ttfkam · · Score: 1
      People might complain that the standard JRE installation is getting relatively HUGE, but that is a good thing.

      A lot of folks make this claim and yet conveniently forget that Qt/GTK+, ALSA/OSS, ODBC, et al. take up space too. In fact, considering the fact that Qt and GTK+, ALSA and OSS, etc. must all be installed because programs are being written specifically for them instead of a common API and pluggable implementation, it's actually less space to install a JRE.

      This is not to say that I think Java couldn't be more modular. I'd welcome some separation like a network module and a sound module (or all in one go like it is now). But, warts and all, Java is at least moving in the right direction. C, on the other hand, isn't moving at all.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    15. Re:Why C needs help by ttfkam · · Score: 1

      No, the STL *is* standardized. ISO C++98. There's a difference between a lack of a standard and incomplete implementations.

      If I use std::string or std::vector in my code, it compiles and it works no matter the implementation. You are confusing warts with fundamental deficiencies.

      MFC and OWL? Yes, they are a problem. I sure wish C++ would come up with a standard GUI API and let others plug in their own implementation. <sarcasm>Oh wait! That was the point of my original rant, wasn't it?</sarcasm>

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    16. Re:Why C needs help by Brandybuck · · Score: 1

      I'm no great fan of Java, but I do like the way that there is One True API for most things I might want to do.

      In the case of .NET, I greatly fear that this "One True API" will be "Microsoft" only.

      --
      Don't blame me, I didn't vote for either of them!
    17. Re:Why C needs help by Nevyn · · Score: 1
      If I use std::string or std::vector in my code, it compiles and it works no matter the implementation. You are confusing warts with fundamental deficiencies.

      Well unless you use .data() instead of .cstr() where NT/Solaris use the same implementation for both and libstdc++ doesn't ... or you want to use <strstream.h> er I mean <strstream> ... errr I mean <stringstream>

      Put another way I would class it as fundamentally deficient that C++ only got it's first std. in 1999 and the first time you could get something that comes close to a std. c++ implementation is within the last few months.

      --
      ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
    18. Re:Why C needs help by humankind · · Score: 1

      You have an application that is presumably a custom job.

      bzzzt. You presume wrong. I have one application handling almost a thousand different clients. One core set of code to maintain, designed for an ideal balance between flexibility and stability.

      ASSumed safety checks, a supposed "advantage" of Java is a fucking crutch that's only useful to second rate programmers. A good programmer wouldn't assume that Java covers his ass any more than ANY other development environment.

      Best of all, I maintain one set of code that I know i can count on. I don't have to worry about Java and the conflict between Microsoft and Sun affecting my business.

      Piece of mind: priceless

  37. Miguel de Icaza by rixstep · · Score: 1, Troll

    Miguel de Icaza - this person is annoying. Many people write to me and tell me they suspect he is a Microsoft mole. Whatever: he's the guy who said Clippy is a good idea. Go figure.

    What the world has right now is the following:

    1. Native assembler. This is always a fall-back.
    2. C. Great for writing operating systems. Capable of inline assembler as well, so efficiency is very high.
    3. C++. I have my doubts. And I think its prevalence would not be as great were it not traditionally so difficult to use the next language on the list.
    4. Objective-C. What Alan Kay always envisioned, but in compiled form. As long as we are using GUIs with widgets and gadgets, this will be the premier choice.
    5. Java. Not native, but eminently portable.

    In the context of the above, I am sorry, but .NET is totally uninteresting, Mono is even more uninteresting, C# is an abomination, and Miguel de Icaza is totally irrelevant.

    Thompson, Ritchie, Cox, Gosling - these are great computer scientists. de Icaza is a fart.

    1. Re:Miguel de Icaza by Anonymous Coward · · Score: 0
      Not to mention Dijkstra :-)


      C# and the CLR might seem awesome on the surface, but for real programming (i.e. not lowly application programming) they are nothing but a wetfart. Not to mention the fact, that CLR does not support 1'st class programming languages.
      (if you don't know what a 1st class language is, go register for any basic computer science course at your local university).

    2. Re:Miguel de Icaza by Teh_monkeyCode · · Score: 1

      Does no one RTFA? Miguel is talking about C in applications, no for operating systems. and are you calling the creator of GNOME and CIO of Ximian a microsoft mole?

      --
      -------
      Chunky Bacon
    3. Re:Miguel de Icaza by Anonymous Coward · · Score: 0

      Although my opinions on De Icaza are not unlike your own (for various reasons, I have a very low opinion of him), I can't agree with you on your opinion of C#. It's a nice language, with some features I really wish Java had. While many parts of the MS.NET apis are unportable, and the runtime is windows only, the actual bytecode is just as portable as jvm bytecode and IL has some nice features the jvm bytecode lacks. Just because part of the system is unportable (what do you expect from MS?) doesn't mean the whole thing is unportable.

      Mono may not support anywhere near as many architectures as Java, but THIS THREAD IS NOT ABOUT MONO (or De Icaza). Rhys Weatherly is the creator and lead developer of DotGNU Portable.NET. Portable.NET existed well before Mono was even concieved of, is _the_ GNU project's response to the .NET development tools, and is (as the name suggests) _very portable_. DotGNU Portable.NET works on all the Gentoo and Debian supported architectures (yes, it even runs on the Hurd, although w/o threading support). It works on Mac OS X and the *BSDs and on iPaqs and Playstations and Windows (both cygwin and mingw). It is very portable, and, aside from the fact that he seems to hate it along with anyone involved with it, it has nothing to do with Miguel De Icaza, so feel free to use and contribute to it.

      FYI, DotGNU Portable.NET provides a portable compatible runtime and library so _migration away from MS.NET_ is reasonably easy.

      Rich

      P.S. Read through some of Rhys' code... you might want to add him to your list of great computer scientists.

  38. language bindings Re:KDE, language support by aaron_pet · · Score: 3, Informative

    There are python bindings for kde, as well as many others.

    --
    Please use [ informative / summarizing ] SUBJECT LINES
    Flame me here
  39. Pointless by NigelJohnstone · · Score: 1

    You could compile it to machine code and run it native, or you could compile it into any number of intermediate languages and run it with an interpreter.

    Why would you do the latter? For what advantage?

    C isn't dead, C++ isn't dying. .NET is the systems thats really stuggling.

    1. Re:Pointless by spongman · · Score: 1
      the point is that when you compile it to native code you instantly remove the portability of the original source. in order to run on a different machine you need to recompile. with a portable bytecode (like java/.net) you only need to compile once.

      also, there's no interpreter, the JIT compiler is effectively the same as the second stage of a regular compiler, the main difference is that it runs in the same process as your program, it's the only non-portable binary in the equation.

    2. Re:Pointless by NigelJohnstone · · Score: 0, Troll

      .NET makes no portablility claim, its a Windows product.

      The only reason any claim at all for .NET portability can be made is because of Mono. and thats not even a Microsoft project. Also it uses the emulator libs anyway to handle the Windows specific messages.

  40. FUD again from MS zeelots ! by Anonymous Coward · · Score: 1, Interesting

    C# is nothing more that Java language and .net is nothingmore than Java platform. That's fact.

    Did Java kill C since nearly a decade it is here ? No ! So there is no doubt that a windows only platform (.net) can kill a multiplatform language !

    If there is a platform that has deprecate C/C++ in lots of enterprise developpment it is more Java itself. Ey guys, look at the realworld !

    Java has replace lots C/C++ developement just because it is much easier to setup and to maintain with an "average" skill (you got plenty of free & free solutions as well as bullet proofed comercial solutions that fits every needs).

    Java is also the key to open the server side OS. Because by choosing Java enterprise can shift to any supported OS they want depending on their TCO for instance. And there Linux win in most situations here !

    So Java offer OS choice and Linux OS solution ;-)

    Personally, i've worked with .net on projects and i am realy surprised by /. post that claim "portability" to other OS ! MS has clearly put this point in front of the world : .net will only be available on MS OSes. This means that the complete specifications will never be available. Hence you can never claim to be "compatible" with it as you can not raise your complience level to one that enterprise require for support reasons.

    I do not realy understand people working on mono (which is a nonsense by the way), why don't they go and help FSF's classpath project instead if they want a realy free implementation of some advanced language & VM ? Ey, FSF ! Know those guy ;-)

    So if you want to help Linux to get a truly independent, full GPLed & fully compatible solution : Go and help FSF's CLASSPATH PROJECT ! They do need your skills !

    1. Re:FUD again from MS zeelots ! by Anonymous Coward · · Score: 0

      Actually, this is the work of DotGNU Portable.NET. You'll notice DotGNU is right up there by Classpath on gnu.org's project list. DotGNU is the GNU project's answer to the need for Free(dom) Software for webservices, and that includes java support. We've actually had some recent contact with one of the Classpath hackers (hopefully it'll lead somewhere cool). Also, our C# library has the same license as GNU Classpath (GPL+linking exception).

      Our compiler can compile C# to jvm bytecodes already, and we've had other java support goals on our TODO lists. Gopal started on a Java frontend for the compiler, but has been busy with work... volunteers are welcome to take it up. We've had java class file and jar loading for a long while now, but no one has had the time (there's only a handful of us) to work on writing the bytecode verifier and CVMCoder (glue for jvm->converted virtual machine).

      The CVM is part of the reason why the pnet runtime is so fast even though we don't have a JIT yet (another thing you could volunteer to help us with :). We do have native code unrollers which are capable of everything a JIT can, minus the trampolines, but which can be developed incrementally. You could volunteer to implement more of the CVM opcodes in assembly for your processor.

      Rich

      P.S. The (C) for all my work on pnet is assigned to the FSF, so, yes, I know those guys. :)

  41. Please stop C++ calling portable by Fuzuli · · Score: 5, Insightful

    Please don't. Yes C++ as a language has compilers for many platforms which are pretty much compatible, but the degree of compatibility of these compilers don't mean much since the compatibility of an application is a totally different story. An application written in C++ will be using some kind of library, for DB access, for GUI, for network operations etc... Most of the times, these libraries are not cross platform. Or they have to be extended with platform spesific code. It has been discussed in /. many times, check it out yourself. Cross platform GUI, cross platform libraries, and there is almost always a catch in all the solutions.
    The story may change if you are writing C++ code that can stay in some kind of boundy, without using much library code, but unfortunately, i did not have that chance.
    IMHO, java is really successfull in cross platform software development, without much work i can make java software work on another platform.
    If C# had the same future, i'd be really glad, since i like it too, but as Microsoft works harder and harder on .NET i just don't believe MONO guys can keep up with it. C# 2.0 and longhorn will be a huge step forward for .NET technologies, and i don't thinkk MONO team can find resources to keep up with MS.
    Don't get me wrong, i loved the work they've done, but the result will be a platform inferior to java 1.5 and .NET.
    So i'll be using C++ for platform spesific, high performance apps, C# for windows apps that require rapid development, and JAVA for cross platform. That's my 2 cents...

    1. Re:Please stop C++ calling portable by hiss · · Score: 1

      QT is C++ and is a pretty good x-platform library. I do recall Pixar considers it so important to their company they almost consider it a trade secrete.

    2. Re:Please stop C++ calling portable by TheRoachMan · · Score: 1

      "IMHO, java is really successfull in cross platform software development, without much work i can make java software work on another platform."

      Well...DUH! the whole idea behind Java is EXACTLY that: one language, many platforms. .NET's motto on the other hand is: many languages, one platform (Windows). Which is fine too.

      You sound like you're surprised about the portability of Java, while it's actually one of it's key features!

    3. Re:Please stop C++ calling portable by Fuzuli · · Score: 1

      To be honest, i am surprised that it can "actually" provide what it promises. I've always worked with MS stuff, so it should be no surprise, that i'm surprised :)
      Of course there are minor problems, but compared to C++, it feels like heaven.

    4. Re:Please stop C++ calling portable by Fuzuli · · Score: 1

      The quality,and performance is great, but i for commercial apps, the licencing fees are too high. On the other hand, using Netbeans / Eclipse and java, i get cross platform for free (as in beer) . IF you have the money, QT is really nice..

    5. Re:Please stop C++ calling portable by tftp · · Score: 2, Interesting

      Qt (commercial license) costs something like $1500 per developer, once in a lifetime. The same developer herself costs you $2000 weekly. Now consider developer's performance increase, and it appears that a good library pays for itself within a week or two!

    6. Re:Please stop C++ calling portable by Anonymous Coward · · Score: 0

      I'm not too worried about Mono keeping up - the mono guys are on the ECMA standardization group for .NET 2.0, just like HP and Intel, and they already have a head start on whats going down.

    7. Re:Please stop C++ calling portable by WARM3CH · · Score: 2, Insightful

      C++ as a programming language is perfectly portable. Now, you may write programs that depend on certain feature of the platform (like many libraries out there) that make them not portable. Surprizingly, Java is very poor when it comes to portabilities. How many of you know of Java programs running on other platforms other than the Java VM?!! The point is in the Java model, you actually port the whole platform to run on top of a different one, not the just the Java complier alone. So portability in C++ is in language level but for Java is in platform level.

    8. Re:Please stop C++ calling portable by eelke_klein · · Score: 0

      Java programs ain't portable in the true sence of the word. Java programs run on a virtual machine which is just a nice word for an emulator.

      Ofcourse you are right about C++, there are many problems when trying to keep your program portable. However I have for example done some OpenGL graphics portable between Linux and Windows by using the SDL library for graphics and user input and libpng for texture loading. So its just a case of choosing the right libs.

    9. Re:Please stop C++ calling portable by gauchopuro · · Score: 1
      C++ as a programming language is perfectly portable

      In theory, yes, but in practice, no. Quick, what happens if new fails? Does it return 0, or throw an exception? Well, it depends on your compiler.

      The C++ standard is not supported by all C++ compilers; support is getting better, but it is not 100%. The October 2003 issue of Dr. Dobbs Journal included a C++ compiler comparison. Each compiler tested supported a different set of features. Many times, these are small differences, but since computers lack common sense, these differences become major stumbling blocks.

      The inconsistency in C++ prompted the ACE designers to write a C++ compatibility layer that smooths out the differences in C++ compilers. If the C++ language were truly portable, this work would have been unnecessary.

    10. Re:Please stop C++ calling portable by ALLXSTHINGS · · Score: 2, Funny

      Silly, your program will never call portable() unless you tell it to.

    11. Re:Please stop C++ calling portable by Anonymous Coward · · Score: 0

      I think Mono 1.0 will be superior to Java 1.5. Sun is kludging up java now instead of really expanding it. For example generics are just syntatic sugar in java while they are truly typeable in C#. For Sun to really improve upon java they would have to tear down the jvm and redo everything. I don't think it will happen.

  42. Not that simple by xswl0931 · · Score: 4, Insightful

    Of course you'd also have to disassembly every library MSOffice uses and every library those libraries use which includes the NT kernel. So by the time you're done, you'd be running Windows in a JVM just to run MS Office.

    1. Re:Not that simple by Tumbleweed · · Score: 4, Funny

      Hey, that might just speed up MS Word enough to be usable! :)

      (it's a _joke_, laugh!)

    2. Re:Not that simple by WARM3CH · · Score: 2, Interesting

      Not really funny. Guess you've never tried to compare the performance of Ms Word and Open Office on the same machine...

  43. Virtual punchcards are like virtual brains by John+Courtland · · Score: 0, Redundant

    I hated MVS. I hated COBOL. I hated ASSIST. I most DEFINITELY hated JCL. All due to the restrictions from those damn virtual punch cards. Column 8 my ass.

    --
    Slashdot is proof that Sturgeon's Law applies to mankind.
  44. run! run! run! by wash23 · · Score: 0, Flamebait

    It's all just a horrible conspiracy to gradually shift hardware and software towards a centrally controlled, inaccessible quagmire of unbreakable digital rights management and spyware! run for your lives!

    1. Re:run! run! run! by wash23 · · Score: 1

      Actually not flamebait, was meant mostly as a joke (with a tinge of relatively legitimate paranoia- bytecode and VMs.. bah).

  45. Re:C is Dead by AresTheImpaler · · Score: 1

    man.. I'm so sorry, it seems you are going to Malbolge

  46. No pointer operations for JVM by Gopal.V · · Score: 2, Informative

    JVM doesn't have any pointer operations ... IL does .
    Which means you get a set of pointers which play nice ...

  47. I would take C++ over Java/C# anytime by iamacat · · Score: 5, Informative

    ... if I had an equivalent set of class libraries. Haven't actually seen one for C++, but Cocoa for Objective C is pretty good and there is an ObjC++ compiler.

    The way I see it, the benefit of garbage collection is nearly canceled by the lack of stack variables and guaranteed destructor calls. I want to just declare a "Socket" variable in the middle of my function and have a guarantee that the socket will be closed when the block is existed in whatever way. finally or with just don't cut it. Say, I use 2 sockets, 1 file, a mutex and a temporary hash table entry at different points in a function. Imagine the mess of nested blocks, especially since Socket.close can actually throw an exception!

    By contrast, memory management problems in C++ can be mitigated by destructors, reference counting and containers that automatically free members. Not ideal, but usually doesn't disfigure your code.

    Now add other things missing from Java and/or C# - preprocessor, templates, multiple inheritence, operator overloading, unsigned types - and the new languages are really not that compeling for large projects that need heavy-duty, "dirty" features to manage complexity and can afford a regression suite that runs under Purify to fix memory corruption or leaks.

    I know Java 1.5 has generics and C# has some more of C++ features compared to Java, but the matter of fact is that both languages are still tradeoffs compared to C++ in terms of productivity and stability rather than a clear step forward.

    I would like to see a language that preserves as many features of C++ as possible while adding garbage collection, memory safety, language-based security and guaranteed binary compatibility between platforms/OSes. I don't think managed C++ is "it". Why can't a VM support multiple inheritence? Any pointers?

    1. Re:I would take C++ over Java/C# anytime by Lord+Omlette · · Score: 1

      Look up the using statement when you're in C#.

      --
      [o]_O
    2. Re:I would take C++ over Java/C# anytime by Anonymous Coward · · Score: 0

      www.boost.org

    3. Re:I would take C++ over Java/C# anytime by Imperator · · Score: 1
      The way I see it, the benefit of garbage collection is nearly canceled by the lack of stack variables and guaranteed destructor calls. I want to just declare a "Socket" variable in the middle of my function and have a guarantee that the socket will be closed when the block is existed in whatever way. finally or with just don't cut it. Say, I use 2 sockets, 1 file, a mutex and a temporary hash table entry at different points in a function. Imagine the mess of nested blocks, especially since Socket.close can actually throw an exception!

      You've got the answer in there; you just need to sort it out. :) See, any object whose destructor is needed for more than memory deallocation can probably throw an exception. If the language supports mandatory catching of exceptions (i.e. Java), it's kinda hard to automatically call the destructor at end of scope, because if that scope is a function there's no way to catch the exception. The Java idiom is something like try { socket.close() } catch [...] . Since you have to catch exceptions out of .close()-style destructors, you have to call them explicitly. Yes, that means using finally blocks sometimes, and it can get messy. Where this idiom really fails is when you're writing non-robust programs and you'd rather have an exception fall all the way through than have to catch it.

      --

      Gates' Law: Every 18 months, the speed of software halves.
    4. Re:I would take C++ over Java/C# anytime by master_p · · Score: 1

      Why can't a VM support multiple inheritence? Any pointers?

      It depends on what a VM can do. A simple VM is more like an imaginary CPU emulator, and can happilly support anything that is thrown at it. A complex VM like the Java one that can reload classes on the fly is much more complex. Since multiple-inheritance is not used very much and it is complex to manage in a run-time environment, their decision was correct. This enabled many developers to do java VMs.

      It's true that C++ has a lot of tricks, and RAII is up there with the best ones. What C++ looses with memory leaks Java looses with resource leaks: people forget to close files, forget to nullify references so as that the garbage collector recycles memory, etc.

      It would be best if we could move on from procedural/imperative/object-oriented/functional languages to a language based on logic that can be used to prove program goals. As it is right now, an imperative program can't be proven if it ends or generally if does the expected thing. A different approach to languages maybe is needed: one that does not let the program compile successfully if there are logic errors.

    5. Re:I would take C++ over Java/C# anytime by javatips · · Score: 1

      The way I see it, the benefit of garbage collection is nearly canceled by the lack of stack variables and guaranteed destructor calls. I want to just declare a "Socket" variable in the middle of my function and have a guarantee that the socket will be closed when the block is existed in whatever way. finally or with just don't cut it. Say, I use 2 sockets, 1 file, a mutex and a temporary hash table entry at different points in a function. Imagine the mess of nested blocks, especially since Socket.close can actually throw an exception!

      You can easily solve this problem by using Aspect Oriented Programming (AOP). The nice thing about AOP, is that you can solve this kind of problem in a reusable and modular way. This allow you to write cleaner and less buggy code.

    6. Re:I would take C++ over Java/C# anytime by 0x0d0a · · Score: 1

      I've taken a look at aspect-oriented programming, and I've come to the conclusion that it will not catch on all over unless the current programming model radically changes.

      The problem with aspect-oriented programming is that it can be very difficult to determine where code is located in your source tree that is causing a particular effect that you're observing at runtime. With a procedural language (and barring extensive use of, say, function pointers), it's generally a fairly straightforward task to locate what code is being run that's causing something to break when you perform operation X.

      This can admittedly be solved -- as long as one uses an intelligent IDE that can tell you what code affects what code at runtime when you're poking through source.

      The problem is that doing this requires everyone adopting a particular IDE (maybe an extended Eclipse) for effective use.

      The programming model that dates back to the earliest compilable programming systems is that you produce text in an ordinary text-editing program, and then compile it. You don't need a special program to work with your project.

      It doesn't mean that such a move can't be made, but I do think that AOP will not catch on in general until a move like everyone starting to use Eclipse for software development happens.

    7. Re:I would take C++ over Java/C# anytime by 0x0d0a · · Score: 1

      It would be best if we could move on from procedural/imperative/object-oriented/functional languages to a language based on logic that can be used to prove program goals.

      I've thought about this, and pretty much decided that there isn't a really feasible way of doing this. Setting a bunch of assertions and letting the compiler "do the right thing" is, I think, an attractive but ephemeral dream. Why?

      Think about what you'd do when, say, sorting a linked list. In a traditional language, you'd shove some pointers around. In a constraint-based language, you'd say something like "after this point, I want this assertion to hold -- for all nodes N1, N2 such that N2=N1->next->next...->next, N2->data <= N1-data". The compiler figures out some sort of efficient way to do up the code. The problem is, you've already imposed a data structure on the compiler, which might not be the right one. What if you want to remove an element from the list? You can do "after this point, I want this assertion to hold -- for all nodes N1 such that N1=head->next->next...>next, N1->data != 3; Then you realize that you just removed an employee from the list before assigning him his final paycheck -- you made a higher-level logic error.

      Short of producing a full-blown humanlike AI that guesses and lets you refine, where you can say "Give me a word processor", "Okay, add a spellchecker to it", "Okay, make the menu item to invoke the spellchecker be under the Edit menu from under the File menu, where you dumped it", I don't think it's really feasible to go for really high-level languages -- you just don't get the benefits you think you do.

    8. Re:I would take C++ over Java/C# anytime by javatips · · Score: 1

      As you said, it can be solved... It can be solved at the IDE level as you said (AspectJ with the AJDT in Eclipse is a good example - it provides hints for every line of code that is a selected pointcut).

      But it can also be solved using AOP... You can easily add trace to an existing application (and your aspects advices will be traced too) so can can see the exact path your application is taking.

      Another way of know what happen, is to use a debugger!

      The main problem with AOP is not editing code and finding problems (we have the same issue with debugging J2EE applications with all the glue code that is generated by application server). The problem is more on how systems are build. We (software architects) are facing the same learning curve they faced years ago when doing the switch between procedural programming and object oriented programming. That's the hard part! Yes it's going to take years before it really catches on, but the benefits on using this new paradigm are the same we had years ago when using the new object oriented paradigm.

    9. Re:I would take C++ over Java/C# anytime by master_p · · Score: 1

      I've thought about this, and pretty much decided that there isn't a really feasible way of doing this. Setting a bunch of assertions and letting the compiler "do the right thing" is, I think, an attractive but ephemeral dream. Why?

      I am not talking about doing it the imperative way, then add a bunch of assertions to prove the code. This is the exhaustive way of thinking, and tools already exist for such proofing (the B-tool, for example). I am talking about a completely new way of programming, equivalent in result to imperative programming, but also proovable.

      It may not be possible, but has anyone thought about it? proved that it can't or can be done? is there a mathematical theorem that backs up such claim? It would be a shame that such a solution exists, yet no one has discovered it yet.

    10. Re:I would take C++ over Java/C# anytime by 0x0d0a · · Score: 1

      I can't understand what your proposal is, unless you have a very vague concept of where you're going. How are you suggesting one interface with the compiler, describe your requirements? My issue is that it seems that no matter what you do, you're going to be bringing some set of constraints (potentially incorrect) into the ballgame.

      As for provability -- CMU has research on proof-carrying Java code, where there are certain things proved about the code. I can also tell you that it is not possible to prove arbitrary things about any piece of code, or you'd have solved the halting problem -- "Will this program get stuck or not?"

    11. Re:I would take C++ over Java/C# anytime by IncohereD · · Score: 1

      I am talking about a completely new way of programming, equivalent in result to imperative programming, but also proovable.

      It may not be possible, but has anyone thought about it? proved that it can't or can be done?


      Think about what you just said. Has anyone proved that you can prove a program? Do you understand the recursion there? That's why this problem is so hard, and why it's such an extensively researched topic. In general any tool you use to prove the correctness of a program has to be at least as powerful as the compiler/code you're proving, and therefore just as complicated to prove. Game over.

    12. Re:I would take C++ over Java/C# anytime by Caine · · Score: 2, Informative
      The way I see it, the benefit of garbage collection is nearly canceled by the lack of stack variables and guaranteed destructor calls.

      In both languages you can force a garbage collection of an object, and also specify code to be run att finalization.

      By contrast, memory management problems in C++ can be mitigated by destructors, reference counting and containers that automatically free members. Not ideal, but usually doesn't disfigure your code.

      Are you kidding me? Ugly hacks like refcounting doesn't make your code ugly? Heh, yeah, sure.

      Now add other things missing from Java and/or C# - preprocessor, templates, multiple inheritence, operator overloading, unsigned types - and the new languages are really not that compeling for large projects that need heavy-duty, "dirty" features to manage complexity and can afford a regression suite that runs under Purify to fix memory corruption or leaks.

      Seriously, do you have any clue what you're talking about? The need for preprocessor and templates are some of the largest faults with C++, introduced to try to keep backwards-compatability with C. A real OO-language as Java or C# doesn't need for example templates since all objects inherit Object as they should. They also both have usigned types. Multiple inheritance is usually seen as A Really Bad Idea and should be done with interfaces.

      To conclude, you're a moron.

    13. Re:I would take C++ over Java/C# anytime by deadlinegrunt · · Score: 1

      Seriously, do you have any clue what you're talking about? The need for preprocessor and templates are some of the largest faults with C++, introduced to try to keep backwards-compatability with C.
      Just preprocessor. C didn't have templates. And if it weren't for backwards compatbility, which by the new standard doesn't appear to be a feasible goal anyway, Bjarne would have gladly removed the preprocessor altogether.

      A real OO-language as Java or C# doesn't need for example templates since all objects inherit Object as they should.
      From a purely Object Oriented perspective I have no problems with this statement at all. However that was not the goal of C++ to be a true object oriented programming language. Its goals were to have built in support for such expressive concepts. (This isn't a debate on whether it was acheived or not, syntacticly or otherwise) One could argue that templates in and of themselves are not necessary for OOP anyway, especially considering this statement from your viewpoint. An interesting note, from a C++ perspective, is that templates were not designed to facillitate OOP but to improve modular code, whether it is object oriented or procedural.

      They also both have usigned types.
      I will be honest, I don't comprehend this statment and its weight in your comment. My apologies for being so daft.

      Multiple inheritance is usually seen as A Really Bad Idea and should be done with interfaces.
      Much like the true problem with OOP this all boils down to the person viewing it and their interpretation. Ask 10 people to describe an apple, you'll get 10 different responses. Since this is subjective and worthy of a USENET trolling, I'll leave it at this. For the interest of "debating" you and giving you my full respect I will concede I hear and understand where your vantage point comes from as I see the pros & cons of each camp. I would like to point out my appreciation for how you qualified this statement with the word usually and because of that I am in no means labelling you a troll.


      To conclude, you're a moron.

      That's a harsh conclusion. I could argue that you are an OOP zealot based on the fact that you seem to critize non-[true]OOP langauges leaving one to conclude that OOP is The Only Way. Based on that observation anything you have a stance on, from a zealot perspective, is now null as those who have an unwaivering vantage point of an idea are no longer "thinking" anymore to be taken seriously. I think that's a harsh conclusion for me to come to so instead I will write that off as "fence posting a.k.a. off by one" error since the majority of your post does seem intelligent.

      --
      BSD is designed. Linux is grown. C++ libs
    14. Re:I would take C++ over Java/C# anytime by iamacat · · Score: 1

      How does it reduce the number of nested blocks compared to Java "finally"? :-)

    15. Re:I would take C++ over Java/C# anytime by iamacat · · Score: 1

      And what exactly am I supposed to do in catch [...]? If you can not do anything else with an object, you better be able to at least get rid of it. Errors can go to some log file or class static variable that can be examined from time to time.

      By the way, Java doesn't address the problem any better than C++. If you don't explicitely close the socket, the exception will be thrown in finalizer thread. On the other hand, in C++ you can define an explicit close method if you wish and even add assert(isClosed) in the actual destructor to enforce use.

    16. Re:I would take C++ over Java/C# anytime by Kupek · · Score: 1

      Templates were not introduced for backwards-compatability with C. They were introduced because they are a type safe way to do generic programming. Relying soley on polymorphism for generic programming has two disadvantages: you sacrifice type safety and you sacrifice performance. Sometimes those issues don't matter. Sometimes they do.

      Multiple inheritance can lead to poor designs. It can also be the most natural design. It allows more power than single inheritence.

      Read "The Design and Evolution of C++" by Bjarne Stroustrup if you want the full discussion.

    17. Re:I would take C++ over Java/C# anytime by Lord+Omlette · · Score: 1

      haha, owned ^^;; lemme check my notes...

      --
      [o]_O
    18. Re:I would take C++ over Java/C# anytime by iamacat · · Score: 1

      Does it include a free (as in not demanding anything back from me) UI library with visual design tools? :-)

    19. Re:I would take C++ over Java/C# anytime by Anonymous Coward · · Score: 0

      Actually, close() "throws an exception" in C/C++ socket programming, as well. close() can return with an error (-1). Most people don't bother checking, though, because they don't care, or they didn't read the API documentation closely enough, or they don't know how to handle an error on close() anyway. So this actually points to a deficiency in C programming, since the close() call can't force the programmer to handle the exception. C++ can throw an exception, in theory, but it's a bit more cavalier than Java about forcing people to check exceptions, so you end up with the worst of both worlds: an unchecked exception.

    20. Re:I would take C++ over Java/C# anytime by iamacat · · Score: 1

      In both languages you can force a garbage collection of an object, and also specify code to be run att finalization.

      You can explicitely call socket.close() on a particular object or force a global GC (but you still need to set all references to null explicitely and I believe new VMs ignore it). However, there is no clean, readable and fast equivalent of C++ destructors for local variables.

      Are you kidding me? Ugly hacks like refcounting doesn't make your code ugly? Heh, yeah, sure.

      They make class implementation kind of ugly, but class use is unchanged. The whole point of OOP is to define a class once and use it many times, so the ugliness is confined to a small portion of the code.

      A real OO-language as Java or C# doesn't need for example templates since all objects inherit Object as they should.

      You must really like explicit casts. I know about generics in Java 1.5 and will have a good look. As I understand, there is a trade-off of reduced code size vs performance/runtime memory use, especially for primitive types. I am not sure if there are big semantic holes vs C++ templates as well.

      They also both have usigned types

      Care to list ones in Java?

      Multiple inheritance is usually seen as A Really Bad Idea and should be done with interfaces

      A method in an interface often has a sensible default implementation. Why should I be forced to re-type it for each class?

      You must really like explicit casts.

    21. Re:I would take C++ over Java/C# anytime by Imperator · · Score: 1

      If you don't want to do anything with an exception, just catch (Exception e) {}. I agree that generally you should be able to just forget about an object you don't want, but some objects represent "real" things like sockets that need to be closed. The OS doesn't have the option of just forgetting about a socket it doesn't want to deal with, and neither do you.

      The alternatives you propose (a log file or a class static variable) are either too specific or downright wrong, respectively. A log file is something some people will want, but most people want to find out about errors programmatically in a clean way and not by reading a stream. A class static variable (a) should be an object variable (hidden by an accessor) if anything and (b) negates one of the advantages of a language that uses exceptions to indicate errors[1].

      In Java there's no reason you can't have a separate finalizer method that does if (!isClosed) throw [...] . There's no guarantee it will be run because automatically-run destructors don't really work in a language that doesn't know exactly when an object is destroyed. Think about it this way: the C++ compiler knows that an object is destroyed either when it leaves scope or when you use delete on a pointer to the object. Java can use lazy garbage collection and so it won't know an object has been destroyed until the GC runs. That, in a nutshell, is why you need to call Socket.close() explicitly even when the object is local to a function.

      [1] Namely, that you can't accidentally ignore an error; if you want to ignore an error, you have to explicitly catch (and ignore) an exception.

      --

      Gates' Law: Every 18 months, the speed of software halves.
    22. Re:I would take C++ over Java/C# anytime by Caine · · Score: 1

      Yes they were, they were introduced to have a way to have a generic type without requiring existing data types to inherit from object and thereby breaking current C-programs.

    23. Re:I would take C++ over Java/C# anytime by Caine · · Score: 1
      However, there is no clean, readable and fast equivalent of C++ destructors for local variables.

      Object.Finalize() in C# for example. You can also make the GC collect only specific objects.

      You must really like explicit casts.

      Sometimes, but you don't have to cast half as much as you seem to think.

      Care to list ones in Java?

      Char

      A method in an interface often has a sensible default implementation. Why should I be forced to re-type it for each class?

      There are several ways not to have to do this. If you like buzzwords, Aspect-programming is one.

    24. Re:I would take C++ over Java/C# anytime by Caine · · Score: 1
      Just preprocessor. C didn't have templates.
      As I said above, they were introduced to enable generic types even though they couldn't design C++ to have all types inherit from some generic Object since this would break C compatability, thus the templates were introduced.

      Re: OO
      No, generic types aren't necessary for OO, and perhaps C++ doesn't claim to be an OO-language, but that just means it's a confused sucky langauge instead of an OO sucky language. That being said, I code way to much in C++.


      I will be honest, I don't comprehend this statment and its weight in your comment. My apologies for being so daft.
      The parent poster claimed neither Java nor C# hade usigned types while both have it. It was from his part a way to show weakness in these two languages I would guess.


      Much like the true problem with OOP this all boils down to the person viewing it and their interpretation.
      Agreed, I just don't think that claiming a language has superiority because it handles multiple inheritance is a good idea.

      That's a harsh conclusion. I could argue that you are an OOP zealot based on the fact that you seem to critize non-[true]OOP langauges leaving one to conclude that OOP is The Only Way.
      I agree I come of like an ass, mostly because I'm bored to death with all the people here that seem to think they know something when they're spouting out garbage. And regarding being an OOP zealot; I began my programming in C, and I still code alot of C. I also code in Haskell and O'Caml. I like writing hacks in VB.NET and Ruby. I use whatever language and method I think is best for the job.

    25. Re:I would take C++ over Java/C# anytime by Kupek · · Score: 1

      There are logic langauges, such as Prolog. If you want a sorted list, for example, you don't describe how to sort a list, you describe what a sorted list looks like. The problem with this approach is that it is horribley ineffecient; Prolog will blindly do a depth-first search on the problem domain until it finds a workable solution.

    26. Re:I would take C++ over Java/C# anytime by angel'o'sphere · · Score: 1

      I agree to your post but here I dissagreee:
      Now add other things missing from Java and/or C# - preprocessor, templates, multiple inheritence, operator overloading, unsigned types - and the new languages are really not that compeling for large projects that need heavy-duty, "dirty" features to manage complexity and can afford a regression suite that runs under Purify to fix memory corruption or leaks.

      Complexity is not managed by dirty features. But by architecture and design.

      I full haertly agree here:
      would like to see a language that preserves as many features of C++ as possible while adding garbage collection, memory safety, language-based security and guaranteed binary compatibility between platforms/OSes. I don't think managed C++ is "it". Why can't a VM support multiple inheritence?
      But poiners are not necessary. A reference is jsut the same but safge, a pointer is not. For thigs yoou want to use a pointer for, use native code, just like a Java or Lisp programmer would do it.
      Man, even in C++ I barely ever use a pointer but mostly references or STL iterators ... the implementors of those might use pointers, I as a library user do not need to do so.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    27. Re:I would take C++ over Java/C# anytime by Kupek · · Score: 1

      No, that's a support reason. The overhead from having everything subclass from some generic object class was considered to be too much. One of the design principles Stroustrup used was you shouldn't have to pay for what you don't use. Having every class subclass from a generic object class makes everyone pay the price, not just those who want to use inheritence.

      Templates were not introduced for C compatability reasons. They were introduced because they were considered to be the most effecient and practical way of allow generic programming. Read "The Design and Evolution of C++".

    28. Re:I would take C++ over Java/C# anytime by Caine · · Score: 1

      If he says so in the book, I guess that was a principle reason (although I think it's a bad, and not true one), however he's also stated what I say in several interviews. Probably, both influenced the decision to use templates.

    29. Re:I would take C++ over Java/C# anytime by eddeye · · Score: 1
      I would like to see a language that preserves as many features of C++ as possible while adding garbage collection, memory safety, language-based security and guaranteed binary compatibility between platforms/OSes. I don't think managed C++ is "it". Why can't a VM support multiple inheritence? Any pointers?

      It's been a while since I looked at it, but the D language seems to address many of your gripes (other than multiple inheritance).

      --
      Democracy is two wolves and a sheep voting on lunch.
    30. Re:I would take C++ over Java/C# anytime by Kupek · · Score: 1
      I think you're missing a key feature that templates allow that having collections that take a generic object does not: compile time type checking. This feature is desirable enough that Java 1.5 has templates.

      Our exchange made me curious enough to look it up again, just to make sure I understood what I read. From the D&E of C++, page 339:
      The former [the Smalltalk approach: rely on dynamic typing and inheritence] is very flexible, but carries a high run-time cost, and more importantly defies attempts to use static type checking to catch interface errors.
      He concludes,
      Thus, the key issues were seen to be notational convenience, run-time effeciency, and type safety.
      I see no mention of C compatibility anywhere prohibiting what he calls the Smalltalk approach, which is the approach Java took. Remember that C++ and Java had different design goals. Having as little overhead as possible - run time effeciency - was a design goal of C++. I haven't read up on the design process of Java, but from what I know of the language, they were willing to trade run time effeciency for convenience and ease of use.
    31. Re:I would take C++ over Java/C# anytime by Chester+K · · Score: 1

      finally or with just don't cut it.

      So wrap a "using" statement around the block and don't worry about it. You're guaranteed that the object will release all its unmanaged resources (like socket handles) when the block terminates, no matter how it terminates. You don't have to worry about the details. It pretty much takes care of the problem of C++'s stack local variables ... and you can call the IDisposable.Dispose() method in the instance where you're using them more similar to a new/delete C++ heap variable.

      Why can't a VM support multiple inheritence? Any pointers?

      The CLR actually supports multiple inheritance, but if you use it you lose CLS compliance. Multiple inheritance really shouldn't need to happen in an environment where you've got interfaces and delegation anyhow.

      --

      NO CARRIER
    32. Re:I would take C++ over Java/C# anytime by Anonymous Coward · · Score: 0
  48. languages are tools god dammit by lordholm · · Score: 5, Interesting

    Claiming C is dead is plainly stupid. Languages are tools, not religions or whatever. Languages have their weaknesses and their strengths.

    Fortran is extremely good for producing high performance number crunching code (it forbids array overlapping, and thus several assumptions can be made by the compiler). C is very low level and I would hardly chose another language when writing an operating system, it is also a fairly general purpose language, good for many things. If I am writing a GUI-app I would surely pick an object oriented language such as C++, Java or Objective-C. If I write a 3d engine, I'd like performance and an object oriented approach and I would chose either C (combined with self discipline) or C++.

    The portability of Java and other byte code languages is surely appealing, but they usually produce a terrible user experience since the applications produced tend to have a user interface compliant with the developer's OS (mixed with the language's own HI guidelines). A Java app written by a Windows developer would probably look like a Windows app, even on a Mac, and the other way around. Consistency in user interface is very important I think, so my hope is that people write code according to the MVC principle, and thus ease porting of the application to other platforms. Just to note, I'm not condemning Java, it is a very useful language if you want an internal application that is to be deployed on different systems. Say that the graphics departement (using Macs) and the economics departement (using Windows) both need access to some internal database or application, then clearly Java is the way to go.

    Anyway, select your language after the task at hand and write code with discipline!

    --
    "Civis Europaeus sum!"
    1. Re:languages are tools god dammit by mlk · · Score: 1

      ). A Java app written by a Windows developer would probably look like a Windows app, even on a Mac, and the other way around.

      This depends on the developer, not the langage. I good developer (using either Java, or C/C++ and a xp windowing toolkit) will have an app tweaked to look right on each platform targeted. A crap developer will not.

      --
      Wow, I should not post when knackered.
    2. Re:languages are tools god dammit by Imperator · · Score: 1
      Fortran is extremely good for producing high performance number crunching code (it forbids array overlapping, and thus several assumptions can be made by the compiler).

      Check out C99's restrict keyword if you're interested in letting the C compiler make no-aliasing assumptions.

      --

      Gates' Law: Every 18 months, the speed of software halves.
  49. uClibc rather than glibc by fpga_guy · · Score: 1
    glibc is huge - certainly much to big for embedded systems, which is where the real cutting edge is these days.

    Instead, you guys should look at uClibc - a small, fast, and sleek implemention of glibc, that is finding its way into more and more devices every day.

    We are talking about an order of magnitude smaller code footprint here people.

    If you want the embedded world to jump on to this bandwagon - uClibc is the only way.

    1. Re:uClibc rather than glibc by Anonymous Coward · · Score: 0

      Why choose uClibc when there's Newlib?

  50. huh? by Anonymous Coward · · Score: 0

    Who's the retard who submitted this?

  51. c++ by savuporo · · Score: 2, Insightful

    Well, couple years ago i was really keen on becoming a 100% C++ writer and ditch my C habits entirely.

    Due to the nature of most of my projects, like 90% of my time was spent writing wrappers for all sorts of C-style API interfaces.

    Finally i gave up and embraced the zen - pick the right tool for the right job. Being proficient with all sorts of tools helps too.

    --
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.slashdot.org Errors found while checking this document as HTML5!
  52. Mod parent up by Anonymous Coward · · Score: 2, Funny

    C is a gift from the Gods.
    C++ is a gift from the Devil.

  53. quicker compiles, better optimization, early versi by aaron_pet · · Score: 1

    The specifications are really quite nice...from what my friend said and the articles I read said...

    You get faster compiles because you arn't linking to so many things... less duplication... easier to work on... less learning to have same capability,

    easier to optimize a new platform... high level functions offer greater possibility for automatic optimization/ better error checking. ... it's an early version... it's not ready for prime time... Mono might be the way of the future, Microsoft will NOT be the future.

    --
    Please use [ informative / summarizing ] SUBJECT LINES
    Flame me here
  54. C is alive, not becoz of Portable.Net by cyberjessy · · Score: 3, Interesting

    I have been doing Windows development for quite some time now. Both low-level and applications(these days).

    C will not die becoz,
    Most of the real high performance stuff is still written in C. Take Windows drivers for example. The only other option would be C++, but then when it gets down to that level you try to squeeze out every bit of performance. What I have noticed it that when you look at the complexity of writing a Windows device driver, the relative complexity of C versus C++ becomes a non-issue in most cases.

    You cant write OS/drivers in bytecodes.

    But:
    There is no point in a .Net C compiler. If you are writing applications its better to use Java or C# anyday. C code does become unmanageable(pun intented) as the project size increases. You need all of encapsulation and inheritance to avoid nightmares of one huge gorilla staring at you!

    Maybe i exagerated when i said no point. Maybe for small projects, components that need to interoperate with the rest of .Net. But not for anything big.

    --
    Life is just a conviction.
    1. Re:C is alive, not becoz of Portable.Net by jhoger · · Score: 3, Informative

      > You cant write OS/Drivers in bytecodes

      Forth? OpenBoot? The currently alive OpenBIOS project?

      QED

    2. Re:C is alive, not becoz of Portable.Net by Gopal.V · · Score: 1

      > You cant write OS/Drivers in bytecodes

      Even Intel does that .... micro codes ...

    3. Re:C is alive, not becoz of Portable.Net by 0x0d0a · · Score: 1

      If you are writing applications its better to use Java or C# anyday.

      You know, I've heard that, and I don't agree, at least as a general rule.

      For custom code development or vertical market stuff, it's reasonable, unless there are other significant concerns.

      However, an end-product written in C is faster and more memory-efficient. If someone proposed rewriting bash in Java, I'd never use what they put out. Same for the GIMP, xterm, xmms, or any of the other apps that dot my desktop.

      Of the Java apps I've tried...I think I've tried straw (RSS reader, found it to be slow and ended up not using it), tube (Java Hotline client, ended up using the C-based fidelio in preference), freenet (still no good C alternative, so I don't run freenet, as it soaks up masses of RAM), and a bunch of other minor apps that just got quickly dropped. If you're writing something that many people are going to be using all over the world, and you want a really polished final product, I claim that you're generally better off with C (and I wish that I could think of a good safe language, but the only safe languages that I've been reasonably impressed with for writing full-blown applications -- eiffel and ocaml -- have a stunning lack of interest from the public).

    4. Re:C is alive, not becoz of Portable.Net by bcd · · Score: 1

      C code does become unmanageable(pun intented) as the project size increases. You need all of encapsulation and inheritance to avoid nightmares of one huge gorilla staring at you!

      Which reminds me of another big difference between Windows and UNIX: the monolithic application vs. a set of smaller utilities. When you view a project as one large piece of code, it will become unmanageable very quickly, regardless of the source language.

      Encapsulation and inberitance are good things, when used properly. Even though C isn't a true OO language, you can still design your program using OO concepts and code it in C. A little thinking before you start typing goes a long way.

    5. Re:C is alive, not becoz of Portable.Net by biobogonics · · Score: 1



      > You cant write OS/Drivers in bytecodes

      Forth? OpenBoot? The currently alive OpenBIOS project?



      You can even write OSs in HLLs - see CP/M (PL/M) and Multics (PL/I).

    6. Re:C is alive, not becoz of Portable.Net by Anonymous Coward · · Score: 0

      Microcode isn't really anything like byte codes. Its basic function is to map a CISC instruction into a string of lower-level operations to the processor. As a result, the decoding process looks less like running an actual program than simply iterating over an array of memory cells.

    7. Re:C is alive, not becoz of Portable.Net by Kymermosst · · Score: 1

      Forth?

      The first version of Forth I ever used compiled to 6502. Totally different implementation than the one described in the book "Threaded Interpretive Languages", but the same syntax.

      Of course, new words ended up being compiled to mostly a bunch of JSR instructions and calls to push().

      When I made a Forth interpreter, I ripped off directly from the TIL book. I was going to make a compiled one, but never got around to it.

      --
      "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
  55. yeah no kidding. by torpor · · Score: 2, Interesting

    even in the windows world, i'm still seeing *FAAAR* more c/c++ work than anything else around.

    of course, i work in embedded, so i'm not necessarily in a position to judge windows. in my world, C still rules the roost, and probably will for a loooong time.

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  56. Can I compile the kernel with this Portable.Net? by KamuSan · · Score: 1, Flamebait

    Can I compile the kernel with this Portable.Net stuff? Since the most important thing I can think of that is written in C is the Linux kernel I guess it's a good thing that this Portable.Net stuff is here now C is dying. Otherwise we would never be able to cuild a new kernel, I guess!!

  57. Running C code compiled on a 386 on an IA-64 by Gopal.V · · Score: 1

    Imagine ... compiling C on an 386 (or arm4 or ppc) , copying it over to an IA-64 and getting all the 64 bit arithmetic pipelines running full speed ..

    This is a good thing for people who want a Sandbox for C ... and portability

    Guess what language Portable.net is written in

  58. API count not so pitiful by Anonymous Coward · · Score: 0

    C# may have a pitiful set of APIs for general work but it is very good for SOAP messaging, particularly "advanced" SOAP work such as messages with WS-Security headers, WS-Addressing for SOAP intermediaries. AFAIK, there's no royalty-free equivalent for Java yet; dunno about the elder languages.

    In general, C# + .NET + the MS IDE thingy (Visual Studio?) is good for web services, much better than anything for J2EE that mortals can afford. I've seen demonstrations of coding web services for .NET live, in real time in front of a critical audience and they work.

    Maybe a good mix is C#/.NET for web-service wrapper calling this new C/.NET for business logic?

  59. Sandbox for C programs by Gopal.V · · Score: 1

    Imagine getting a NullReferenceException instead of a Segmentation Fault ? ... it's as simple as that

    1. Re:Sandbox for C programs by NigelJohnstone · · Score: 1

      1. A fault is a fault, thats just a different failure mode. If you didn't do enough work to fix simple bugs like Null pointers, then why would you have done enough to clean up after NullReferenceExpceptions?

      2. Its a more complicated system and so more likely to have bugs.

      Its also extra unnecessary overhead and a dependancy on a runtime, the correct version of which needs to be on the machine.

    2. Re:Sandbox for C programs by Anonymous Coward · · Score: 0

      An unhandled exception prints a nice stack trace to stderr which makes it easier for you to figure out what went wrong. Granted, a bt in gdb can be just as helpful, but simply running gdb changes the environment the program is in and can throw off your results. An exception gives you the stack trace for the program failure during a normal execution. Also, when running on systems without protected memory (like windows 98, which more than half of all home PCs still have), it provides the memory security the operating system doesn't.

    3. Re:Sandbox for C programs by 0x0d0a · · Score: 1

      If you want programs to dump stack traces, it's pretty easy. You can modify your shell set up to dump out stack traces when a program dies.

      Windows 98 has protected memory. You can't do very effective virtual memory in the modern sense of the word without implementing most of what you need to have protected memory.

      The main problem that you have, I think, is that a sandbox is a high-overhead system that does fancier error output, handling dynamic typing and the like, killing a program the moment it steps a byte out of line. Since hardware solutions like the MMU aren't *quite* this smart, you can't kill things exactly when they start to behave naughtily.

  60. Transport is the key by ncaHammer · · Score: 1

    C code cannot travel. It compiles native code which is by nature unverifiable (none can say if this code is a virus or a new cool calculator)
    But compiling C in some verifiable (managed) form where a runtime can verify it, your C app is now capable of travelling, running in OSes or CPUs you never knew at compile time, tested and integrated in applications at runtime (where neither you or target app knew each other at compile or link time).

    1. Re:Transport is the key by ipjohnson · · Score: 1

      But why? Well written C code amongst unix is very portable, and if written properly can be ported to windows (GUI not withstanding).

      You have to remember most software written is not for off the shelf stuff but rather custom jobs (stuff that can't be replaced with COTS). Why write something to run on many plateforms when you can customize it to one?

    2. Re:Transport is the key by Manic+Miner · · Score: 1

      Did you read the guys post?

      Applications programmed in C don't want any of the above (well they might want them but it's not their primary concern).

      They want low level control, they want minimised memory footprint, they want to know exactly when memory is released and not rely on the random interactions with garbage collection.

      They want to be able to talk as directly as possible to the devices they work on because this gives you one major bonus SPEED. In some situations you worry about an extra 100 instructions, when you are worrying about that few instructions you really don't want a something "managing" your applications and stealing more of them from underneath you :D

      --
      If you ever drop your keys into a river of molten lava, let'em go, because, man, they're gone.
    3. Re:Transport is the key by ncaHammer · · Score: 1

      What you describe is not an application but a system component. Under this term i agree with you, you do need low level control and tight/fixed memory allocations

  61. This is more Interesting that C on .NET by Anonymous Coward · · Score: 1, Interesting

    Anonymous Reports:
    Chatlog
    [04:22] <rhysw> 2 years ago, I was working on a virtual machine that could run C. Like, real C. Not pansy fixed up clean C, but the nasty pointer stuff.
    [04:22] <ajmitch> ooh
    [04:23] <ajmitch> how well did it work?
    [04:23] <rhysw> I called it "Jindalee", after the place where I lived
    [04:23] <rhysw> It worked pretty well except for one thing ...
    [04:23] <rhysw> The VM was very efficient, but also *very* funky in its design. Writing a C compiler for it was a total bitch.
    [04:24] <rhysw> But now that I have treecc, and 2 years of IL knowledge under the cap, I may be able to dust it off and build a very nice VM.
    [04:24] <ajmitch> excellent!
    [04:24] <ajmitch> i guess it'll require deep C & CS knowledge to hack on? :)
    [04:25] <rhysw> No more than needed for pnet, actually. The core funky idea is easy enough to understand.
    [04:25] <rhysw> Best of all, the entire engine is under 100k in size.
    [04:25] <ajmitch> hmm, ok, i should see if i can understand it
    [04:25] <rhysw> ok - I'll lay it on you and twist your brain a bit, shall I?
    [04:25] <ajmitch> alright
    [04:26] <ajmitch> my brain's already fairly twisted from trying to debug & polish this python app :)
    [04:26] <rhysw> Keep in mind that this is the original Jindalee, not the new one ...
    [04:26] <ajmitch> sure
    [04:27] <rhysw> VM's like Java have a problem ... pointer security. How do you stop some moron from pushing an arbitrary integer on the stack, popping it as a pointer, and then walking off where he doesn't belong? The answer is the bytecode verifier.
    [04:27] <rhysw> But what if there was no way to do that (push int, pop pointer)? Then there would be no problem, right?
    [04:28] <ajmitch> sure..
    [04:28] <rhysw> So, I created an engine with two stacks, instead of one. You can push integers on one stack, but only pop pointers from the other. Viola - no way to cast an int to a pointer and circumvent security. And no bytecode verifier needed either.
    [04:29] <ajmitch> funky
    [04:29] <rhysw> exactly - no one else had done that.
    [04:29] <ajmitch> surprising
    [04:30] <ajmitch> so how'd code in the vm go interfacing to system libs?
    [04:30] <rhysw> it was kinda icky :)
    [04:31] <rhysw> anyway - I may dust it off if I get some time
    [04:32] <ajmitch> do so, please!
    [04:33] <ajmitch> even if you just put up a tarball of it somewhere
    [04:33] <rhysw> it needs a lot of cleaning up first, but it may make an appearance in the near future
    [04:33] <ajmitch> you've done some amazing work with pnet, this'd be a great help as well
    [04:34] <ajmitch> got any ideas on how to get more coders involved? :)
    [04:37] <rhysw> i wish i did - it would certainly solve my depression problem

  62. Re:Bug submission from banned contributor. by Anonymous Coward · · Score: 1, Insightful

    Actually it sounds from your own description that you got banned from the project for being an asshole. The fact that you have an axe to grind doesn't lend you much credibility to indict the whole project...

  63. Re:C is Dead by vivek7006 · · Score: 1

    C was last heard saying, " I have already given my best, and I have no regrets at all".

  64. And how is this going to work? Paradigm clash! by Otis_INF · · Score: 4, Interesting

    C is a procedural language. .NET is an OO platform. Really using .NET in a C program requires a lot of pointerarithmetic, which will make the C source not that readable.

    All languages on .NET have to adapt the OO paradigm set for .NET in one way or the other, OR it requires serious compiler efforts (Eiffel) or just plain slow code (creation of objects behind the scenes and then call the method of choice). Finding static methods which do the same as the methods in stdlib and stdio is doable and will work, the real pain begins when a lookalike method of a stdlib or stdio routine is not static in .net, so a whole object has to be created.

    That will not always work in all cases.

    And what about interlanguage operability? An assembly in IL can be referenced from any .NET language like VB.NET or C#. How is the C program presented to C#? As 1 class with a very big pile of methods?

    --
    Never underestimate the relief of true separation of Religion and State.
    1. Re:And how is this going to work? Paradigm clash! by Gopal.V · · Score: 2, Interesting

      The GNU CPP has been hacked to add namespace support ... so that the following DotGNU.SSL.h can be used in C .

      Read Pnet C ABI ... for the info on all the other questions

  65. Computer languages form an ecosystem by Diomidis+Spinellis · · Score: 5, Insightful
    Judging from some previous comments, I see that some fail to grasp that modern computer languages form a large ecosystem. Each language has its purpose, and one can not easily dismiss a language as dead, just because some other, ostensibly more powerful language has appeared on the block. Monkeys, whales, cockroaches, ants, and plants continue to coexist with humans.

    When I want to solve a program I choose the language I will use, taking into account the abstractions and facilities it offers.

    #include "/dev/tty"

    1. Re:Computer languages form an ecosystem by Anonymous Coward · · Score: 0

      And he chose Slashdot to pimp a bunch of stuff on his website. :)

  66. popularity by mpmansell · · Score: 3, Insightful

    I suspect that when people talk about the popularity of a language fading, they are really talking about the percentage of developers using it.

    This doesn't really tell anyone if the number of people using the language has changed. Given the explosion of programmers in recent years, be they professionally trained, or weekend dabblers, it is likely that they are using the current faddy or new languages, like Java, C# or VisualBASIC (not meant as flamebait; I use them myself when engineering requirements suggest them). This for the most part because their emphasis is on making pretty UIs and not any of the more traditional processing or server applications.

    This 'explosion' of users with new languages doesn't mean that the old Fortran, Cobol or C applications will immediately be re-written in BoltsN.Nuts or whatever the latest and greatest is. These people will, quite sensibly, plod along with the tried and tested and will probably even continue developing within these skillsets.

    The requirements for these skills may well have stayed the same, while the requirement for GUI apps and amateur (some calling themselves professional) developers has increased.

    Before anyone can say a language is dying, lets see the figures. For all we know, these dying languages could even be growing (in numbers, if not percentage). Besides which, who should really give a damn?? If it works for you, use it. If it doesn't, but you're not harmed by it, live with the fact that the Borg haven't yet asssimilated us all :)

  67. The real question by jandersen · · Score: 3, Insightful

    "The real question is this: would you rather program against the pitiful number API's that come with C#, or the huge Free Software diversity that you get with C? The death of C has been greatly exaggerated. It will adapt - it always has."

    No - that's not the real question; it's: 'Oh no, not yet another C-like language!?'

    What's the point, actually? C# is not something new, it's just an attempt to 'get the colour exactly the right shade of pink'. The truth is - C (the language) is precisely what it should be. So perhaps it would be nice to protect the more inept programmers against themselves, but that is simply a question of the runtime- and development environment, or perhaps some improved libraries.

    As I always say: a good programmer can write good code in any language, and a bad programmer will not write good code in any language; it's as simple as that, really. This is because good programming is about good coding and debugging practice, both of which are independent of whichever language you use.

  68. Speaking of which... by Anonymous Coward · · Score: 0

    ...what language are all these VM's written in?

  69. Re:Bug submission from banned contributor. by Anonymous Coward · · Score: 1, Informative

    Read the mailing list archives ... there seems to be enough reason to kick this guy...

    ( I remember Miguel Kicking a guy out of the Mono lists just because he was working with the Portable.net team... IIRC, one the Qt# guys)

  70. pitiful number API's by selderrr · · Score: 2, Insightful

    It's a common misconception that you need a ton of API's. up to a few years back, I also fell for the DEVStudio GUI builder, the MFC framework, and the libraries that orbit it. After 5 years of trying to get a hold on the beast, I met someone who had stepped back from all frameworks, and went back to ordinary console C and C++. I walked his footsteps, and my apps got reduced to 15% of their original size. Okay, the dummy users needed a few days more to learn the app, but with solid documentation, this was not an issue. And after 2 months, some RealBasic nutcase wrote a GUI wrapper on top of it in 1 week. Perfect !

  71. ummm... by Anonymous Coward · · Score: 0

    you spend too much time in front of a computer screen.,

    look.

    all slashdot suscribers.

    every 45 minutes, get up and walk around.

    outside.

    don't think you know.

    write Montreal.

    Love,

    robin.

  72. Thank God! by jasonditz · · Score: 4, Funny

    I was just wondering where I could get a C compiler.

    1. Re:Thank God! by Anonymous Coward · · Score: 0

      Actually, cscc is supposed to be for stack-based machines what gcc is for register-based machines (RTL sucks for stack-based machines). Eventually they might merge (at least that's what's hoped will happen, since, optimally, there should only be one GNU Compiler Collection). Btw, cscc is usually pronounced "Gargle-Blaster Foo-Muncher" (I'm not kidding), but, depending on the day of the week and the position of the moon, it's also sometimes called the "C-ish Source Compiler Collection". ;)

      Rich

  73. Still taught in schools by blizzy83 · · Score: 1

    I am in the computer engineering program in college and the focus of the program is still C, so until you get the universities to stop supplying new programmers who will want to use C (what they were primarily taught) C is not going to die for quite some time.

  74. Re: C is Dead? by Zen65 · · Score: 1

    Portable.NET 0.6.4 now has a fairly good C compiler that can compile C to IL bytecode... Like C, only slower. ;-)

  75. No problem www.mingw.org Yep get the lot by Anonymous Coward · · Score: 0

    gcc g++ .. and so on for windows.

    Basicly gnu is coming.

    Gnu C is being protected from some of the old faults and they create errors. Ie buffer overflows turn up in the complier it is nice fun building a windows program with Gcc when you get past the microsoft difference then code starts turning up faults.

  76. *rattles /usr/include/* by YetAnotherLogin · · Score: 1

    There! It moved!

  77. seriously ? by nsebban · · Score: 1

    "would you rather program against the pitiful number API's that come with C#"

    Did this guy at least had a look at the .net framework ?

    --
    ____
    nico
    Nico-Live
  78. Lists by harmonica · · Score: 1

    If the C folks get it together and standardize more than just things like printf(...) and linked lists,

    Are there lists of some sort in a standard C library? I could use those in the near future.

    1. Re:Lists by mst76 · · Score: 1

      > Are there lists of some sort in a standard C library? I could use those in the near future.

      Not in the ANSI/ISO libraries, but GLib should do wat you want. Although usually associated with GTK+ and Gnome, it's mostly a collection of low level datatypes and functions, very useful outside the context of GUI programming as well. Follow the links here for the downloads.

    2. Re:Lists by ttfkam · · Score: 1

      Shoot, I should have added that to my list (no pun intended) of C deficiencies.

      It's been over thirty years. Linked lists, binary trees, red-black trees, hashtables, sets, priority queues, et al. have not changed all that much. It would be nice to not make everyone reinvent the data structure wheel.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    3. Re:Lists by Anonymous Coward · · Score: 0

      The nice thing about C is that you can get a portable library to do all that for you. So it's just a matter of finding the library to do what you need, and then including it with your package. Hey presto, code reuse. Basically, if there's a problem you want to solve, there's probably a library with a C binding that you can find with a little Googling.

      For larger, more complicated libraries, this task isn't particularly easy (and hence the deal with packaging systems), but for something like basic data structures, there's no real need to use a standard API. There are enough implementation variations that standardizing on a single implementation is probably less useful than simply integrating with your library of choice (which is the joy of open source). For example, take the qsort and bsearch routines; they only know about sorted arrays of pointers, which is sufficiently general to sort/search anything in conjunction with function pointers to extract the sort keys, but it requires that you build up the properly structured array if your data isn't already in that format.

    4. Re:Lists by ttfkam · · Score: 1
      The nice thing about C is that you can get a portable library to do all that for you. So it's just a matter of finding the library to do what you need, and then including it with your package. Hey presto, code reuse. Basically, if there's a problem you want to solve, there's probably a library with a C binding that you can find with a little Googling.

      That's all well and good, but why not have a standard library have it? I'm not saying that it all has to go into one monstrous libc.so. Make it libcutil.so or some other separate library so that people won't whine about bloat. The point I'm trying to make is that linked lists, sets, priority queues, etc. are all solved problems. To a large extent, so is a window, a button, a sound clip, and a database connection.

      It reminds me of the PHP database API madness. mysql_select(...)!?! PHP was created after Perl and Java and yet they couldn't figure out that database abstraction and DBI/JDBC were good ideas?

      You want choice? Great! I agree with you. Competition is good. But give me a common header file so that to swap implementations, all I need to do is recompile or relink. We don't need twenty billion APIs for "play audio clip" do we?
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
  79. litmus test for programmers by humankind · · Score: 4, Interesting

    C is a brilliant language. It's beautiful and elegant. I don't need validation from any other entity to legitimize the *world's most successful computer language* that most of the major apps on this planet have been written in.

    This whole story is a big troll, and if you're not a serious programmer, you wouldn't know it.

    Boo hoo... built-in string boundary checking in newer languages. If anything, C is the catalyst for a plethora of invaluable programming habits that today's programmers seem to take for granted.

    1. Re:litmus test for programmers by Anonymous Coward · · Score: 0

      For someone who has used VB, Java, C and C++, I'd have to say that C is probably the most flexible. With Java, everything is a class, making coding smaller programs quite cumbersome. VB, is well, Windows only.

      C++ and C are in many ways the same. But where C wins is in its inherent *nix-like simplicity and robustness. It's a tough call between C++ and C, but I'd have to go with C for small and middle-sized programs.

      As for buffer overflows, C allows you to pay attention to your code, rather than being spoon-fed. This is why C should be the first language that all coders should learn.

    2. Re:litmus test for programmers by MenTaLguY · · Score: 1

      I suppose there is some truth to the "what doesn't kill you makes you stronger" theory.

      --

      DNA just wants to be free...
  80. Languages don't die by DerPflanz · · Score: 5, Insightful

    I know the quote was wrong, and thus the entire discussion is senseless. But still, there are things to say about a language dying: (computer) languages do not die. Period. All of the languages ever invented are still used somewhere. People still use FORTRAN, COBOL, C64 BASIC and all kinds of other weird languages.

    Besides, why would one of the most powerful and widely used and known languages (C) die? It is like saying noone uses a normal screwdriver anymore, just because they own a battery-powered one. Sometimes you just use the normal one, because it is easier, faster and it just works.

    --
    -- The Internet is a too slow way of doing things, you'd never do without it.
    1. Re:Languages don't die by Anonymous Coward · · Score: 0

      Nonsense. There are programming languages which are as dead as the script used by the Indus Valley peoples of 2000+ BC. Very few people comprehend just how many programming languages there actually are (IIRC about 375000)

    2. Re:Languages don't die by Sycraft-fu · · Score: 1

      Fortran particularly. I had no idea how active that one is, given that you never seem to hear about it. I figured it was more or less like Cobol in that it was pretty much just on legacy systems.

      Nope.

      The other day I had to setup a computer and install Visual Fortran on it. VISUAL Fortran? That's right, integrates with the rest of Microsoft's Visual Studio (VF isn't from MS though). You can write Windows applications in Fortran. Had to be the craziest thing I'd heard of, but apparently electrical engineers use it ALL the time.

      I also learned that Fortran is still evolving as a standard. Currently we are on Fortran 95, and the next version is likely to be standardised this year or next year.

    3. Re:Languages don't die by DerPflanz · · Score: 1

      I understand there are a lot of programming languages and also a lot of them aren't used (anymore).

      For the mainstream languages, you could say that whenever a new superset or derivative of that language is released, the 'parent' language will not cease to exist. It is evolutionary. Just like what someone else pointed out: monkeys, plants and amoeba still co-exist with humans.

      --
      -- The Internet is a too slow way of doing things, you'd never do without it.
  81. i hope its not dead... by ImaRootofALLEVIL · · Score: 0

    I just started learning C 2 night ago

  82. printf("Reports of my death have been greatly " by holizz · · Score: 1

    "exaggerated.\n");

  83. Re:Bug submission from banned contributor. by mdupont · · Score: 0, Informative

    BTW,
    I think it is very ontopic to point out the bug fixing policies of pnet/c. I am one of the *few* people who even uses pnetc and one of the *fewer* people who reports bugs on it. It would suprise me if anyone has reported more.

    So, My complaint is ontopic, IMHO.

    --
    Introspection is the key to understanding
  84. Couldn't quite get pointers could you? by Anonymous Coward · · Score: 0

    Don't worry, it'll come with time.

  85. C is horrible or.. by Anonymous Coward · · Score: 0

    Perl is written in C. I wounder what the jit for java is written in.. C++ maybe? Or fear could it be C?

    C is small, fast and not as bad as people think.

  86. C is good but... by polemistes · · Score: 2, Funny

    I used to love C, but then I found something much better: Assembly language; pure and clean machine code. It has lots of advantages:

    • You get full control. Turn off this multi tasking nonsense. Search into the depths of power you never knew existed in your box.
    • Unending possibilities for optimalization of your code. You could use a whole lifetime to figure out the quickest way of calculating the distance the Earth travels during the time you are coding the routine.
    • You can make code that works on your own machine, and no one else's. So if someone likes your program, they have to pay you to create a new one for their machine as well.
    • Nobody but you will understand the code you're making. So you can release your program as Free Open Source, and people still have to pay you to make changes and updates.
  87. Re:Bug submission from banned contributor. by Anonymous Coward · · Score: 1, Insightful

    Michael, Michael, Michael... just as full of sh*t as ever... we both know why you were banned from the project. Does attempted blackmail ring a bell? How about repeated harassment of the developers?

    No, bug reports aren't harassment, but I'll tell you what is. Proposing something new, and totally irrelevent to the DotGNU project (as per its stated goals and mission) every ten seconds, then not writing ANY of the code yourself, and finally bitching constantly about none of the DotGNU hackers dropping everything to implement your umpteenth million off the wall idea, is most definitely harassment. You harassed Rhys so much he almost left the project completely just so he wouldn't have to deal with you anymore. It's no wonder he didn't want to deal with your bug reports, no matter how valid they may have been.

    By the way, you forgot to mention that you were unbanned from the project. You forgot to mention that, as a result, the ban on you in the #dotgnu irc channel was lifted. You forgot to mention that as soon as you learned of this you joined and then proceeded to spam the #dotgnu channel. Next time why don't you try telling all these nice /. folks who you really are, *sshole!

    Rich

  88. C# sytax closest to Java? by bangular · · Score: 1

    I'm not a C# programmer, but looking at the documentation it looks strikingly similar to java. Is the inclusion of the letter "C" just a marketing gimmick to make C# seem like a C or C++ successor? Seems like that to me. Espically since the non-programmers I talk to are under the impression C# is a C variant.

    1. Re:C# sytax closest to Java? by Anonymous Coward · · Score: 0

      Correct. C$\sharp$ has as much in common with C as Java does (that is, the style of syntax is the same).

    2. Re:C# sytax closest to Java? by rootlocus · · Score: 1

      Java is a C/C++ successor too, so saying that C# is a Java successor implies that..

    3. Re:C# sytax closest to Java? by Anonymous Coward · · Score: 0

      Is the inclusion of the letter "C" just a marketing gimmick to make C# seem like a C or C++ successor?

      It's meant to make it look intermediate: C, C#, C++. (sharp means +1/2 tone in music)

      Gimmick? I would rather blame *Java* for being a C variant and not called C-something.

  89. Assembler? by pjt33 · · Score: 1
    Wouldn't assembler be slightly nearer the machine instructions than C?

    BTW, can you please post a list of project's you've contributed to. I don't want anyone messing with the memory at AF345F12:BA231DCE on my machine.

  90. Importance of compiling C to portable executables by bizcoach · · Score: 4, Insightful
    the developers of C# (i.e. the people developing the language, not with the language) made sure that one can easily make use of C and C++ code and binaries already in existance. You can already call all the C/C++ APIs.

    Sure, but this helps only if you can assume that those compiled C and C++ binaries are already installed on the user's computer. The main point of "compile once, run anywhere" is to be able to distribute a compiled program that will run anywhere. Of course in DotGNU, we don't define "anywhere" as narrowly as the Microsoft monopolists do:

    Unlike Microsoft's C compiler, whose output will only run on i386-based Microsoft Windows systems, our compiler turns portable ANSI C code into a truly portable executable that will run any platform that has a CLR ("Common Language Runtime"), regardless whether the system is 32-bit or 64-bit, little-endian or big.

    Or is it because of some form of hatred towards C#

    No. It's because there's a lot of C code out there that people might want to use from C# and other modern languages. Throwing that C code away and re-implementing in another language would be a waste of time.

  91. ahem Michael by linuxislandsucks · · Score: 1

    ahem Michael..please note the difference between applications in bytecode lanaguages and OS components in non bytecode languages..you might appear more intelligent than your current post..

    Will someone at ./ actually think!!!

    --
    Don't Tread on OpenSource
    1. Re:ahem Michael by geminidomino · · Score: 1

      Will someone at ./ actually think!!!

      No. HTH, HAND, &c.

  92. C Dead or alive? by ron_lima · · Score: 1

    I really don't think C is dead. I've been working with C language since 1994 in Unix environment and it is a natural language to write applications to that environment. I feel that byte code languages are really cool but I believe that there is still a lot of work to be done in the interpreters.

    --
    Ronaldo Faria Lima
    E-mail:ronaldo@ronaldolima.eti.br
    Home page: http://www.ronaldolima.eti.br
  93. What type of documentation? by edxwelch · · Score: 2, Insightful

    "Most of the times, these libraries are not cross platform"
    Well, duh, the claim is c++ is portible not "all libraries that c++ uses are portable"

    Having said that I would say that there are degrees of cross-platform-ness. Java being much closer to the ideal than c++.

  94. Destructors in Java by pjt33 · · Score: 1
    I don't know C++, so I'm not sure how good its destructors are - in particular, whether you have a guarantee that the destructors of objects still in memory will be called when the program exits. If you can live without such a guarantee, you can have destructors in Java.

    finalize
    isn't documented to have any guarantees at all, but in practice if an object is GC'd then it will be finalised shortly after. However, the preferred way of doing it now is
    PhantomReference
    . I would give a demo, but the demo I just spend 20 minutes writing has too many curly braces, so the lameness filter doesn't like it.
    1. Re:Destructors in Java by iamacat · · Score: 1

      C++ has a guarantee that destructors of local variables will be called immediatelly when the variable goes out of scope. Java doesn't have any solution for that except hand-writting finally blocks.

  95. Re:quicker compiles, better optimization, early ve by Anonymous Coward · · Score: 0

    This thread is about the C support for DotGNU Portable.NET. When Miguel saw the original code from Rhys, long before Mono existed, he said something along the lines of "wow, you're way ahead of me", as was to be expected, since Rhys was already an experienced compiler hacker. Several months later, after Miguel had started Mono, when (one-sided) attempts at cooperation were made, he basically told Rhys that his code was worthless (Rhys was living off his savings so he could work full-time hacking on a Free Software project, and Miguel knew this... hence, Miguel is an *sshole in my book). After repeated attempts at cooperation were shot down due to the hostility coming from the Mono camp, Mono's PR Blitzkrieg caused this very sad state of affairs, where you say "Mono might be the way of the future" in a thread about DotGNU Portable.NET.

    DotGNU Portable.NET is still going strong, despite a serious lack of much-needed volunteers. With as much as 1/100th the number of volunteers, DotGNU Portable.NET has managed to not only stay in the running, but to lead in important areas like portability, C->IL support, and C#->JVM support. Unlike Mono, DotGNU will never pay MS for licensing if they try to enforce any of their api patents. Simply by setting a configure option when building the pnet C# library, you can remove those parts of the library which are not safe from MS patents. Additionally, the alternative api development project (still in skunkworks on the design phase) will provide a patent-safe Free(dom) Software (and much better designed) alternative to the MS apis for managed code to use.

    DotGNU is the GNU project's answer to the need for Free(dom) Software for webservices, and DotGNU Portable.NET plays an important role in that effort. DotGNU Portable.NET provides a portable, compatible, runtime and library to make migration away from MS.NET reasonably easy. The C support makes it easier for Free(dom) Software hackers to use existing Free(dom) Software in their managed code applications and libraries. Ximian's just trying to make money, and if ethics gets in the way of that, ethics goes out the window. Mono is most definitely not the future; DotGNU, however, is.

    Rich

  96. Hi. You don't know what you're talking about. Bye. by hummassa · · Score: 2, Informative

    Uh, you can't run bytecode on a raw machine.
    Yes you can. There are several java-bytecode hardware microprocessors.
    C and Assembler are what make the computer world run.
    false. C and assembler are 20%-100% faster to execute, but 1000%-10000% slower to develop in.
    You can't make Java in Java.
    Yes you can. *and* you can make csc in c# (see here)
    C turns directly into executable binary (or object files then linked into executables). Java cannot.
    Look up gcj.
    I suppose that if you were insane enough, you could make a bytecode to opcode converter, but then you lose 100% of the point of the langauge, probably a lot of the efficiency, and at that point you may as well use C.
    As we were in the subject of python, look up psyco.
    Man, this is the highest density of crap in the same paragraph I have ever read in /.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  97. Poor Perspective by Mark_MF-WN · · Score: 2, Insightful
    Why would the rampant success of bytecode and interpreted languages have any effect on C? Don't get me wrong -- Java, Python, and PHP are three of the best things to EVER happen to Software Development. But that hardly makes C any less important.

    It's like comparing the importance of your spinal cord to the importance of your kidneys. They both kick ass and serve a particular purpose; in many cases they complement each other wonderfully. And let's not forget that Python and Java both use C as an extending languge.

  98. "the pitiful number API's that come with C#" by gatkinso · · Score: 3, Insightful

    Way to completely miss the point of language independence.

    --
    I am very small, utmostly microscopic.
    1. Re:"the pitiful number API's that come with C#" by gidds · · Score: 1

      Indeed. Bytecode has two major advantages -- platform independence, and security. Does anyone find it ironic that in implementing their bytecode, M$ clearly missed both points?

      --

      Ceterum censeo subscriptionem esse delendam.

  99. Language != Libraries by rjshields · · Score: 2, Insightful

    C++ is perfectly portable if you don't use platform dependent libraries. You seem to be blaming the language because people develop platform dependent stuff for it! If your goal is to port stuff to another platform then obviously you start off with that in mind.

    There's plenty of platform dependent Java code out there, or stuff that doesn't port properly.

    --
    In this world nothing is certain but death, taxes and flawed car analogies.
  100. You Sound Like by Mark_MF-WN · · Score: 2, Informative
    You sound like an assembly-language advocate. They too are known for praising the silliest qualities of their chosen language.

    C's only strengths are speed and easy access to hardware.

    String boundary checking SHOULD be a feature of any modern language -- or do you enjoy buffer overflow exploits?

    1. Re:You Sound Like by Kymermosst · · Score: 0, Flamebait

      String boundary checking SHOULD be a feature of any modern language

      Yes, because the programmer can't be bothered to write good code. Give me a break.

      or do you enjoy buffer overflow exploits?

      Most buffer overflow exploits can be cured by simply not blindly using strcpy() when the data is untrusted, and keeping track of how full your buffer is for non-string arrays.

      String buffer overflow avoidance can be as simple as replacing strcpy(dest_buf, src_buf); with strncpy(dest_buf, src_buf, BUF_SIZE-1); *(dest_buf+BUF_SIZE)=0; as long as you don't mind the buffer being truncated.

      Of course, you could also do length checking, too, with strlen. Spit out an error or do whatever if it won't fit in the buffer. That's also not hard.

      Buffer overflow problems are indicative of a lazy or inattentive programmer. I won't go far as to say that only lazy/inattentive programmers are unhappy with C's lack of string (array, really) boundary checking, but it seems to me that it is really easy to avoid.

      --
      "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
    2. Re:You Sound Like by Mark_MF-WN · · Score: 2, Insightful
      Buffer overflow problems are indicative of a lazy or inattentive programmer. I won't go far as to say that only lazy/inattentive programmers are unhappy with C's lack of string (array, really) boundary checking, but it seems to me that it is really easy to avoid.
      Do you really believe that the developers of Linux, Gaim, Windows, BSD and/or Unix, and basically every other piece of widely used software, were lazy or inattentive? In fact, how many pieces of software can you name that have NEVER had a buffer overflow exploit?

      I bet you don't like seatbelts (only poor drivers need them!) or hospitals (just for people who are careless and don't look after themselves!) either.

    3. Re:You Sound Like by Anonymous Coward · · Score: 0

      "How many pieces of software can you name that have NEVER had a buffer overflow exploit?"

      ALL of Daniel J. Bernstein's software.

      ALL written in C.

      Put that in your pipe and smoke it.

    4. Re:You Sound Like by Kymermosst · · Score: 0

      Do you really believe that the developers of Linux, Gaim, Windows, BSD and/or Unix, and basically every other piece of widely used software, were lazy or inattentive?

      Yes. I don't mean it in a derogatory way, though. I have been guilty of being lazy or inattentive when I code, as well.

      The solution is code audits, either by the author or another party, or simply taking the time to look at what you are doing when you start a statment that manipulates pointers or arrays. Quite often having another person take a look at the code suffices. I've found overflows and overruns in a few programs.

      I bet you don't like seatbelts (only poor drivers need them!) or hospitals (just for people who are careless and don't look after themselves!) either.

      No, but the OP's suggestion was analagous to requiring me to visit a hospital for a paper cut, when I could fix it myself with a band-aid.

      C does not cause buffer overruns. Hasty/lazy/etc. code does.

      --
      "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
    5. Re:You Sound Like by Mark_MF-WN · · Score: 1
      You can add ALL Java, Perl, and Python software ever written to your list. :)

      Besides, I asked how many -- one developer doesn't proves anything. The vast majority of C developers DO write code that permits buffer overflows.

      Unchecked buffers need to be eliminated for exactly the same reasons as spaghetti code -- they're usually harmful, and only software-development-supermen can get them right.

  101. Perhaps C will be superceded by D by rjshields · · Score: 1

    There was a programming language called B. Anyone still use that?

    --
    In this world nothing is certain but death, taxes and flawed car analogies.
  102. It's Nice by Mark_MF-WN · · Score: 1

    It's nice to see that some programmers can approach issues like this one without resorting to intelligence-sapping extremism. I wish I had a mod-point for ya.

  103. Killing the MS monopoly on the desktop by bizcoach · · Score: 1
    What's the point, actually? C# is not something new

    You're right. C# is Java with some relatively minor changes. I think that C# is an improvement over Java, but whether the improvements are significant enough to really justify what MS has done, to fork out a new language, that is certainly debatable.

    However whether C# is new or not, and whether it's an improvement or not isn't really relevant. What matters is that we need to make it easy for app developers to create portable apps which will run not only on the Microsoft Windows system but really anywhere. That's what the word "portable" in "DotGNU Portable.NET" stands for.

  104. This is a weird one by dnoyeb · · Score: 4, Insightful

    On the one hand, the article here is misleading. The slashdot news story it cites claims 'c' is dying, but the article that news story cites does not. So the cited story got twisted on slashdot.

    So now we have a new slashdot story running with the mistake...

    The majority of CPUs in today's world are not running desktops.

    Things with C
    Linux
    compilers
    Automotive
    engine controllers
    ABS controllers
    Airbag controllers
    Memory seat controllers
    etc...
    Calculators
    desktop BIOS and chipsets
    Cell phones
    etc...

    Most code written to run on the hardware is written in C. So the contention being refuted is faulty in the first place.

  105. Java vs C vs C# by jarich · · Score: 5, Informative
    A few thoughts....

    C# whips the tar off of Java (and most non-optimized C code) in most benchmarks. Why? Because it's running on Windows only for these benchmarks. Anyone remember IIS running faster than Apache because of MS taking advantadge of undocumented platform APIs?

    Do you think C# on Linux/BSD/*nix is going to be near as fast as C# on Windows? Think again. It may eventually catch up, but not before it gets a reputation for being dog slow. (See Java as an example).

    C is really fast. If you know how to optimize it, nothing can beat it (except assember or some special Fortran routines, if it works for you project). If you ~don't~ know how to optimize C really well, Java (anywhere) and C# (on Win32) can be as fast or faster. Usually is much faster, these days.

    Java runs, with very little effort, on every major OS and platform out there. (And yes, I do this for a living). I work at SAS (http://www.sas.com) and we ship the same codebase on Win32, HP-UX, HPi, Linux, Solaris, AIX, etc. The advances in the Just In Time compilers has made a huge difference in performance. (There are some differences in the major J2EE environments, but even that is addressable and minor compared to an entire product port).

    Yes, it's still true that a programming guru can write some smoking C code, but Joe Sixpack Programmer usually can't beat Java's performance. And yes, I'm talking big number crunching. At a prior job (at a biotech), we crunched Big Numbers (two month runs on a grid of machines) and Java did a very respectable job. We spent our time improving algorythms (from a bio point of view, not a C/ASM point of view).

    The C#/Mono crowd is spending a lot of mindshare in making sure that MS's latest language will run anywhere, and that's great. I am glad they are doing it and applaud the effort.

    But Java is far and away the fastest true cross platform language out there right now. It's got the best cross platform enterprise environments available. If you are looking the most speed ~and~ portability, the King isn't dead yet. :)

    1. Re:Java vs C vs C# by Anonymous Coward · · Score: 1, Informative

      Care to point us to a credible set of benchmarks for a real application or semi-realistic application that isn't bought by Microsoft or Sun? From my own benchmarks comparing java vs C#, I see jdk1.4.2 30% faster on real applications.

    2. Re:Java vs C vs C# by aschlemm · · Score: 1

      Another thought...Not directed at this post's parent:

      It's funny to see so many Java proponents dis C/C++ and yet Java owes its very existence to C/C++. My favorite question to people that extoll the virtues of Java is "What language do think is used for the Java Virtual Machine (JVM)?" I've done Java programming rather freqeuently for the nearly 8 years now and can appreciate what Java does for me. But in certain cases where I've needed near realtime performance and some serious scalibility for the projects I've been working on I'm using C/C++ in those cases.

    3. Re:Java vs C vs C# by justins · · Score: 1
      Do you think C# on Linux/BSD/*nix is going to be near as fast as C# on Windows? Think again. It may eventually catch up, but not before it gets a reputation for being dog slow. (See Java as an example).

      I actually trust the developers of "C# on Linux" (of course Mono is what you actually mean) infinitely more than Sun or the Blackdown people. See Java as an example. :p
      --
      Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
    4. Re:Java vs C vs C# by rcolquhoun · · Score: 1

      Care to point us to a credible set of benchmarks for a real application or semi-realistic application that isn't bought by Microsoft or Sun? From my own benchmarks comparing java vs C#, I see jdk1.4.2 30% faster on real applications.

      I believe microsoft can veto the publication of benchmarks relating to C#(via EULA)...hence all the published benchmarks favor them.

    5. Re:Java vs C vs C# by rcolquhoun · · Score: 1

      It's funny to see so many Java proponents dis C/C++ and yet Java owes its very existence to C/C++. My favorite question to people that extoll the virtues of Java is "What language do think is used for the Java Virtual Machine (JVM)?"

      IBM have a JVM written in java (jeode???)

      Even without proof against this is still not a good argument, the stuff in C/C++/ASM or whatever compiles to an pretty much all modern processors is just another form of p-code that is translated and executed in hardware rather than software. The only diff between x86 and bytecode or IL is that the latter were explictly designed to do this rather something forced on the chip maker to provide backward compatability.

      The underlying problem for compilation to x86 assembly is that the hardware does not guarantee constant clockcycles for instructions across processor generations ie P4 is faster in clockcycles comapred to P3 for some instructions and slower for others

      Hence the decision about what x86 instructions to use for optimal execution cannot be made at compile time without limiting to a single generation of an architecture

  106. Oh no not pointers void * by Anonymous Coward · · Score: 1, Interesting

    I learn up on C. All my text books have to say about pointers to void is: "Don't do it. No self-respecting person would half-ass their way through a problem with a hack like that. It's so bad, this is all we're going to say on it."

    Looking at code in the real world.... Well that's something totally different. It's like getting out of kindergarden armed with the certainty that people would never lie, because it's wrong, and walking into the world championship of poker. Because void * might not be every bit as common as bluffing in poker, it's not far off.

  107. And another apocryphal quote is born... by caudron · · Score: 2, Interesting

    The article is referring to the recent claim that Miguel said that "C is dead". The problem is that it's quoted out of context and is getting rehashed so much that people are gonna forget that it was never actually said.

    This article implies a great deal, but the reality is that Miguel never said C was dead. He said that to him C was dead, meaning that he intended to focus his programming time on C#. Pretty reasonable statement given that he's in charge of a project that's porting it to linux.

    Surprisingly to the language zealots among us, Miguel is allowed to write code in whatever language pleases him.

    --
    -Tom
  108. The point? by DrXym · · Score: 3, Insightful
    What is the point of a C which presumably has been stripped of low level control, pointers etc. to run on .NET? You don't even benefit from any speed advantage because you're running through an interpretter / JIT.


    Having seen side by side comparisons of J#, C# & VB running on .NET it's hard to see why multiple languages exist at all. Any reason for using one language over another has just about disappeared. It is the same code using the same assemblies, with slightly different syntax. The language itself has become an irrelevance.

  109. Reasons I like C by 0x0d0a · · Score: 1

    * C is mature and stable. Yup, there are some bad design decisions, but using C isn't quite like riding the current version of Java -- new idea, whoops, let's change that, oh wait, let's extend that...

    * There are good development tools for C. There is a good set of tools that have been built up over the years for analyzing and debugging C.

    * C doesn't impose a lot of resource overhead. I'm all for having safe languages, but Java is just plain fat when it comes to memory usage, and encourages a lot of practices (like rapid destruction and creation of objects) that tends to cause a serious CPU hit as well. Safe and *efficient* languages have, as a general rule, flopped in the marketplace.

    * C runs on everything. There are awfully few platforms for which there isn't a C compiler.

    There are a lot of Java apps out there. Yet, in my day-to-day use of my computer, I don't use a single Java-based program. Not one. I use a small number of perl and python scripts, a couple of bash scripts, and a vast quantity of C code. The C alternatives are faster and more memory-efficient. Plus, I've tended to come to believe that the average Java programmer experience level is lower than than of the average C programmer (simply because lots of Java people *started* coding with Java which puts an upper bound on experience).

    I admit that Java can be neat for some things (rapid application development/prototyping, lightweight distributed and network-using apps). It's generally not the sort of thing that sits on my desktop, though.

    It may be that more Java code is written each day now than C code, but since so much Java development is vertical market or custom development, I suspect that the overwhelming majority of lines of code *used* by people is C.

  110. Neede a clear demarcation between Mono and dotGNU by gangz · · Score: 1

    I didnot know the existence of the dotGNU project till this post. Whereas Mono had been relatively well known. Going through the project page, the first reaction I had, was that there is no clear boundaries about where dotGNU ends and Mono starts (or otherwise). For example, both dotGNU and Mono have a C# compiler. Now how would a future contributor decide on which one to contribute for ?I think it would be very good for both the projects if they could have a simple explaination about what they are trying to accomplish and where (and how) they differ from each other.

  111. Not to mention all of the Win32 SDK stuff still... by tjstork · · Score: 1


    Even Windows is still programmed best in C / C++ for shareware applications.

    --
    This is my sig.
  112. Re:Saying C will be killed by a runtime architectu by thenextpresident · · Score: 1

    "Saying C will be killed by a runtime architecture is like saying too many busses will eliminate sports cars" ...in the world of mass transportation.

    Take the quote in context, and it actually makes sense.

    Insightful? Insightful because you didn't read the original quote, which was completely misquoted, and completely taken out of context.

    --
    Jason Lotito
  113. Re:Neede a clear demarcation between Mono and dotG by Guardian+of+Terra · · Score: 1

    In fact, there are a lot of differences. Mono works fast on i386 and slow on * else - pnet works ~equal (but slower than mono in i386) on all platforms. Mono's c# compiler is written in c# and P.Net one is written in C. Mono is going to have python compiler, P.Net have C compiler. Mono uses GTK# bindings for gui and going to use wine for System.Windows.Forms - will be very compatible with MS but not portable or reliable. P.Net use portable (now windows and X) System.Windows.Forms, but it may be not that compatible with windows, using-native-code apps. There are a lot more of differences. And imagine, if you want to contrigute such project, you are going to be familliar with those things and even small differences may make huge difference to you.

  114. Please stop JAVA calling portable by CarrionBird · · Score: 2, Insightful
    JAVA only works on one platform, the JVM. And there are so many little differences in JVMs that most java apps of any size I've are anything but "write once, run anywhere".

    Also, if you want protabe C++ code, all you have to do is draw a firm line in your design between platform specfic and the rest of your code.

    --
    Free Mac Mini Yeah, it's
    1. Re:Please stop JAVA calling portable by Anonymous Coward · · Score: 1, Insightful

      I think I would need to agree. I had a project once I could not finish to spec. We were using Java because of familiarity (the other programers were more familiar with Java than C++) and we got to a point where Java did not support a feature we needed to implement. We had two options: 1) implement the feature ourselves in C and have our Java program access that code through the native interface (which by default makes it non-portable!), and 2) re-write our program in C++. We chose a third option, leave the feature out.

      Java tries to be cross-platform and it does so by having the virtual machine between the processor and the programs. C++ tries to be cross-platform in a different way. It gives you the ability to write semantically equivalent code for different processors without the need for a huge runtime (yes, C++ does have a small runtime).

      C++ suffers from the trying to please everyone disease which is why so much is implementation dependant. C++ also suffers from lack of support from vendors. If I wrote a Java compiler that did not support all of Java (at some revision) it probably wouldn't be called a Java compiler. By the same reasoning I could call all C++ compilers that don't support the whole C++ standard non-C++ compilers. My point is that language support in compilers should not used as a reason to say a language is not portable. It would be same as Java claiming to be cross-platform and then having only a JVM for Sparc processors... Not very cross-platform due to a lack of support... .NET is equally cross-platform as Java Mono and DotGnu are proving this. Unfortunately, the support looks slow enougth to be a non-factor... For all practical purposes, .NET is strictly MS.

    2. Re:Please stop JAVA calling portable by timeOday · · Score: 1
      ...and reimplement the "rest" of your code differently on each platform. Which is rather like defending a

      To say that C++ is cross-platform compatible is rather pedantic when C++ cannot open a network connection, spawn a thread, access a database, or create a window without the help of platform-specific libraries.

      It's hard to think of a language that *isn't* cross-platform compatible simply for flow control and data structure manipulation.

    3. Re:Please stop JAVA calling portable by CarrionBird · · Score: 1
      That's a little exaggerated, but I see your point. A lot of the things that there are no cross-platform libraries for, are things I would rather use the most effecient method for on each platform, wrapped in an interface that is the same on all ports so that the rest of my program works without changes.

      Java is great when you are not going to have an opportunity to build a port for every platform your app is going to be used on. But that benefit comes at a price. It's a trade off that makes sense in some situations, but given the oppurtunity, I would rather build a app that uses the methods that work best on each platform that it needs to work on. And use generic methods where I can elsewhere.

      Yes it takes a little more effort, but unless we're seriously under the gun here, whats the problem?

      In short, what I'm saying it C++ is cross platform enough for most (not all) needs.

      --
      Free Mac Mini Yeah, it's
  115. Language Piggy-Backing by SloppyElvis · · Score: 2, Interesting

    Ok, so I think the writing on the wall reads, "M$ will be requiring code to run through the .NET CLR", if it is to run on Windows.

    So, in response, we have C compiling to bytecode. But, Longhorn will require bytecode assemblies to be signed; I suppose that could be built into the compiler as well (else wouldn't we lose portability?)

    I was thinking along these lines a while back, and thought to myself, "What's to stop somebody from writing an interpreter for any language (I was thinking scripting at the time) that will run as a .NET app? [Ruby was on my mind]

    What's the impact of doing this, you ask? Well, if the interpreter itself is the signed certificate-backed secure executable, then any little scriptlet or homebrew app could be run without being digitally signed!

    To me that allows a fairly obvious circumvention of Palladium, and "trustworthy computing" is out the door.

    1. Re:Language Piggy-Backing by DukeyToo · · Score: 1

      Code access security controls what code can and cannot do, based on the identity of the code. As a machine administrator, or a network administrator, I can choose how little or how much to trust a .NET executable (for example a Script Interpreter).

      Thus, I have full control over what a script that runs from the Script Interpreter can do, because it cannot do anything that I do not allow the interpreter to do. Nothing is circumvented.

      --
      Most writers regard truth as their most valuable possession, and therefore are most economical in its use - Mark Twain
    2. Re:Language Piggy-Backing by SloppyElvis · · Score: 1

      Hmmm, I wasn't aware of that feature; it's nice.

      Still, I can think of a number of legitimate reasons for such an interpreter to be written that includes cases where you'd want to allow it access to file systems and networks and so forth (cross-platform network utilities in Perl, for example). Of course, you'd be taking your security risks by your own hand in that case.

      When a user installs a .NET exe, do they select access security during the install? I wouldn't guess that the default access level would sandbox every executable (though admittedly I don't know). Unless such a decision is forced during install, many users would fail to secure their machines (as is the case today).

      Aside, much of the fear of Palladium in this forum has centered around .NET crushing the home-brew app writer. Circumvention may be the wrong term here, but I believe this could be a reasonable way to allow home-brew apps to continue without mandating certs.

    3. Re:Language Piggy-Backing by DukeyToo · · Score: 1
      .NET executables do not need to be installed, they can simply be copied. If they are installed, then I do not know if the install app can alter .NET security profiles.

      There is also something called no-touch deployment, whereby the executable is executed from anetwork location. Code access security is also influenced by the location from which the executable is run. So, if I run an executable off the internet, it will have very few permissions. If I run it off the local network, it will have slightly more. Local executables have the most permissions by default.

      With regard to concerns over Palladium, I will refer you to a FAQ which explains how certification is NOT required.

      --
      Most writers regard truth as their most valuable possession, and therefore are most economical in its use - Mark Twain
  116. Re:Importance of compiling C to portable executabl by Anonymous Coward · · Score: 0

    Flat C code can be packaged into a DLL, C++ code can be made either a COM component for interop or it can be made into a mixed mode assembly module with a proxy clsss. Next.

  117. tsk...tsk... by Anonymous Coward · · Score: 0

    lazy coder alert.

  118. ridiculous by meshko · · Score: 1

    What? C is not dead because it now supports what? Most people I know have never heard about that "il" things you are mentioning. I assume this is related to .NET... ah, whatever, another moronic article on Slashdot.

    --
    I passed the Turing test.
  119. Re:Neede a clear demarcation between Mono and dotG by gangz · · Score: 1

    That was a lucid explaination, but what you are missing out is that there are so many implementations of the same thing. It is almost like that people have gone crazy about the specification from Microsoft (this is a rarity in the usually anti-Microsoft open source world). Would it not make more sense if the requirements and the specs are clearly marked out and both the parties decide whether (for eg.,) to do the drawing yourself (as in dotGNU) or rely on other libs(winelib or GTK#) for Mono.

  120. or wxWindows for instance by Nicolay77 · · Score: 1

    I would say the same about C++ and wxWindows.

    As soon as I learned it, I did throw Java out the window.

    Compared to Java, C++ is fast as hell!!

    --
    We are Turing O-Machines. The Oracle is out there.
  121. Want the wealth of existing C code with .NET? by hoggy · · Score: 1

    Erm, just compile the C code to a shared library, load it into the .NET runtime and interact with it via the P/Invoke machinery. You've never had to compile C to IL in order to run it from .NET.

    If you look closely at Microsoft .NET you'll find that it's mostly just a set of wrappers around the standard Win32 DLLs.

  122. What about LLVM? by sabre · · Score: 2, Interesting

    Check out LLVM: http://llvm.cs.uiuc.edu/

    It gives the advantages of bytecode compilation (linktime & runtime optimization, JIT compilers, etc) to both C and C++ (using the GCC parsers). In addition it has a powerful interprocedural optimizer, so it generates code that truely thwomps GCC in some cases. :)

    -Chris

  123. and wxWindows too by Nicolay77 · · Score: 1

    Although it's not used by pixar.

    --
    We are Turing O-Machines. The Oracle is out there.
  124. Pitiful number of APIs? by BRSQUIRRL · · Score: 2, Informative

    would you rather program against the pitiful number API's that come with C#

    Completely ignoring the fact that no APIs could "come with" C# because C# is just a one of many languages that compiles to .NET CLR bytecode (thanks once again for showing your complete ignorance of .NET)...I have written a lot of .NET apps and have yet to find myself needing some functionality not already provided somewhere in the .NET class library. It is (by far) the richest set of application APIs I have ever developed with.

  125. In what language would u write GNOME and its Apps? by rolling_bits · · Score: 1

    C ?

  126. Re:Neede a clear demarcation between Mono and dotG by Guardian+of+Terra · · Score: 0

    sure; they both have compiler, bytecode interpreter/jit and class library which are different implementation of one thing. You're right about drawing yourself/relying on other libs. and i guess, they made crazy on specifications because free software still does not have java-alternative, and this was a good chance of getting one.

  127. Dr Watson by NigelJohnstone · · Score: 1

    "An unhandled exception prints a nice stack trace to stderr which makes it easier for you to figure out what went wrong. "

    Dr Watson does this.

  128. The Life of .Net has been greatly exagerrated by photon317 · · Score: 1


    Only some poor fools in the windows community, and some hopelessly insane Mono developers, along with a cadre of self-styled software journalists and gurus, believe that .Net stands a chance. The rest of computer science will continue to move on without you, and we always take C wherever we go, it is our foundation.

    --
    11*43+456^2
  129. JCL by Detritus · · Score: 1

    I used to keep a magic JCL deck in my desk at work. I didn't understand what was written/punched on it. I just knew that it had the right incantations to make my batch jobs run on the center's 360.

    --
    Mea navis aericumbens anguillis abundat
  130. Re:Saying C will be killed by a runtime architectu by Llywelyn · · Score: 1

    Exactly.

    My experience has been that the people who are saying "C is dying/dead" don't do any low-level or back end programming.

    What's happening is that languages such as Java, C#, and Python are taking over the front-end design because they can be quickly prototypes, but there are still areas where you need speed and efficiency--that's where C comes in.

    Starting many projects in C is premature optimization, but there are some where C is just the Right Language(TM) and I don't think that will change in the near future.

    Then, of course, we could discuss how Objective-C is alive and well, or how the optimization step for Python is to write the code in C...

    --
    Integrate Keynote and LaTeX
  131. cross platform libraries by hak1du · · Score: 2, Insightful

    Yes C++ as a language has compilers for many platforms which are pretty much compatible, but the degree of compatibility of these compilers don't mean much since the compatibility of an application is a totally different story. An application written in C++ will be using some kind of library, for DB access, for GUI, for network operations etc... Most of the times, these libraries are not cross platform.

    Well, they are cross-platform if you are writing a cross-platform application, and they are not cross-platform if you don't.

    Furthermore, the kind of cross-platform compatibility people primarily worry about with C++ is for libraries: it is things like regexp libraries or XML libraries that are going to be reused across platforms; GUI and I/O parts of applications are best developed in a platform-specific manner.

    Or they have to be extended with platform spesific code.

    For some reason, Java marketing has created the notion that cross-platform development matters a great deal, but that is nonsense. Cross-platform development (and sandboxing) matters for browser applets, a market that Java has largely ceded to Flash. For desktop applications and server-side applications, cross-platform applications don't matter at all.

    Writing in a cross-platform toolkit and adding a small amount of platform-specific code is actually far superior to the 100% cross-platform approach: it is nearly as easy to port the application between platforms, but the application becomes enormously more usable by following platform-specific conventions and offering platform-specific functionality.

    What it comes down to is that C++ is a better language than Java for cross-platform development. C# may eventually supplant C++ in that regard, because C# is simpler and safer, but still offers C++'s access to platform-specific features. But Java's religious insistence on what they incorrectly call "cross-platform" support actually is counterproductive.

  132. Mono future by hak1du · · Score: 1

    IMHO, java is really successfull in cross platform software development, without much work i can make java software work on another platform. If C# had the same future, i'd be really glad, since i like it too,

    First of all, Mono isn't trying to achieve Java-style cross-platform support--many of the people working on, and using, Mono have rejected Java because they don't like Java's cross-platform strategy.

    In the end, Mono will probably give you cross-platform functionality no worse than Java's, through its .NET libraries. But Java's cross-platform support is really not very good: Linux is a second class citizen.

    With Mono, in addition to its .NET compatibility, you get an independent set of OSS APIs based on Gnome. If you use those, you are creating native Gnome applications. But because Gnome also runs on Windows and OS X, you also get cross-platform support for those applications.

    In different words, Mono gives you two cross-platform choices: .NET, which works better on Windows but runs on Linux, and Gtk#, which works better on Linux but runs on Windows. The official Java platform only gives you one choice, Swing, which doesn't really integrate perfectly with the desktop on any platform and whose implementation shows a strong bias towards Windows.

    but as Microsoft works harder and harder on .NET i just don't believe MONO guys can keep up with it. C# 2.0 and longhorn will be a huge step forward for .NET technologies, and i don't thinkk MONO team can find resources to keep up with MS.

    Microsoft has to be pretty open about the features that come in C# 2.0 and Longhorn. And the way it looks today, OSS will be supporting those features before Microsoft even releases their products.

  133. Next Gen of C by Ironsides · · Score: 1

    So when does C++++ (or C+4,C4+ come out?).

    --
    Fly me to the moon Let me sing among those stars Let me see what spring is like On jupiter and mars
  134. Mono and DotGNU - what project to contribute to? by bizcoach · · Score: 1
    For example, both dotGNU and Mono have a C# compiler. Now how would a future contributor decide on which one to contribute for?

    • DotGNU is part of GNU, Mono isn't. So, if you'd like to support the GNU project, that is a reason to contribute to DotGNU Portable.Net
    • Learn from the better compiler architect. Rhys, the chief architect of DotGNU Portable.Net was an experienced compiler architect already before starting to work on Portable.Net; he's also the author of treecc, a great aspect-oriented tool for compiler construction.
    • Choice of implementation language: Portable.Net's compilers are implemented in C, while Mono's C# compiler is implemented in C#. If you think that working on a compiler for a language is a good way to learn that language (that was Miguel's stated reason for implementing, in C#, the C# compiler project that eventually became Mono's C# compiler), maybe you should contribute to Mono.
    • Do you believe in the power of large corporations? Mono is sponsored by Novell, Inc and has several people working on it full-time, and the Mono folks can afford to spend money on PR, too. That is clearly an advantage, at least for now. However, there are strong economic reasons why in the long run, platform projects that are controlled by a corporation should not be able to progress as quickly as true community projects like DotGNU or the Linux kernel. (Email me - nb AT pobox DOT com - for a draft of an economics paper on these matters.)
    • The threat of patent-based attacks. There are several reasons why DotGNU is less vulnerable to patent-related threats than Mono is. First of all, the difference in licensing is relevant. Mono's libraries are licensed under an X11-style license while the DotGNU project uses GPL with a linking exception, just like Classpath. Both are Free Software, both libraries can be used from proprietary software, but Mono's licensing terms are compatible with third-party demands for patent royalties, while DotGNU's licensing terms are not compatible with that. This means that when you contribute to Mono and someone has a patent and says "pay royalties!", the result is that Mono suddenly stops being Free Software. With the kind of licensing used by the DotGNU project, patent holders cannot require the payment of royalties (because that would be incompatible with the GPL) and if they say "DotGNU must not implement that at all" that'd be an antitrust violation, rendering the patent unenforcable and hence invalid. The worst that can happen to DotGNU on the patent front is that MS might say "don't use our patented APIs", but even then MS can't stop me from still distributing the code on a public ftp server since I'm in Europe, and around here patent law isn't nearly as broken as in the US. Even in the US, if those API patents are granted and MS tries to enforce them against DotGNU, it should be only a question of time until those silly API patents of Microsoft's have been desclared invalid by a US court of law. On the other hand, Mono project leader Miguel de Icaza has stated that if MS says that a paid license from MS is required for distributing Mono code implementing those patented APIs, Novell would buy such a license. This would mean that the affected parts of Mono would stop being Free Software / open source, since it would no longer permitted to freely redistribute them without buying a license from Microsoft first. In other words, if you crontribute code to Mono's library and Microsoft says "we have a patent", Novell will give in immediately and not fight for the freedom of the code that you have contributed. DotGNU on the other hand is part of GNU, and the Free Software Foundation will fight very hard to make sure that code which you contribute remains Free Software.
  135. the problem with C... by hak1du · · Score: 1

    The problem with C don't go away by supporting it on .NET. The problem with C is its type system and runtime, which are full of holes. One consequence of this is the large number of security problems that C-based system software has (e.g., caused by buffer overflows).

    Unfortunately, those problems aren't fixable with better implementations. We have had safe, error-checking C compilers for many years. The problem is that they impose a significant runtime overhead because C semantics make it unnecessarily hard to do error checking (contrary to C mythology, the flexibility of pointers doesn't buy you anything in performance or expressivitiy). Worse yet, they expose the fact that many C programs rely on unportable or undefined features of the C language.

    C isn't dying and it won't be dying. But it should. And, sadly, supporting C on .NET won't fix its problems because its problems are deeply encoded in the language definition and in the programming practices of millions of C programmers who keep grinding out unportable code that happens to work most of the time on the platform they are using.

    1. Re:the problem with C... by Un+pobre+guey · · Score: 1
      Hear, hear!

      Stop using C, now! Switch to Multiparadigm C++. Everything you want from C, with less code and more reliability.

  136. MOD PARENT DOWN -- TROLL by Anonymous Coward · · Score: 0

    You are obviously a troll. The 286 does not have a pipeline, idiot. The 80386 was the first Intel processor to use pipelining, but it was severly limited, and was only 5 stages. The i486 was the first Intel processor to really use full-blown pipelining, and was able to execute some instructions in a single clock cycle.

    Look here

  137. Just let it die by Tom7 · · Score: 1

    I'm not a big fan of C#, but I think we should let C die for application development. It just makes you write too much code, has questionable performance benefits, and is ripe with security problems.

    I am excited about the CLI, though, because it means I will be able to write "native" code in any number of much better languages!

  138. Why not by plopez · · Score: 1

    write a comiler which translates IL to ANSI C? At which point .net would be truly cross platform. Or is this too simplistic? I know that Eiffel compiles to C which can then be compiled using gcc, which runs on many if not most platforms.

    THoughts on this?

    --
    putting the 'B' in LGBTQ+
  139. No! Let it rest in peace! by jonadab · · Score: 1

    Why keep C on life support? C was designed for computing in an era when every
    byte mattered and you would store some numbers in 16 bits and others in 32,
    depending on how large they would probably get, an era when you would manually
    allocate each piece of memory and free it when you were done because you didn't
    want to have any allocated that you didn't need, not even until the end of a
    block of code, an era when CPU time was so precious that garbage collection
    was considered expensive and wasteful, an era when, in short, the computer's
    resources were so valuable that you would spend programmer time willy nilly to
    conserve them. It's an anachronism, a language that *needs* to fall into
    disuse (except for a few inherently low-level tasks like writing bootloaders
    and kernels), and the sooner the better. Portability is not the language's
    only (or even its most important) weakness! Do you really want to continue
    to have to comb your application source for every single malloc and hunt down
    the corresponding free, to doublecheck every buffer to make sure you've
    checked its bounds every time you read or copy anything into it, and to write
    pages and pages of code where a paragraph would get the job done in a more
    modern language? Do you really want to have to continue to construct simple
    structures like lists *by hand* using pointers, when in other languages
    they're a fundamental data type? (Yes, there are libraries now to handle
    some of these things, sort-of, but the language just isn't geared that way;
    it's geared toward low-level bit-fiddling and going through the programmer's
    time like water in order to conserve the computer's resources.)

    I know you have fond memories of the language, and surely it was good in its
    time, but its time has come -- and gone. Sooner or later you've got to let
    it go. Say a nice eulogy and let's get on with our lives now.

    --
    Cut that out, or I will ship you to Norilsk in a box.
  140. Garbage Collection in C by hal2814 · · Score: 2, Interesting

    I've been reading through this post and one thing irritates me. Everyone is acting like C has no garbage collection facilities. While garbage collection is not built into the language, there are several garbage collection libraries that can be linked into C. In fact, most of them merely replace malloc with some garbage collection code and replace free with a do-nothing routine. Linking the garbage collection libraries into the C code automagically sets up garbage collection and will allow you to recompile existing code with garbage collection enabled. Here's a sample library (first result searching 'garbage collector c' in Google):

    http://www.hpl.hp.com/personal/Hans_Boehm/gc/

  141. SOMEBODY MOD THIS FUNNY!!!! by waferhead · · Score: 1

    ;-) Great comeback.

  142. Screw .NET, do it with bytecode (JAVA) by pottymouth · · Score: 1


    Why the heck would I want to compile the great and venerable C language down to a script that only runs on the Evil Empires OS?

    It took less than twelve weeks for myself and 2 others to write a compiler that would compile C into a JAVA class file. It was a fairly complete representation of the basic language and worked pretty well (ok it's a school project, but still). There's got to be some professional compiler people that have done this too. Of course C is so portable to begin with (when written well) why bother. Just compile it again.

  143. In one word (or acronym :) by hummassa · · Score: 1
    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  144. Java GUI APIs by ttfkam · · Score: 2, Interesting

    Nothing is static. That was my complaint about the standard C library. It is static... stagnant... showing its age.

    This does not diminish the fact that AWT was the first Java GUI API. It had limitations. It was redesigned to be truly cross-platform and dubbed Swing. As far as the API is concerned, I happen to like the Swing library. Is it "THE ONE TRUE GUI API?" Of course not. Nothing is or ever will be. It was the best they could come up with at the time. Now, when someone learns the standard Java GUI API (or just about any other Java API for that matter), they can transfer those skills to other Java projects much more easily than C coders can in C projects.

    SWT? A nice start. It is not as complete, does not run on as many platforms, nor is as widely used as Swing. But it shows promise. In five more years, who knows? That's the point. Right now, there is a standard API that everyone knows and other APIs (that aren't drastically different from the AWT/Swing API by the way) being tried out to find better ways of doing things.

    Mono's choice of GTK# is in my opinion a bad move. It's also unfortunate that Microsoft hasn't opened up the APIs for the Windows GUI libraries. I understand their reasons for doing it (Microsoft patent threats), but the culture of C is too strong. Instead of writing a new, GUI toolkit agnostic interface API, they intimately tied it GTK.

    C and the programming culture it fosters is building on sand; New APIs are constantly (and in my opinion, unnecessarily) being written all of the time, but there's no common base for others to work on nor to use as a base API design reference. Imagine how much more software would be written if folks didn't have to battle over GTK/Qt, MySQL/PostgreSQL/ODBC client libraries, ALSA/OSS, etc.? Would it be so terrible to tell people, "OpenGL is the standard API interface for 2D graphics in C. How you implement the OpenGL layer is up to you, but use the standard header files so that people can just recompile/relink to use a different implementation.

    Don't think it's necessary? Let's look at the history of UNIX, the original C program. The API wasn't standardized and set in stone. Different vendors went their own way in an attempt to lock the others out of their turf. UNIX programs commonly became a mess of #ifdef statements. The Windows came in touting a common API for Windows with COM. Any language (well, the common ones... VB, C, C++, etc.) could use these objects. They had a well-defined API. New implementations (eg. Perl for Windows) could be modified to access these objects as well. It didn't matter what language the COM object was written in. It didn't matter what language you were using. Write to the interface and be done with it. COM had warts. Everything does. .NET fixes many of those warts.

    The C community on the other hand just sticks its head in the sand and collectively says, "Look! They didn't do it perfectly. They suck! We rule!"

    The C community should be saying, "Look! None of us did it perfectly. Let's make our baby better by taking some of their good ideas and incorporating a bunch of our own."

    Mono and Java have warts, but at least they're trying. What's C got show for thirty years? Variable length arrays in function declarations? That is the best thing anyone could come up with for C99? Hey folks! There's an elephant in the corner! It's name is "incomplete standard library." I know no one wants to talk about it, but it's there and taking up too much space at the party!

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re:Java GUI APIs by Anonymous Coward · · Score: 0

      Umm, the fact that the C libraries don't change is a good thing. See, in the C world, we like to strive for something called "portability". If the standard library keeps adding new features, it kinda makes it hard to compile new programs on old platforms. The fact that the C standard hardly changes is intentional. If you really want some fancy functionality, the great thing is that it also has to be written in this lowest common denominator fashion, and can usually be backported easily enough (unless it uses some fancy low-level functionality, in which case it probably includes assembly code somewhere anyway).

      Basically, C could be fine with no standard library at all. In fact, one of the targets for C included embedded platforms where implementing even C's full standard library is overkill. This is specifically addressed in the standard, so that you can use a slimmed down version of C. Things like stdio are nice abstractions, but notice how it enforces the will of Unix upon platforms where the stdio paradigm of byte streams doesn't necessarily make sense. Then you have to have another set of APIs to work with I/O anyway.

    2. Re:Java GUI APIs by ttfkam · · Score: 1
      Umm, the fact that the C libraries don't change is a good thing. See, in the C world, we like to strive for something called "portability".

      You'd better laugh when you say that. Open up just about any C program over 1000 lines long. Do you see #ifdefs? Are they for avoiding cross-target compilation issues? So much for portability.
      If the standard library keeps adding new features, it kinda makes it hard to compile new programs on old platforms. The fact that the C standard hardly changes is intentional.

      Yeah, I know it's intentional. That's the point of my argument. The same is true in Java as well. A program will state "requires Java 1.2 or above" or "requires the use of custom ImageI/O SPIs for formats beyond JPEG and GIF." As long as you state the version, you're covered. People write to a newer API than what you have running on your server? Congrats! You are in the same boat we are now with Qt libraries, Gnome libraries, OpenGL drivers, and ODBC interfaces. API version conflicts have nothing to do with this discussion.

      Take a Java program at least 1,000 lines long. Does it run on the equivalent version of the JVM on Linux, Mac OSX, Windows, etc.? Does it run in the IBM build as well as the Sun JVM? Yes. Why? Standardized API. Period.
      Basically, C could be fine with no standard library at all. In fact, one of the targets for C included embedded platforms where implementing even C's full standard library is overkill.

      Look up embedded Java. You may be surprised.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
  145. Re: I find C++ very portable by Qwavel · · Score: 3, Informative

    C++ is very portable if you choose compilers and libraries that are standards compliant and portable, which is now easy.

    VC 7.1 (finally), GCC 3.2, the new Intel compiler - these are all very compliant with the standard. And remember that GCC, though not yet well optimized, runs almost everywhere.

    The C++ Standard Library, the boost libraries, wxWindows, Qt, + 100 other libraries are all cross-platform.

    Now compare this to the huge amount of work required to 'port' #develop from Windows to Mono.

    All that's missing with C++ is a processor independent intermediate code, and that's coming in GCC 4. It's called LLVM.

    Tom.

  146. didn't you RTFA? by bizcoach · · Score: 1
    The only reason any claim at all for .NET portability can be made is because of Mono. and thats not even a Microsoft project.

    Didn't you RTFA? The topic is Portable.Net which works on more platforms than Mono does.

    1. Re:didn't you RTFA? by NigelJohnstone · · Score: 1

      "Didn't you RTFA? The topic is Portable.Net which works on more platforms than Mono does." .NET makes no portablility claim, its a Windows product. We've been through this before with portable MFC from third parties. Why would you invest in cross platform software, where the company that makes it doesn't make it be cross platform, and its only third party clones that fill the hole? Why wouldn't you opt for a proper cross platform system where the supplier intentionally writes it to be cross platform?

  147. couldn't resist by stephenisu · · Score: 3, Funny

    It is now official - Netcraft has confirmed: C is dying Yet another crippling bombshell hit the beleaguered C community when recently IDC confirmed that C accounts for less than a fraction of 1 percent of all languages. Coming on the heels of the latest Netcraft survey which plainly states that C has lost more market share, this news serves to reinforce what we've known all along. C is collapsing in complete disarray, as fittingly exemplified by failing dead last [samag.com] in the recent Sys Admin comprehensive networking test.

    You don't need to be a Kreskin [amazingkreskin.com] to predict C's future. The hand writing is on the wall: C faces a bleak future. In fact there won't be any future at all for C because C is dying. Things are looking very bad for C. As many of us are already aware, C continues to lose market share. Red ink flows like a river of blood. FreeC is the most endangered of them all, having lost 93% of its core developers.

    Let's keep to the facts and look at the numbers.

    OpenC leader Theo states that there are 7000 users of OpenC. How many users of NetC are there? Let's see. The number of OpenC versus NetC posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetC users. C/OS posts on Usenet are about half of the volume of NetC posts. Therefore there are about 700 users of C/OS. A recent article put FreeC at about 80 percent of the C market. Therefore there are (7000+1400+700)*4 = 36400 FreeC users. This is consistent with the number of FreeC Usenet posts.

    Due to the troubles of Walnut Creek, abysmal sales and so on, FreeC went out of business and was taken over by CI who sell another troubled OS. Now CI is also dead, its corpse turned over to yet another charnel house.

    All major surveys show that C has steadily declined in market share. C is very sick and its long term survival prospects are very dim. If C is to survive at all it will be among OS hobbyist dabblers. C continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, C is dead.

    Fact: C is dead

    --
    Sigs? We don't need no stinking sigs!
    1. Re:couldn't resist by spudgun · · Score: 2, Insightful

      Fact: C is dead
      Umm Doesn't that Linus guy write his little project thing in C ?

      what is it called again ?

      --
      Type unto others as you would have them type unto you.
    2. Re:couldn't resist by stephenisu · · Score: 1

      I wanna smack the person who modded this up Insightful. It was a joke. The parent to my post requested it, so I did it.

      As for your post, this fake flame war is hurting my head :)

      --
      Sigs? We don't need no stinking sigs!
    3. Re:couldn't resist by JDWTopGuy · · Score: 1

      That's not insightful, that's "-1, Didn't get the joke".

      And I think it's called FreeBSD.

      --
      Ron Paul 2012
    4. Re:couldn't resist by Anonymous Coward · · Score: 0

      You IDIOT!

  148. Re:Hi. You don't know what you're talking about. B by John+Courtland · · Score: 1

    I'm sorry, I assumed he was referring to the x86 platform, which obviates many of your points. Then, I was referring to the initial creation of the language. If Java doesn't exist, you can't make it in itself. The first Java compiler was written in C most likely. I didn't know about gcj, so my fault there. And your last comment and subject line make you a cock. If you ever said that to my face you would be eating your own endtrails in a sort of "comically macabe" way

    --
    Slashdot is proof that Sturgeon's Law applies to mankind.
  149. Sounds like a incorrect statement by MrUnknown · · Score: 1

    "The real question is this: would you rather program against the pitiful number API's that come with C#, or the huge Free Software diversity that you get with C?"

    well, with .NET in the name of the software shouldn't it follow the .NET way? That means no matter what language it is programmed in you can make use of it with another language?

    That statement is made incorrect if it is not possible to use the C coded libraries from C#.
    However, they can (and probably are) be refering to communicating with libraries on the local system written in C. In that case, you can still use the libraries from C# you just have to import them in a "Special" way. Almost the same as making your own headers for the library. Whereas with the C version you migt be able to just use it because the header already exists. This problem has been around with using any library with any other language, so nothing new. Microsoft has done it this way with C++.NET. C++.Net can interface with libraries with little effort.

    The solution? Just make a wrapper library in C.Net and use it from C#.Net. Better yet, reproduce the library entirely in the managed language. Linking to outside libraries causes platform dependancy and kinda kills the point of the whole .Net idea (yes I know MS probably wont go around supporting other systems with .Net but they have advertised its cross platform abilities. Another reason why I don't think they will mess with Mono and other such projects.)

    What I predict: .Net will fail in linux. Why? because Microsoft invented it. Thats the only reason. But there is a solution coming along that will probably be accepted by the linux community. perl6 and the parrot engine. From what I have read about the parrot engine, it works almost just lile .Net. Can run any language (After being adapted of course), has a Intermediate Language (its own ASM, like MSIL). Any language can use any libraries in any other language coded for it. I like this technology and it would be great to program for linux no matter what language you want to use.

  150. Ya don't say? by Anonymous Coward · · Score: 1, Funny

    For 87 cents a day, you can buy a poor /.er a dictionary

    How much does it cost to make him use it?

  151. server side cross platform important too by GunFodder · · Score: 1

    It sounds like you haven't done much server-side web development. One big benefit of Java is that you can write and package applications that will run on multiple server platforms with virtually no modification. For real companies this is a substantial benefit; it means that you aren't locked into a single vendor for your infrastructure.

    The absolute best you can hope for with C++ is the ability to recompile successfully on a different server. If the developers actually have access to your platform then you have a chance that their packaging will compile successfully; but this has not been my experience. And since the number of cross-platform libraries is limited a lot of wheels have to be re-invented.

    1. Re:server side cross platform important too by hak1du · · Score: 1

      It sounds like you haven't done much server-side web development.

      Another incorrect conclusion you have reached.

      One big benefit of Java is that you can write and package applications that will run on multiple server platforms with virtually no modification. For real companies this is a substantial benefit;

      No, it isn't. Anybody that deploys the same server software on multiple platforms within the same organization needs to have their head examined because that creates unnecessary costs for no benefit.

      Furthermore, the "with virtually no modification" is just wrong. If you want Java applications to run well on, say, Linux, they require plenty of modification: they require platform-specific packaging, desktop integration, integration with Linux's service manager, and lots of other features. The only reason Java packages require "no modification" to run on Linux is because their developers don't bother packaging them right--they just throw out some junk and leave dealing with the mess up to the Linux users. That is not "cross platform support with no modification".

      it means that you aren't locked into a single vendor for your infrastructure.

      You can achieve the same thing by just targetting UNIX/Linux/BSD. Those systems are so interoperable that people don't even think of it as "cross-platform programming", and you have a choice of half a dozen vendors.

      The only time cross-platform programming enters the mix for server-side applications is if you also try to target Windows as a server platform.

      The absolute best you can hope for with C++ is the ability to recompile successfully on a different server. If the developers actually have access to your platform then you have a chance that their packaging will compile successfully; but this has not been my experience.

      I'm sorry that you can't figure out how to do this.

      And since the number of cross-platform libraries is limited a lot of wheels have to be re-invented.

      Anything that targets both Windows and UNIX-family systems is going to have serious limitations. That is true for Java just as much as it is for C++ cross-platform libraries. There is an easy solution to that: remove Windows from your mix of target platforms.

      But even if you insist on using Windows, C++ still gives you a lot more options than Java. For example, instead of cross-platform toolkits, you can just use Cygwin or uWin to target Windows with a completely UNIX-based codebase.

    2. Re:server side cross platform important too by GunFodder · · Score: 1

      Real companies have heterogeneous server environments. This is an ugly fact, but a fact nonetheless. If you are saying that there is a cost benefit to buying new homogeneous hardware rather than reusing older hardware then I think the real problem is your software isn't cross-platform.

      Real web apps don't need desktop integration; they are accessed from the browser. I think most users would rather have additional tool features than have a development team spend time packaging an app for the myriad GUI managers out there.

      I don't think you have ever used an Application Server. This J2EE hosting environment provides a standard platform with many different implementations (both commercial and GPL). It runs on Linux, all the Unixes that I know of and Windows to boot. It does just about anything you would ever want to do from a web-based app.

      I'm not sure what limitations you are referring to when it comes to cross-platform. I haven't seen any demand for floating-point number crunching or even fast disk access. Instead I see the need for forms, data source access (like databases and directories), email access, network access, etc. Access to these components is streamlined by standard Java libraries and implemented universally by Application Servers.

    3. Re:server side cross platform important too by hak1du · · Score: 1

      Real companies have heterogeneous server environments.

      Of course, real companies have heterogeneous server environments. But real companies generally don't run the same application on multiple platforms. They run heterogeneous environments because, say, they want to run Oracle on a Sun Enterprise server, Apache on a BSD box, legacy code on a mainframe, and some middleware on a bunch of Windows machines.

      In any case, even if a company were foolish enough to run the same code on multiple different platforms, they would still be better off with C++ code compiled specifically for each platform. For example, they can buy and install Oracle for both Windows and Solaris.

      Real web apps don't need desktop integration; they are accessed from the browser.

      Real server apps benefit from local GUIs for configuration and management. They also benefit from tight integration with local management APIs and GUIs.

      I'm not sure what limitations you are referring to when it comes to cross-platform.

      With Java? Installers, integration with service managers, integration with package managers, integration with system management APIs and tools, access to memory mapped I/O, raw device access, etc. Java falls short on all of those, and many more.

      Access to these components is streamlined by standard Java libraries and implemented universally by Application Servers.

      To the degree that Java even provides this kind of functionality, it provides it in a way that is incompatible with the platform it runs in. Sorry, that isn't cross-platform support, it's a strategy by Sun to replace other people's platforms with their own platform.

  152. Don't ya hate it by wiredog · · Score: 1

    when you post as AC, and it gets modded up?

  153. Cool, could you give me a quick example... by iamacat · · Score: 1

    ... of using it to cleanup things like sockets and files? Could be a huge clean up of my Java code if it works.

  154. Nope. by Anonymous Coward · · Score: 1, Interesting

    I always post as AC.

    I like the aesthetic of the voice from the void. The only information it carries with it is its message.

    Plus, it's trivial to dribble out stuff that gets modded to +5 when you can start at +2. As an AC, even having something you think worthwhile isn't enough. Their's timing and positioning to consider.

    Then there is the positive reinforcement factor. If people see stuff as modded up +5, that's also decent, from an AC, they might be more likely to browse AC's when they're modderating. Which might slightly increase the variance of popular ideology in this venue.

    Anonymous isn't just for cowards anymore.

  155. C Is Alive? Somebody Kill It! by Vagary · · Score: 1

    Is that why Unix is so far behind Windows in usability?

    Seriously, though: the Unix philosophy emphasises little modular tools over monolithic applications, right? Shouldn't one of the chief advantages of this be that small, non-speed-critical apps can be written in high-level languages? But for some reason just because all the innards and libraries are written in C/C++ (as they should be), many open source coders decide that they should write applications running on top of those innards in the same languages.

    Look, just because GTK is written in C, doesn't mean all the Gnome applets need to be! Same goes for Qt and C++. Hell, even Perl would be better! I'm tired of trivial apps causing memory faults. If it were written in a high-level language, I could just go in and fix the errors without having to wade through all this function redirection and reinvention of wheels.

    I thought the open source community was supposed to like scripting languages? What's wrong with you guys?

  156. Crush Scares Me by Vagary · · Score: 1

    Crush seems to have an awful lot of overhead for an OS language.

    Oh, I see that it has unsafe pointers for when you want to avoid garbage collection, right? But wait, doesn't that make it an unsafe language?

    And it's nice that you can switch between dynamic and static typing, because I sure as hell wouldn't want type inference in my kernel, but can the safety checks be done statically? I guess not, that'd be undecidable, right?

    If Crush has "no primitive types or constructs", what's this "raw core" the Introduction talks about?

    Do these guys actually have any idea what they're doing? Designing a modern programming language and designing an operating system are both monumental tasks. I hope they're at least having fun...

    1. Re:Crush Scares Me by maw · · Score: 1

      Why wouldn't you want type inference in the language used to implement your kernel? It can be accurately performed at compile time, you know.

      --
      You're a suburbanite.
    2. Re:Crush Scares Me by be-fan · · Score: 2, Insightful

      What are you talking about?

      Unsafe pointers are for the kernel to use, not userspace apps. Its okay if the kernel can crash the system, not if userspace apps can do so. Userspace apps cannot use unsafe pointers.

      You don't switch between static and dynamic typing. Rather, you have dynamic typing, and optionally add type declarations in places where you want to tighten the interface or improve performance. There will be some runtime type checks, but modern compiler analysis can eliminate most of those checks. And what's wrong with type inferencing in your kernel? Type inferencing all happens at compile-time!

      And the "raw core" they're talking about is not a low-level, close-to-hardware core, but a conceptually primitive core. The idea is that there is a simple base language to which both high and low level features can be added.

      Strictly, Crush will have more overhead than C. However, given a good compiler, and well-written, straight-forward code, it is possible to achieve close to C performance for high-level languages like Crush. In some cases (things like generic data structures, where specializations can be used) performance can be even better.

      Also note that while a kernel written in Crush might be 10-20% slower in raw performance, it makes up for it in other ways. For example, system calls won't have a huge overhead (hundreds of clock cycles on most modern kernels). Data doesn't keep having to be copied around. You don't have to put things like the X server in a seperate process to provide protection.

      --
      A deep unwavering belief is a sure sign you're missing something...
  157. He, he. by hummassa · · Score: 2, Interesting

    0. "I assumed he was referring to the x86 platform"... see #4, below.
    1. Bootstraping. The c# compiler in Mono is written in ... c#. And it compiles itself. Take a look and you'll see what I am talking about.
    2. Your argument: "the first Java compiler." Tell you what: sometimes, the first XXX compiler is written in XXX and bootstraps itself. Even some of the first C compilers were written in C. Many assemblers before it were written in assembly language.
    2a. the word bootstrap comes from "lifting onself by steping on it's own boot straps." magic, eh?
    3. (Shrek citation) you and what army? (/Shrek) I was being caustic; you are mentioning being violent. I can dance the dance, too. Just invite me and we'll tango.
    4. ok, so I'll take the discussion again, this time from the beginning, let's see if we understand each ohter.
    4a. bangular complained that many modern languages were either scripting (like perl or python) or bytecode languages, so you could not write an OS kernel in it (unlike C, C++, ...);
    4b. Ambassador Kosh pointed out that python also is a bytecode-language (and altough he did not mention it, perl is a bytecode-language, too)
    4c. you said (assuming he [Kosh?] was talking about x86) bytecode could not run in raw machines ; yes it can't run directly in a x86 machine, but it can run in a specialized processor; but -- a JIT compiler, or an AOT (ahead-of-time) compiler (like gcj) can compile bytecode into machine code easily. You have to remember bytecode is just another representation (direct translation) of (some) assembly language.
    5. Here starts you succession of mistakes, that lead to my header and footer in the response I wrote:
    5a. you wrote "C and Assembler are what make the computer world run". nope. engineering make the computer world run. many applications are still in COBOL, FORTRAN, and lots of it, today is in Java, etc. Down to the wire level, yeah, there is lots of C and assembler, but they are *not* cost-viable to make many commercial systems. just OS-level software (database management systems, etc). And some are not -- SAP DB is written in Pascal; many MacOS programs were, too,...
    5b. you wrote "You can't make Java in Java". bootstraping. bootstraping.
    5c. you wrote "C turns directly into executable binary (...). Java cannot". wrong.
    5d. you wrote "I suppose that if you were insane enough, you could make a bytecode to opcode converter"... no need to be insane; see what's done at transmeta, ikvm, any JIT compiler, etc. etc...
    5e. you continued "but then you lose 100% of the point of the langauge" (sic). wrong, the point of a programming language is to show some abstraction in a clear way. p. ex, C++ classes show the abstraction of classes of real-world objects and the operations that can be effected in those objects belonging to those classes... if you translate it into bytecode, machine language *or* database-description to generate some tables in a RDBMS, it's not differente because of the target language; you did not lose the "point" of C++. So, if you get some JVM bytecode and translate it into .NET bytecode (like IKVM does) you did *not* lose the point of Java. you just translated your abstractions to another platform.
    5f. you went on "probably" (lose) "a lot of the efficiency", yeah, some of the efficiency, maybe; but you gain other knowledge that you can use to profile-and-optimize better than any hand-optimization. This will absorb most of the cost of the translation, and, in some cases, the dynamic translation techniques can make your program run even *faster* than the native/compiled version!
    5g. you ended the phrase with "and at that point you may as well use C". no, you may not, because C is not *very good* at OOP, or functional programming, or whatever other paradigm you need to express the domain of your problem so a compiler can give you an efficient program to run as a response.
    6. as you see, from 5a to 5g, you said seven distinct things in your paragraph, all wrong, all in need

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
    1. Re:He, he. by John+Courtland · · Score: 1

      I'm sorry, I overgeneralized most every comment you disagree with. Hence the misunderstanding...

      Addressing:
      1: I am aware of the design of languages. But you have to start somewhere, and you can't start with something that doesn't exist yet. You at least need an assembler. I guess if you built a string of machine code that did it that could work too.
      2: Refer to (1). I realize that 90% of the language is written in itself, but it still needs a small kernel part written in another language. You can't use Java to define an = sign before the = sign rules exist in the language. I suppose Yacc and Bison are tools to this end, but they also aren't written in a language that doesn't exist.
      3: I get tired of people being bit shots and snide asshats over the internet. No one has ever had the balls to say to my face some of the shit people say to me over the internet. It gets tiring, and the replies I write are a reminder that I will never sit there and let someone talk to me that way, becuase that's just silly. If you don't agree, great, even if I'm wrong, great, but no need to be a fuckoff about it. All it does is make me mad to see people shoot their mouths off. So then you get a fitting comment. I wouldn't kill you over a comment, please, I have far worse going on over here that I still haven't killed for, although I probably should... It's an exaggeration, but I guarantee unless you are a professional fighter it would be in your best interests not to fight me. And with that, I will drop it, because it's silly to talk about fighting over the internet. I feel dirty now...
      4c: I know it's possible to translate byte code into machine code. Hell, I wrote a language of my own. Scripted and converted to my own version of byte code on the fly but with provisions (it's not done) to be compiled into a DLL with a executable wrapper.
      5a: Overgeneralization on my part. Obviously there are other languages. None as pervasive as C, and Assembler is just like the building blocks of it all. Especially OS code. No one would write a performance OS or a serious video game in a scripted language or a byte code language, unless they wanted to introduce a lot of hacks to get it to run fast. I'm a performance programmer. I don't really like the "bloaty code" ideals that infest languages like Java and all the .NET suite.
      5e: I merely meant that you lose all portability with the compiled machine code. That was the real point of Java, to allow the same byte code to run on all hardware, and all OS's. I wasn't addressing the point of all programming languages in general. You could make a compiler for all other systems, and I suppose if you liked Java enough to do so, then that would be great, but I don't.
      5f: I've never seen a complier beat hand optimized assembler. It just can't happen, until AI gets into compiler technology, a human will always out-think a compiler's optimizations. Now you have to be smart in order to beat the compiler, this much is true. If all you're making is some business app though, then why even care, but as I said before, I'm a performance programmer. I don't like to waste cycles and I don't like to waste RAM.
      5g: I guess this part comes down to preference. I love C/C++. Yes they have their "less good" points, and Pascal actually has a bunch of syntatic candy I wish they put in C++, but other than that, I haven't seen a language I enjoy more. I like being right over the metal, again, the performance nazi in me likes to make sure that what I write is doing its best on its environment. I can't totally verify that with a VHLL without doing the same things I would do with C/C++ (profiling, spying, etc). And I don't even like some aspects of C++ simply because they try to take me away from the metal.
      7: Thank you for an apology, I apologize for being so "violent" in my response. I'm a decent guy, as long as you don't fuck me around. I find it interesting you chose to put me on your friends list. I was wrong on many points, but most were oversimplifications for my own benefit (the lazy benefit, I don't like spending 30 minutes making my post is pedant-proof). It's amazing a 3 sentence post can generate this much discussion.
      8: Yes.

      --
      Slashdot is proof that Sturgeon's Law applies to mankind.
  158. A couple that were left out... by smithmc · · Score: 1


    New England Speak is a wicked pissah!

    Anjoo lef' out Brooklyn?!? Wutthufawk? I mean, fuhhhgeddabowdit!

    --
    Downmodding is the refuge of the weak. Don't downmod, make a better argument!
  159. Head in the Clouds... by HopeOS · · Score: 1

    This is precisely the kind of thing that separates computer science, that division of mathematics that deals with algorithms and computational theory, from engineering which deals with real-world solutions to real-world implementation problems.

    If you think that implementing a program in lisp is going to be so inherently secure that there is no need for hardware-level page protection, you are sorely mistaken. Malicious code exists, even in Lisp.

    Outside of C and assembly, nothing is comparable for speed. If you're seeing similar execution times from lisp and Java, then you're doing something so trivial as to be uninteresting or something is wrong with your C implementation.

    -Hope

    1. Re:Head in the Clouds... by Anonymous Coward · · Score: 0

      Outside of C and assembly, nothing is comparable for speed. If you're seeing similar execution times from lisp and Java, then you're doing something so trivial as to be uninteresting or something is wrong with your C implementation.
      What makes you say that? All the benchmarks I've seen tell a different story (and so does my personal experience). Lisp tends to use more memory than C, but execution speeds are very similar.

    2. Re:Head in the Clouds... by be-fan · · Score: 1

      This is precisely the kind of thing that separates computer science, that division of mathematics that deals with algorithms and computational theory, from engineering which deals with real-world solutions to real-world implementation problems.
      I don't see how that applies here. Hardware-level page protection isn't a theoretical technique, its an implementation technique. We're talking about two engineering problems here. One does protection in hardware, the other does it in software. The former is vulnerable to bugs, just as the latter if vulnerable to bugs.

      If you think that implementing a program in lisp is going to be so inherently secure that there is no need for hardware-level page protection, you are sorely mistaken. Malicious code exists, even in Lisp.
      Its not a matter of Lisp code being inherently secure. Its a matter of Lisp having no pointers, and having type and array bounds checks. Assuming no bugs in these parts of the compiler (just as we assume no bugs in the implementation of the hardware MMU!) a Lisp runtime should provide protection equivilent to a hardware MMU. Now, malicious code can exploit bugs in the runtime, but are you claiming that no C kernels have such exploitable bugs?

      Outside of C and assembly, nothing is comparable for speed. If you're seeing similar execution times from lisp and Java, then you're doing something so trivial as to be uninteresting or something is wrong with your C implementation.
      Or you just have a really smart compiler. And Lisp compilers are really smart. If you write low-level code in Lisp (as you would in C), you'll can get equivilent performance. Since most Lisp compilers compile to native code, there is no reason to expect that they'd be any slower than other native-code compilers. And it must be noted that Lisp code can be faster than C code in practical situations. Often, where C code is generic (eg: qsort() in the standard library), Lisp compilers can emit specialized-functions for a given type. Since Lisp code has more high-level semantic information than C code, it is possible for a Lisp compiler to perform better high-level optimizations.

      --
      A deep unwavering belief is a sure sign you're missing something...
    3. Re:Head in the Clouds... by HopeOS · · Score: 1

      I was specifically objecting to this statement: If you use a safe language, you don't need memory protection, or even a kernel/userspace boundry for that matter. You get completely fine-grained protection for all objects. It may be correct in theory but in practice it is not true. Sandboxes can be circumvented. Compiled code, whether from lisp source or C, can be modified such that it compromises the system. This is the distinction between an academic problem and a real-world engineering problem. Bad things happen, even when best efforts are made to ensure against. Type-safety is certainly a Good Thing, but it's not the salvation of the software industry you implied in the previous post.

      Yes, lisp can be compiled pretty tightly. It can also do wonderful things, including optimizing the implementation of algorithms, even under different runtime conditions. C++ template classes provide similar optimization at compile time, but that's neither here nor there. When putting C and lisp head to head, C will always win because it is always possible to take C to the next level - ultimately to assembly itself - if necessary. With lisp, the point of diminishing returns is reached sooner and is unbreachable. That alone makes it unsuitable for certain classes of problems.

      Lisp is, like many other academic languages, very capable at handling specific sets of problems given unfettered resources in ideal conditions. When the conditions get dicey, many of the benefits like uniform memory management, the ability to defer execution of code until absolutely necessary, etc. become impediments when the memory manager enters a worst-case mode of operation or the given execution order begins to cause problems.

      On a final note, although I do not program in Ada, I am of the opinion that a useful compiler should be able to generate raw assembly with the efficiency of C and optionally validate code at compile-time to ensure that it is strictly mathematically sound. Obviously, C does not do this at present.

      -Hope

    4. Re:Head in the Clouds... by be-fan · · Score: 1

      It may be correct in theory but in practice it is not true. Sandboxes can be circumvented.
      So can the kernel userspace boundary. There have been 3 such exploits just in the 2.6 release of Linux!

      Compiled code, whether from lisp source or C, can be modified such that it compromises the system.
      Such a system would necessarily disallow direct manipulation of binaries, probably through some form of code-signing. Its not an insurmountable problem at all.

      C will always win because it is always possible to take C to the next level - ultimately to assembly itself - if necessary. With lisp, the point of diminishing returns is reached sooner and is unbreachable.
      Any code you can write in C, you can write in a Lisp (perhaps not Common Lisp, but with extensions). You can disable GC in critical regions, you can get at the raw bytes of buffers, etc. And you can always break out the assembly when writing C code, but you can do that for Lisp code too!

      --
      A deep unwavering belief is a sure sign you're missing something...
    5. Re:Head in the Clouds... by HopeOS · · Score: 1

      I think you're proving my points for me. The statement was that the kernel/user space boundary is required for security reasons. The effectiveness of any specific implementation is moot.

      Code signing is not a valid solution since you are assuming the signer is not malicious.

      Finally, if your implementation of lisp allows you to break out to assembly, then you're already out of the sandbox, meaning that is possible to run unsafe code. If that's the case, then your argument is defeated. Either the code is all safe and there is a performance barrier or the code is unsafe and there is not.

      -Hope

    6. Re:Head in the Clouds... by be-fan · · Score: 1

      I think you're proving my points for me. The statement was that the kernel/user space boundary is required for security reasons. The effectiveness of any specific implementation is moot.
      Its not moot. You can have protection in two ways. You can have a hardware-enforced boundry between userspace and kernelspace, or a compiler-enforced boundry between programs. I'd argue that the failure possibilities of the former are no less (and perhaps even greater than) the failure possibilities of the former. There are a lot of failure modes in the former (mainly, memory-related exploits in priveledged code) that do not exist in the latter.

      Code signing is not a valid solution since you are assuming the signer is not malicious.
      The code would be signed by the compiler. It is assumed that the compiler is trusted, just as, in a traditional model, it is assumed that the kernel in trusted. There would be a guarantee that no matter what input there was to the compiler, the output would be safe. Now, one could exploit bugs in the implementation of the compiler, but that'd be no different from exploiting a bug in a system-call implementation in a kernel. The advantage of this model is that memory-related security is in a limited portion of the compiler. As long as that is correct, security is guaranteed.

      Finally, if your implementation of lisp allows you to break out to assembly, then you're already out of the sandbox, meaning that is possible to run unsafe code.
      Nobody says the same dialect of Lisp needs to be used for all code. It would be entirely sensible to have a seperate "unsafe" dialect for (rare) code that requires it. Given practical realities, an implementation of such a machine would have to have a hardware-level sandboxes for not just for unsafe Lisp programs, but for programs written in languages (like C) that cannot efficiently be made safe. Such sandboxes would behave identically to protected memory spaces in current machines.

      This arrangement works out quite nicely. Programs these days rarely need to drop down into ASM, and can thus be run in the "safe-code" region, benefiting from the attendant performance improvement. For GUI and server apps, this improvement can be very significant, since a lot of communication overhead is eliminated. Unsafe code would have the additional overhead of communication out of its protected domain, but that is what *every* program has to do on current machines.

      --
      A deep unwavering belief is a sure sign you're missing something...
    7. Re:Head in the Clouds... by Minna+Kirai · · Score: 1

      The code would be signed by the compiler. It is assumed that the compiler is trusted, just as, in a traditional model, it is assumed that the kernel in trusted.

      What a ridiculus position. The kernel is assumed trusted because it is on your computer. The compiler is not on your computer, so it can't be trusted.

      Or are you proposing that the all software should be distributed as source/intermediate code, and that only the OS kernel is allowed to invoke a local compiler on it before running?

    8. Re:Head in the Clouds... by HopeOS · · Score: 1

      I see where you're coming from. All I'm saying is that you cannot have a privilege separated system without the hardware-level protection regardless of what language you're working in. If it's possible to have unsafe code running, you need the MMU. With the following exception, I'm in agreement with everything you just said.

      Establishing code validity through code signing is much more complicated than you imply. Since that's the subject of some of my research, I'm really not going to hash it out here, but basically you can sign something to guarantee it has not changed, but you cannot sign something to guarantee that it is valid code without establishing a trust relationship with the compiler author. That's a long way to go to avoid using an MMU.

      As a completely incidental aside, my account name HopeOS refers to an operating system that does have signed binaries and checked code can run in the same process space provided that it is signed by the same key. All other processes must use formal IPC (usually page-level hyperqueues) to transfer data. This is still a work in progress, but the idea is to allow foreign binaries to execute on a machine with the privilege level of the author, not the current user.

      -Hope

    9. Re:Head in the Clouds... by be-fan · · Score: 1

      The compiler is not on your computer, so it can't be trusted.
      Sure it can. All you need is a way to guarantee that the code in question was compiled by a conforming compiler. Its analagous to the problem of guaranteeing that a given e-mail originated from a certain person. If that is too complicated to handle, then distributing code as a high-level IR (like .NET does) and compiling it to native code (via a trusted compiler) at install-time wouldn't be problematic.

      --
      A deep unwavering belief is a sure sign you're missing something...
    10. Re:Head in the Clouds... by Minna+Kirai · · Score: 1

      Its analagous to the problem of guaranteeing that a given e-mail originated from a certain person.

      No it isn't. When verifying email origination, you need only determine the sender's identity, not his competency.

      There are already products distributed as signed binaries, and bugs+exploits have already crept in, meaning the release shouldn't have been signed at all. Unix (and other systems) have a principle "Be liberal in what you accept", meaning that a computer shouldn't entirely crash if a malicious enemy sends an evil program.

      at install-time wouldn't be problematic.

      That's reasonable, and is similar to how Java JIT works (but with longer-term caching). But it still introduces a huge practical problem in comparison to modern OSes: a mistake in the compiler used for a high-level application can cause mysterious system-wide failures.

      Today, regardless of how wrong the compiler's author might be, it'll only crash his own program, not stomp on other user's memory (or the kernel).

      You are in a way proposing that compiler innovation be shutdown, because in your scheme it would be too risky to allow it to be changed. (Have you tried Intel's P4 compiler? Seen how often it is absolutely wrong? And that's with C, a simpler language to compile)

      I have no philosophical objection to your position, but it is utopian. The gains would never outweigh the horrendous costs to switch away from "good enough" OSes.

    11. Re:Head in the Clouds... by be-fan · · Score: 1

      No it isn't. When verifying email origination, you need only determine the sender's identity, not his competency.
      Competency is not in question here. As long as the sender uses a trusted compiler to compile the code, everything is okay. If you trust the distributor of a given binary, it makes sense to trust that they are not malicious and are not using a hacked compiler. If you don't trust the distributor, you shouldn't be running binaries from them anyway!

      a mistake in the compiler used for a high-level application can cause mysterious system-wide failures.
      And a mistake in the kernel can cause mysterious system-wide failures!

      Today, regardless of how wrong the compiler's author might be, it'll only crash his own program, not stomp on other user's memory (or the kernel).
      In such a system, the kernel is just a bunch of libraries. Instead of the kernel being a central point of failure, the compiler/runtime becomes a central point of failure. You're not increasing the chances of disaster, just moving responsibility elsewhere.

      You are in a way proposing that compiler innovation be shutdown, because in your scheme it would be too risky to allow it to be changed.
      Of course not. Only a small part of the compiler need be concerned with memory protection. Since you've got no pointer arithmatic, you just have to make sure that the compiler outputs array range-checks in the right places. Surely getting that right, even in the face of a constantly improving compiler, is easier than securing 100+ different system-call handlers in a kernel like Linux!

      --
      A deep unwavering belief is a sure sign you're missing something...
    12. Re:Head in the Clouds... by Minna+Kirai · · Score: 1

      not malicious and are not using a hacked compiler.

      You dismiss competency, but it's really very important. Well-meaning, non-malicious people can still make mistakes. But even if you wrongly trust an evil application vendor, his program still shouldn't be able to run rampant over the machine.

      That is especially important for multi-user computers. Would Unix (or any conncurrent-user system) be at all successful if a bad application run by one user could corrupt work other users are doing? cf "privilege escalation exploit".

      Surely getting that right ... is easier than securing 100+ different system-call handlers in a kernel like Linux!

      Imperical evidence has trivially proven the opposite.

    13. Re:Head in the Clouds... by be-fan · · Score: 1

      You dismiss competency, but it's really very important. Well-meaning, non-malicious people can still make mistakes.
      Its really hard to hack a compile by mistake!

      But even if you wrongly trust an evil application vendor, his program still shouldn't be able to run rampant over the machine.
      True, in theory, but that's just not the case on current machines. Nobody in their right mind runs code from people they don't trust, even on UNIX systems with protection. There are just too many holes for that to be allowed to happen.

      [E]mperical evidence has trivially proven the opposite.
      How so? There have been three or four local exploits in Linux in the last couple of months. mremap() ring a bell? There are local exploits in Windows *constantly*. The thing is that we're not in a very good position as it is. You've got 3-4 million lines of kernel code (plus lots more running as root) that are implicitly trusted. It is very easy for a malicious local user to find an exploit in all that code. When the compiler enforces protection, you've got perhaps several thousand lines of code (a properly designed compiler would have a well-isolated module handling memory security) that could be at fault. Then, all that code that used to be privleged, and thus dangerous, is removed as a threat.

      --
      A deep unwavering belief is a sure sign you're missing something...
  160. C is "dying", being killed by... C by Kaldaien · · Score: 2, Insightful

    The actual "C" language may be declining in use. However, every single one of the "replacement" languages I've seen mentioned are simply "[subjectively] improved" modifications of C. Personally, I rarely use the higher level versions of C like C# or Java, because my line of work requires me to interface with OpenGL and do very CPU intensive calculations. Pointer math is absolutely required to effectively utilize OpenGL's more advanced extensions such as vertex buffer objects. And you can just forget about optimizing your vector math for CPU vectorization and parallelization, etc... in languages like Java or C#. This is not to say, however, Java and C# do not have their own benefits. When you need to write a small application (perhaps a frontend, or what not) and performance is not important, it's often faster to develop them in a higher level language. It's another instance of "the right tool for the right job". But the low level versions of C won't be dying for a very long time, because there will always be a need for portable, high performance APIs. The APIs that your high level C languages may interface with to perform tasks you simply can't practically accomplish otherwise. And of course the actual system kernel that everything runs would never be practical in a high level language.

  161. Re:Mono and DotGNU - what project to contribute to by Anonymous Coward · · Score: 0

    The GPL does not grant you patent rights to third
    party patents which is what you are implying there.

    DotGNU is in no way in any safer ground than Mono
    is when it comes to patent infringement. If they
    say `you have to pay for our patents' if they have
    a case, you will either have to pay or withdraw
    your code from the network.

    No ammount of GPL can give you rights to someone
    else's property. Otherwise fighting patents
    would just be a matter of writing a GPL implementation
    of the technology in case.

    If the Free Software Foundation is fighting
    patents that strongly, why did they not fight the
    Gzip patent? Or what about the crypto patents?
    Or the freetype ones?

    http://www.gnu.org/philosophy/gif.html

    Instead they played like everyone else:
    avoiding patents whenever possible.

    You are missleading people with your half-truths.

  162. Re:Importance of compiling C to portable executabl by Anonymous Coward · · Score: 0

    That's right, because DLLs and COM are platform independant, right? DLLs feel just as at home on Solaris SPARC as they do on AIX as on Microsoft Windows, right?

  163. Untrue. by pb · · Score: 1

    Actually, there are some very efficient OCaml implementations out there, on par with C. But don't take my word for it...

    --
    pb Reply or e-mail; don't vaguely moderate.
  164. It Hurts! by Anonymous Coward · · Score: 0

    Patient: Doctor! It hurts when I stick my finger in my eye.

    Doctor: Don't stick your finger in your eye.

  165. FUD by ttfkam · · Score: 1
    First off, it helps your argument to state that the C++ spec was standardized in 1998, not 1999. C was (again) standardized in 1999.

    Standardization always preceeds implementation. So how long is too long? One year? Two? Six months? It took the STLPort folks 2-3 years for a working implementation after the official spec was published. That doesn't sound too bad to me for a bunch of volunteers.
    Well unless you use .data() instead of .cstr() where NT/Solaris use the same implementation for both and libstdc++ doesn't

    From the Cygwin mailing list: "data doesn't necessarily return a zero-terminated string, it simply returns a ptr to the raw data. It is only zero-terminated if you call c_str() which is, of course, why there are two functions in the first place."

    Do you want a NULL-terminated string? Use .c_str(). Do you want access to the raw buffer from the implementation? Use .data(). Because the implementation may be different, the output of .data() may be different. Imagine that: access to the backend buffer implementation may be different for different implementations. If you want to work with strings, don't call either one; Use the std::string directly. If you need a C-style string, use .c_str() and be done with it. The output of .data() is not portable and was never advertised to be. If however you absolutely need the speed afforded by direct buffer access, the underlying implementation matters. But like speed optimizations in assembly, it should only be done when absolutely necessary.
    ...or you want to use <strstream.h> er I mean <strstream> ... errr I mean <stringstream>

    #include <sstream>

    Use of the other two is deprecated per the 1998 standard. You couldn't read that part of the spec in the six years that it's been published?
    ...and the first time you could get something that comes close to a std. c++ implementation is within the last few months.

    Bah. GCC 3.x has had a ISO-98 standard C++ library for the last two years. STLPort has been around for even longer.
    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  166. Mularky... C is very much alive. by borgheron · · Score: 1, Flamebait

    C/C++ will likely never die. The problem with bytecode based languages is that they're *SLOW*.. I repeat *SLOOOOOOOOOOOOOOOOOW* compared to a good optimized C program.

    Now you guys can argue your pants off about how "we've got hotspot" and "hotspot should be just as fast as native", but that's just not the case.

    GJC

    --
    Gregory Casamento
    ## Chief Maintainer for GNUstep
  167. My last stand. by hummassa · · Score: 1

    The only concept I think you did not understand -- or research -- and that I would really like you to grok is the language-bootstraping concept. The song goes more or less like this:
    1. you write the compiler for c#, p.ex., in c#. (remember, you don't have a c# compiler, nor yacc, nor lex, nothing. just vi, for instance)
    2. now you try to simplify the compiler you wrote, so it does not use and abuse every single feature of c#, but it uses just a minimum subset of the language, the less the better.
    3. now you have compiler-c#-1.cs and compiler-c#-2.cs, you get compiler-c#-2.cs and removes from the compiler the features you did not use to write this version of the compiler. now you have three compilers: 1, 2, and compiler-c#-3.cs.
    4. now you sit on a table with a lot of paper and run (with pencil and paper) compiler-c#-3, giving it as input... itself! when you end this step, you have as the result compiler-c#-3-binary, in asm, hex, or whatever you can input directly to your environment to form an executable file.
    5. now you do "compiler-c#-3-binary compiler-c#-2.cs", roll the drums and ... there you have compiler-c#-2-binary !!!!
    6. now you do "compiler-c#-2-binary compiler-c#-1.cs" and ... compiler-c#-1-binary !!!
    7. (checkpoint) "compiler-c#-1-binary compiler-c#-1.cs" and the result *must be* absolutely equal the one in the pass #6 !!! you're done !!!
    the critical pass (#4) is not really hard to do, because the compiler writer *usually* knows what code his compiler must spill for some input... is just mechanical work.
    ma, no hands!
    Ah, and you're right, sometimes /.esque crowd manners can tire and irritate us... :-)

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
    1. Re:My last stand. by John+Courtland · · Score: 1

      I see... I was wondering what the hell GCC was doing.

      I am writing my language like Perl was written. C with moderate C++ (just for classes, because of its high level implementation, you can do cool things like run multiple interpreters at once as long as you can get it to run quick enough)

      --
      Slashdot is proof that Sturgeon's Law applies to mankind.
  168. Stay away from pnet... by digitaltraveller · · Score: 1

    The inside story:

    Pnet existed before mono. Pnet never gained credibility because the project leader (and story submitter) Rhys Weatherley is a pain in the ass to deal with. This story is an example of his trollish ways. The grandiose statement "C is dead" is a quote out of context. Miguel said something like: "To me, C is dead [for gui applications], except for the mono JIT [that I wrote]."

    Mono has succeded because of good leadership. Pnet has failed for lack of it. After two years, mono has achieved and exceeded all of pnet's goals, leaving pnet with an inferior toolset (eg. their IL runtime lacks a JIT and is extremely slow).

    Rhys seems to desperately want peer validation in the free software world. In his twisted worldview, he sees Miguel as a power hungry dictator (I kid you not) and literally hates his guts for mono's successes, of who's glory he believes is rightfully his, because he was there first.

    In response to mono's achievements, Rhys and his small band of zealots seem to have spun their wheels a bit, biting off several new projects. For example the aformentioned C compiler and also a commitment to develop a native X System.Windows.Forms implementation, as opposed to the mono approach which is reusing the Wine project's winelib.

    This is truly ironic considering Rhys absolute uncritical devotion to RMS's free software philosophies. Mono tends to promote Gtk# as the reccomended GUI library of choice. The Pnet SWF implementation will ultimately be a great enabler to proprietary software companies wishing to run their software on Linux. Yes, it will be a license violation. However it will be impossible to stop, because the users will be commiting it, rather than the sw company! No distribution required!

    1. Re:Stay away from pnet... by Guardian+of+Terra · · Score: 0

      Well, i guess, that's only your sight a problem. Who is a bigger asshole, Miguel or Rhys, is a big question to everyone but zealots. I will even guess, that noone of is. System.Windows.Forms are portable, not native X. There is already GDI+ baseed version and there might be SDL-based. Again, pnet+pnetlib is 7MB in .tar.gz, and mono+mcs+icu+wine is well ~50MB. dare to compare. If Mono SWF implementation will success, IT will be "great enabler to proprietary software companies", since fully compatible with winapi, not just SWF. About extrreme slowness (mono i386 8000 points, ilrun 4000, mint 300(sic!)) is a plain BS. I do not want to set flame up, but i expected less emotions and BS from EFF oficial.

  169. C isn't dead yet. Someone should shoot it. by Un+pobre+guey · · Score: 2, Interesting
    Interesting how there are few or no compelling reasons to choose C over C++ in the above posts. Little more than a reiteration of the same old myths about how C is so much faster, efficient, cleaner, etc.

    Almost all extant C practitioners would benefit greatly if they gradually abandoned C-style and learned multi-paradigm C++. The world would be a better place.

    This is not a troll, and before all of you fundamentalist fanatics pull out your flamethrowers, inform yourselves:

    C++ FAQ

    C vs. C++

    The case for the continued existence of C is tenuous at best.

    1. Re:C isn't dead yet. Someone should shoot it. by smishra · · Score: 1
      I very much doubt that we are going to see the demise of C any time in the next 10 years.

      C is the universal assembly language. For example, for itty bitty microcontrollers it is either C or Assembly. I much prefer C.

  170. C isn't dead, but it should be by metal_llama · · Score: 2, Informative

    But it ain't happening any time soon. Nevertheless: D, anybody?

    --

    ~metal_llama out.

    ---
    move every sig!
  171. Oh, I'm going to take it more seriRe:dot.gnu rocks by aaron_pet · · Score: 1

    I'm going to take dot.gnu more seriously.

    If You're saying it will save us from the microsoft tax... and will provide a framework with the consistancy and automatic optimizability and easyness that will save us from the dependancy hell that we currently have to deal with...

    Horrah for dot GNU... I'll look at it before I look at mono.

    I'm still a bit sketched about C being in the name..

    Note, I wasn't trying to advocate mono or .NET.. because I don't know first hand whats up with those libraries... I'm hoping to know though... and from preliminary propaganda, they look wonderfull.

    --
    Please use [ informative / summarizing ] SUBJECT LINES
    Flame me here
  172. MODS ON CRACK, PARENT IS NOT OVERRATED by Anonymous Coward · · Score: 0

    and remember to pay your $699 licence fee

    1. Re:MODS ON CRACK, PARENT IS NOT OVERRATED by Guardian+of+Terra · · Score: 0

      Even if i use P.Net on QNX NC?

  173. C is alive... Don't kid yourselves. by borgheron · · Score: 1

    Java and other bytecode based languages can't hope to achieve the level of performance of C/C++. Both languages have plenty of life left.

    Don't kid yourselves.

    --
    Gregory Casamento
    ## Chief Maintainer for GNUstep
  174. Re:Mularky... C is very much alive. by borgheron · · Score: 1

    Okay... whoever the bum was who modded me down for speaking the truth above. Ahem.. up yours!

    BTW, I program in Java too (and several other languages, including ObjC/C) and I know the above from experience. No hype involved, Java *is and always will be slower*. Period.

    GJC

    --
    Gregory Casamento
    ## Chief Maintainer for GNUstep
  175. Feel free to read comments, as well as posting the by Nevyn · · Score: 1
    First off, it helps your argument to state that the C++ spec was standardized in 1998, not 1999.

    You're right. For some reason I thought both C and C++ had come out in the same year.

    Standardization always preceeds implementation.

    That is not true, the original C std. was basically a statement of what was already implemented ... thus. the strncpy() and puts() warts.

    So how long is too long? One year? Two? Six months? It took the STLPort folks 2-3 years for a working implementation after the official spec was published.

    STLPort is not a complete environment, if you're compiler doesn't support templates properly (or at all) then STLPort isn't a solution. Also very few implementors do "ports" by taking the entire runtime with them from platform to platform ... mainly because everything you use (Ie. third party libraries) now also need to use the new runtime.

    Personally I've dealt with C++ code that's been "in production" for 8-10 years or more.

    If I use std::string or std::vector in my code, it compiles and it works no matter the implementation.
    Do you want a NULL-terminated string? Use .c_str().

    So now you agree? What you originally said isn't true. std::string implementations on Solaris/NT seem to do the same thing for .data() and .c_str() ... so when moving to Linux say, you can have bugs (it also doesn't help that RogueWave's string type has .data() as the .c_str() equivilent).

    Use of the other two is deprecated per the 1998 standard. You couldn't read that part of the spec in the six years that it's been published?

    I never said "I do", and it doesn't matter if the code still has to run on platforms that still use the older behaviour.

    Bah. GCC 3.x has had a ISO-98 standard C++ library for the last two years.

    And it was first released in a real product, RHEL 3, in Oct. 2003. You seem to be confused between the real world, and "writing toy apps. in my bedroom". If you think C++ is wonderful, that's fine have your delusions ... and if you don't care that it's been 10 years in the making and there are only starting to be something closer to C++ compilers now, that delusion is also fine. But to suggest that the implementation of the Runtime is as similar across platforms as Java, .net or even python and perl is just obvious and easily refuted untruth.

    --
    ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
  176. Re:Feel free to read comments, as well as posting by ttfkam · · Score: 1
    STLPort is not a complete environment, if you're compiler doesn't support templates properly (or at all) then STLPort isn't a solution. Also very few implementors do "ports" by taking the entire runtime with them from platform to platform ... mainly because everything you use (Ie. third party libraries) now also need to use the new runtime.

    Personally I've dealt with C++ code that's been "in production" for 8-10 years or more.

    That was of course the point of STLPort: giving a leg up to incomplete versions. Is it perfect? No. But it allowed many people to write standard code until your main compiler caught up.

    Bad template support? Yeah, nothing to be done about that. Just like the fact that there are C compilers out there that don't support the C99 standard.

    Congrats about 8-10 years of production C++. Me, I only have 6-7 years.
    So now you agree? What you originally said isn't true. std::string implementations on Solaris/NT seem to do the same thing for .data() and .c_str() ... so when moving to Linux say, you can have bugs (it also doesn't help that RogueWave's string type has .data() as the .c_str() equivilent).

    No, I don't agree with you. Repeat after me: .data() is not guaranteed to be portable between implementations. If you use it, you are tying yourself to the implementation. For example, the way you embed assembly into C programs is the same. However once you put the assembly in -- assuming of course that you aren't delimiting with #ifdefs -- it isn't portable.

    std::string's .data() does the same thing on all platforms: it ties you to a particular implementation so that you can do low-level hacks.
    And it was first released in a real product, RHEL 3, in Oct. 2003.

    Are you kidding? RedHat Enterprise is, by definition, slow to release new products. It's been available in all standard distributions for far longer than that. I know. I've been using it. So compile on your dev box and put the binary on your production box running RHEL 3. You aren't doing development on your production boxes are you?
    You seem to be confused between the real world, and "writing toy apps. in my bedroom". If you think C++ is wonderful, that's fine have your delusions ... and if you don't care that it's been 10 years in the making and there are only starting to be something closer to C++ compilers now, that delusion is also fine. But to suggest that the implementation of the Runtime is as similar across platforms as Java, .net or even python and perl is just obvious and easily refuted untruth.

    You're right. The different C++ vendors had wildly different implementations. This was the impetus for standardization: you couldn't write a program that compiled everywhere. Now it is much closer to that goal, but you still complain because it's not happening fast enough for you.

    And for the record, while I was writing toy apps in my bedroom/dormroom in CFront days, I've been working professionally with C++ for 6-7 years. I remember what it was like. This is why I welcome the new changes.

    Now, that said, I think C++'s standard library is too small. The stuff at boost is a good next step though.
    --

    - I don't need to go outside, my CRT tan'll do me just fine.