Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming IT Technology

C Alive and Well Thanks to Portable.NET 582

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."
This discussion has been archived. No new comments can be posted.

C Alive and Well Thanks to Portable.NET

Comments Filter:
  • by gid13 ( 620803 ) on Monday March 15, 2004 @03:06AM (#8566317)
    ...stop telling me things are DYING, maybe let me know when they're DEAD.
  • Er.. (Score:5, Insightful)

    by iswm ( 727826 ) on Monday March 15, 2004 @03:10AM (#8566336) Homepage
    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.
  • Keep it real... (Score:5, Insightful)

    by seanmcelroy ( 207852 ) on Monday March 15, 2004 @03:13AM (#8566353) Homepage Journal
    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.
  • Punch Cards (Score:5, Insightful)

    by Detritus ( 11846 ) on Monday March 15, 2004 @03:14AM (#8566355) Homepage
    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.

  • Comment removed (Score:5, Insightful)

    by account_deleted ( 4530225 ) on Monday March 15, 2004 @03:14AM (#8566357)
    Comment removed based on user account deletion
  • by Biotech9 ( 704202 ) on Monday March 15, 2004 @03:17AM (#8566369) Homepage
    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". [eetimes.com] "C is dead", "CISC is dead".... [prodigy.net]
    ,"Apple is dead". [macobserver.com]
    When technologies really do die, its when noone gives a damn about them, and so noone will be writing a story about it.

  • Re:Adaption, but.. (Score:3, Insightful)

    by irokitt ( 663593 ) <archimandrites-iaur@@@yahoo...com> on Monday March 15, 2004 @03:17AM (#8566372)
    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.
  • Re:What about C++? (Score:3, Insightful)

    by davebrot ( 464549 ) on Monday March 15, 2004 @03:19AM (#8566381)
    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.
  • by Slayk ( 691976 ) on Monday March 15, 2004 @03:19AM (#8566383)
    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.
  • Re:So... (Score:5, Insightful)

    by j-pimp ( 177072 ) <zippy1981@noSpam.gmail.com> on Monday March 15, 2004 @03:34AM (#8566426) Homepage Journal
    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.
  • Re:So... (Score:3, Insightful)

    by mpmansell ( 118934 ) on Monday March 15, 2004 @03:37AM (#8566440)
    So, by that argument, shouldn't Java and C# both have been stillborn? Both piggy back on VMs and are the same 'weird' combination?? :)

  • Re:What about C++? (Score:5, Insightful)

    by condensate ( 739026 ) on Monday March 15, 2004 @03:37AM (#8566444)
    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.
  • Re:Keep it real... (Score:5, Insightful)

    by forgoil ( 104808 ) on Monday March 15, 2004 @03:40AM (#8566455) Homepage
    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.
  • by StevenMaurer ( 115071 ) on Monday March 15, 2004 @03:43AM (#8566461) Homepage
    ...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.)

  • Re:Let it die! (Score:2, Insightful)

    by zalas ( 682627 ) on Monday March 15, 2004 @03:47AM (#8566473) Homepage
    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.
  • Re:Adaption, but.. (Score:5, Insightful)

    by csirac ( 574795 ) on Monday March 15, 2004 @03:55AM (#8566495)
    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
  • Why C needs help (Score:5, Insightful)

    by ttfkam ( 37064 ) on Monday March 15, 2004 @03:58AM (#8566504) Homepage Journal
    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.

  • by Fuzuli ( 135489 ) on Monday March 15, 2004 @04:09AM (#8566534)
    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...
  • Not that simple (Score:5, Insightful)

    by xswl0931 ( 562013 ) on Monday March 15, 2004 @04:10AM (#8566536)
    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.
  • Re:So... (Score:5, Insightful)

    by GnuVince ( 623231 ) on Monday March 15, 2004 @04:13AM (#8566546)
    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.

  • Re:It's Dead Jim (Score:1, Insightful)

    by Anonymous Coward on Monday March 15, 2004 @04:15AM (#8566556)
    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.
  • c++ (Score:2, Insightful)

    by savuporo ( 658486 ) on Monday March 15, 2004 @04:29AM (#8566598)
    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.
  • Re:Let it die! (Score:2, Insightful)

    by mpmansell ( 118934 ) on Monday March 15, 2004 @04:29AM (#8566599)
    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' :)
  • Re:What about C++? (Score:1, Insightful)

    by Anonymous Coward on Monday March 15, 2004 @04:31AM (#8566604)
    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.
  • by spongman ( 182339 ) on Monday March 15, 2004 @04:41AM (#8566637)
    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.

  • by jandersen ( 462034 ) on Monday March 15, 2004 @04:43AM (#8566640)
    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..
  • by Anonymous Coward on Monday March 15, 2004 @04:45AM (#8566645)
    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...
  • by Diomidis Spinellis ( 661697 ) on Monday March 15, 2004 @04:47AM (#8566650) Homepage
    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"

  • popularity (Score:3, Insightful)

    by mpmansell ( 118934 ) on Monday March 15, 2004 @04:52AM (#8566662)
    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 :)
  • Re:Let it die! (Score:3, Insightful)

    by LarsWestergren ( 9033 ) on Monday March 15, 2004 @04:55AM (#8566664) Homepage Journal
    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. :-)
  • The real question (Score:3, Insightful)

    by jandersen ( 462034 ) on Monday March 15, 2004 @04:55AM (#8566665)
    "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.
  • by SpaghettiPattern ( 609814 ) on Monday March 15, 2004 @04:58AM (#8566674)
    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.
  • by selderrr ( 523988 ) on Monday March 15, 2004 @05:02AM (#8566687) Journal
    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 !
  • Re:It's Dead Jim (Score:5, Insightful)

    by LarsWestergren ( 9033 ) on Monday March 15, 2004 @05:03AM (#8566688) Homepage Journal
    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.
  • Re:Keep it real... (Score:3, Insightful)

    by Sique ( 173459 ) on Monday March 15, 2004 @05:11AM (#8566704) Homepage
    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.)
  • by DerPflanz ( 525793 ) <bart@NOSPAm.friesoft.nl> on Monday March 15, 2004 @05:43AM (#8566783) Homepage

    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.

  • Re:So... (Score:1, Insightful)

    by Anonymous Coward on Monday March 15, 2004 @05:45AM (#8566789)
    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].

  • by Anonymous Coward on Monday March 15, 2004 @06:06AM (#8566846)
    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
  • Re:Keep it real... (Score:4, Insightful)

    by TummyX ( 84871 ) on Monday March 15, 2004 @06:09AM (#8566859)
    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.
  • by bizcoach ( 640439 ) on Monday March 15, 2004 @06:22AM (#8566896) Homepage
    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 [dotgnu.org], 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.

  • by edxwelch ( 600979 ) on Monday March 15, 2004 @06:41AM (#8566950)
    "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++.
  • Re:So... (Score:3, Insightful)

    by cpghost ( 719344 ) on Monday March 15, 2004 @07:18AM (#8567026) Homepage

    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.

  • Re:What about C++? (Score:3, Insightful)

    by Peorth ( 719504 ) on Monday March 15, 2004 @07:18AM (#8567029)
    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.
  • Poor Perspective (Score:3, Insightful)

    by Mark_MF-WN ( 678030 ) on Monday March 15, 2004 @07:32AM (#8567053)
    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.

  • by gatkinso ( 15975 ) on Monday March 15, 2004 @07:33AM (#8567056)
    Way to completely miss the point of language independence.

  • Re:What about C++? (Score:2, Insightful)

    by digitalsurgeon ( 629388 ) on Monday March 15, 2004 @07:34AM (#8567061) Homepage Journal
    but c is better suited for embedded applications is it not? where the performance if of utmost importance ?
  • by rjshields ( 719665 ) on Monday March 15, 2004 @07:40AM (#8567074)
    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.
  • Re:What about C++? (Score:3, Insightful)

    by Deusy ( 455433 ) <.gro.ixev. .ta. .eilrahc.> on Monday March 15, 2004 @08:06AM (#8567134) Homepage
    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.
  • by dnoyeb ( 547705 ) on Monday March 15, 2004 @08:11AM (#8567144) Homepage Journal
    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.
  • by WARM3CH ( 662028 ) on Monday March 15, 2004 @08:53AM (#8567285)
    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.
  • The point? (Score:4, Insightful)

    by DrXym ( 126579 ) on Monday March 15, 2004 @08:57AM (#8567308)
    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.

  • by WARM3CH ( 662028 ) on Monday March 15, 2004 @09:12AM (#8567372)
    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.
  • Re:What about C++? (Score:1, Insightful)

    by Viol8 ( 599362 ) on Monday March 15, 2004 @09:14AM (#8567379) Homepage
    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.
  • by CarrionBird ( 589738 ) on Monday March 15, 2004 @09:48AM (#8567551) Journal
    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.

  • Re:What about C++? (Score:2, Insightful)

    by gauchopuro ( 613862 ) on Monday March 15, 2004 @09:50AM (#8567569)
    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.
  • Re:What about C++? (Score:2, Insightful)

    by gauchopuro ( 613862 ) on Monday March 15, 2004 @10:17AM (#8567719)
    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.
  • by hak1du ( 761835 ) on Monday March 15, 2004 @11:08AM (#8568157) Journal
    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.
  • Re:What about C++? (Score:4, Insightful)

    by gte910h ( 239582 ) on Monday March 15, 2004 @11:36AM (#8568443) Homepage
    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.
  • by Anonymous Coward on Monday March 15, 2004 @01:25PM (#8569541)
    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.
  • by Ba3r ( 720309 ) on Monday March 15, 2004 @02:46PM (#8570490)
    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.
  • Re:What about C++? (Score:4, Insightful)

    by Progman3K ( 515744 ) on Monday March 15, 2004 @03:56PM (#8571157)
    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.

  • by Kaldaien ( 676190 ) on Monday March 15, 2004 @04:34PM (#8571655)
    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.
  • Re:couldn't resist (Score:2, Insightful)

    by spudgun ( 39016 ) on Monday March 15, 2004 @04:45PM (#8571780) Homepage
    Fact: C is dead
    Umm Doesn't that Linus guy write his little project thing in C ?

    what is it called again ?
  • Re:You Sound Like (Score:3, Insightful)

    by Mark_MF-WN ( 678030 ) on Monday March 15, 2004 @05:08PM (#8572065)
    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.

  • Re:Crush Scares Me (Score:3, Insightful)

    by be-fan ( 61476 ) on Monday March 15, 2004 @09:17PM (#8574343)
    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.

What is research but a blind date with knowledge? -- Will Harvey

Working...