Slashdot Mirror


How C# Was Made

prostoalex writes "Bruce Eckel (from the Thinking in C++/Java/Patterns/Enterprise Java fame) and Bill Venners have interviewed programming legend Anders Hejlsberg. After 13 years in Borland and joining Microsoft in 1996, Hejlsberg now leads the development of C# language and talks about the development process, reasons some things exist in C# and some not, as well as future directions."

391 comments

  1. "Co-opt Java" by tealover · · Score: 2, Informative

    I believe that was the mandate given Hejlsberg by Gates.

    --
    -- You see, there would be these conclusions that you could jump to
    1. Re:"Co-opt Java" by tjmsquared · · Score: 5, Insightful

      I don't know why Java developers always feel the need to point out that C# took a lot of ideas from Java. I don't see C++ developers always pointing out that Java's mandate was to "co-opt" C++. Of course C# took a lot of ideas from Java (I don't think Microsoft has ever denied this), because Java got a lot of things right. C# also made a lot of improvements (event handling is MUCH improved in C# for example) and is a great language to program in. I think it would be even better if there were a .NET runtime for an OS other than Windows, but the good people on the Mono project are working on that already.

    2. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      "yawn"

      Wake me up when the nerds find something interesting to talk about, k?

      I'll be in your mom's bedroom, dead tired.

    3. Re:"Co-opt Java" by tealover · · Score: 5, Insightful

      In a sense, Java was designed to co-opt C++. But co-optinging C++ was not made as a business decision to lock in Sun customers, it was made as part of Sun's vision of "The Net is the Computer" (or whatever they called it).

      Sun embraced the internet years before Microsoft and looked out into the future and realized that desktop computing and huge, standalone applications were going to be increasingly replaced by device computing and small, internet downloadable applications would be prevalant.

      To that end, they tried to design a language that was simple, that had built-in libraries to handle basic internet protocols and to a large extent, their vision was spot-on and Java was hugely successful.

      Without Microsoft spending years trying to undercut them it's very conceivable that Java would be the lingua-franca of the internet right now.

      --
      -- You see, there would be these conclusions that you could jump to
    4. Re:"Co-opt Java" by prockcore · · Score: 4, Insightful

      Fine with me. A java-like language that doesn't gobble ram like no tomorrow? Sounds good.

      As a bonus, Gtk# has the best API I've ever used in a gui toolkit.

    5. Re:"Co-opt Java" by irokitt · · Score: 1

      I'm sorry, I should have made it more clear that I was being sarcastic.

      --
      If my answers frighten you, stop asking scary questions.
    6. Re:"Co-opt Java" by yomegaman · · Score: 5, Insightful

      What are you talking about? Nobody uses java for "internet downloadable applications", or even intranet downloadable ones. Their vision of thin-client computing was shown to be a pipe dream, to everyone except you anyway.

      --
      ...wearing a skin-tight topless leather jumpsuit, with cutaway buttocks and transparent crotch panel.
    7. Re:"Co-opt Java" by tealover · · Score: 2, Informative

      I use them on my cell-phone daily. It appears you're still thinking in terms of desktop applications. You better start thinking in the now before you become obsolete.

      --
      -- You see, there would be these conclusions that you could jump to
    8. Re:"Co-opt Java" by 1010011010 · · Score: 3, Insightful


      That C# takes ideas from java is irrelevant. .Net and C# exist for exactly one reason: Bill Gates wanted to stop Java. Bill likes to have control. He couldn't tolerate Java, because it didn't allow him to have control.

      Maybe you like C#, maybe you don't. maybe it's useful for your project, maybe it's not. Those are side issues -- its role as a tool is secondary.

      DotNet performs the task for which it was designed very well. That task is, of course, to contain programming talent and effort within the Windows world. That DotNet better than VB and Win32 is fundamentally a testament to how awful VB and Win32 are.

      I'm not bagging C# or DotNet on their technical merits. They are not bed in that respect. But C# and DotNet's utility as development tools for Windows are only secondary to their utility as a means for maintaining Microsoft's control of the market.

      C# and DotNet are beautiful Gates on the prison of the computing world.

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    9. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      Guess you've never used QT then.

    10. Re:"Co-opt Java" by Lord+Omlette · · Score: 1

      I quote: "the cheddar breed jealousy 'specially if that man fucked up, get your ass stuck up."

      --
      [o]_O
    11. Re:"Co-opt Java" by kyz · · Score: 5, Insightful

      Java was designed to co-opt Smalltalk, or at least Sun brand it and bring it up to date.

      Think about it... Smalltalk's main points were the single root object heirarchy, the bytecode compilation, and the large runtime library including full GUI. Did C++ have this? No. It was more "object oriented concepts ported to C" - lean and mean, machine dependant and no standard GUI. The C++ generics and the STL weren't standard when Java arrived.

      --
      Does my bum look big in this?
    12. Re:"Co-opt Java" by matchlight · · Score: 4, Insightful

      But people DO say that Java was co-opted C++, including you and now .. me. Languages naturally progress from those that already exists like every other technology. Why reinvent the wheel and find out that squares don't work... over and over.

      Java is taking ideas from C# as well, just take a look at 1.5 with enums, yes I know they existed before C# but I think their existence in C# prompted the move.

      I just find it funny that pro-MS people often don't like to hear that C# could even possibly be an evolutionary step off of Java. And unlike older languages, Java itself is still evolving. The .NET runtime concept that works so much better than Java on a Windows machine is something that could exist for Java some day. C# might actually have a legitimately supported OS other that Windows, and although the Mono project is great, it ain't by MS.
      I've used both and the both work and they'll both change... for a while ... then another will come along.

      I wounldn't try to find religion in a programming language, they come and go too quickly.

    13. Re:"Co-opt Java" by malakai · · Score: 4, Insightful
      Those are side issues -- its role as a tool is secondary

      Your comment is a fascinating insight into a fanatical mind. You may not yet be as bad as the guy that lives on the corner of my block, with the foil under his NY Yankees basball cap, but the distinction is small.

      You've esentially said C# and .Net may be a great language and framework, may make a developers life easier, may generate better application for our clients (internal and external)... but you don't like Bill Gates and therefore any and all points are moot.

      Wonderfull logic.

      Your prison/Gates metaphor-pun is wonderfully melodramatic as well.

      Thanks for play,
    14. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      Meh, I'm waiting for QT's API to stabilize. I don't like having 7 versions of a toolkit on my HD.

    15. Re:"Co-opt Java" by 0WaitState · · Score: 2, Insightful

      just take a look at 1.5 with enums, yes I know they existed before C# but I think their existence in C# prompted the move.

      Uh, no. Enums' existence in ansi C and C++ prompted the move, given the large number of developers who work in both C/C++ and java, who know from real-world experience that enums improve maintainability and reliability of code.

      --

      Remain calm! All is well!
    16. Re:"Co-opt Java" by 1010011010 · · Score: 1

      Hehe! A little touchy, aren't you? I said nothing about liking or not liking Bill Gates. I also said nothing about your clients (internal and external).

      I just stated out the true raison d'etre of DotNet. it's role as a tool *is* secondary -- to Microsoft.

      I notice that you did not contradict me.

      MSFT created DotNet and C# to displace Java, maintain some measure of control over application development, and reinforce their OS monopoly. Please provide proof to the contrary -- you seem to feel strongly about it. Lay it out for us.

      "Wonderfull [sic] logic."

      Yes. You made arguments and assertions that I didn't, attributed them to me, then faulted me for them. Yes, truly wonderful.

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    17. Re:"Co-opt Java" by __past__ · · Score: 3, Insightful
      Without Microsoft spending years trying to undercut them it's very conceivable that Java would be the lingua-franca of the internet right now.
      Then thank god for microsoft. I am rather confident with an open-standards-based, multilingual internet as it is, even if it could have been better.
    18. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      Dude, I work for Microsoft, and on the CLR. There isn't anyone on the entire team who will hesitate to point out that much of what we do came from Java. Java was a big deal in programming languages, we'd have to have been stupid not to look at it. Microsoft devs get called lots of things, but stupid is rarely one of them.

    19. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      How about you stop posting retarded AC replies to support your tired rhetoric 1010011010? Thanks.

    20. Re:"Co-opt Java" by 1010011010 · · Score: 1

      Are you having a nice conversation with yourself? I post with my name.

      IHBT.

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    21. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      And you just had to read those replies under AC replies? Sure. You are an obvious chronic AC follow upper.

    22. Re:"Co-opt Java" by 91degrees · · Score: 1

      It's popular to complain about MS because that's the company that causes endless problems repeatedly, and their monopoly on the desktop really isn't doing anyone any favours. As a result, people get the impression that anything MS does must be evil. Of course, if you look at it, you'll see that Sun (and Oracle, and probably a few others for that matter) are just as happy to play dirty tricks, and try to grab hold of a tasty monopoly of their own.

      Personally, I see C# and Java as a good thing. MS doesn't have a monopoly on C compilers, and certainly doesn't have a monopoly on programming languages. Java, C#, and all the established languages, so the only way to make C# a success is to make it better. This is good for all of us. If it's good for MS as well, so be it.

    23. Re:"Co-opt Java" by __past__ · · Score: 1
      Java is obviously a result of many older languages - it's syntax (and hughe parts of the semantics) are derived mostly from C++, the VM/JIT idea is largely a Smalltalk ripoff, garbage collection has been around for at least 40 years before Sun adopted it, some things it owes to earlier Sun research languages like Self (too few, IMHO), you name it.

      On the other hand, these are only means to an end. And, as stated in the early Oak/Java papers, this end was creating a language for mediocre programmers, i.e. a language that can be used in huge teams of not-so-skilled, exchangable code monkeys - a PHBs dream come true. And that is why it succeeded, because it was a really great fit for these projects, with all the bondage-and-discipline stuff, the crippled expressiveness, the dumbing-down mistaken as abstraction. And that is probably a good thing, because the huge projects staffed with underskilled code-monkeys happened before as well, only in languages that sucked for this scenario, C++ being the most common example. But why any self-respecting hacker would want to use it any more than COBOL and other languages "designed for other people" still is a mystery to me.

    24. Re:"Co-opt Java" by 1010011010 · · Score: 1

      I'm sure you're familiar with "Nested Mode." No? Try it.

      IHBTA.

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    25. Re:"Co-opt Java" by 1010011010 · · Score: 1

      Ah, the sweet voice of reason. I didn't realize ACs could mark people as Foes. Malakai.

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    26. Re:"Co-opt Java" by Matt+-+Duke+'05 · · Score: 1

      it is a great day in the world when i see "the 10 crack commandments" quoted on slashdot. thank you dear sir for brightening my day.

      --
      -Matt
      Duke '05
    27. Re:"Co-opt Java" by 91degrees · · Score: 2, Insightful

      Yeah, but Java existed because Sun wanted to have control, and was simply an attempted coup to sieze control from Microsoft. The Apple Mac existed because Apple wanted to control desktop computing.

      Most companies want to dominate the market. The difference is that for the vast majority of them, market domination is a ludicrous concept.

    28. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      "I just find it funny that pro-MS people often don't like to hear that C# could even possibly be an evolutionary step off of Java."

      Its not that the fact C# has features inspired by Java that pro-MS people dont like hearing. It is the way pro-Java people use that statement to undermind and insult the existence of C#. When they say, "C# was co-opted from Java". Their not giving C# a compliment.

    29. Re:"Co-opt Java" by Brandybuck · · Score: 3, Insightful

      Your comment is a fascinating insight into a fanatical mind.

      Fanatical no. Cynicism spawned actions of Microsoft? Maybe.

      Despite whatever wonderful attributes C# and .NET have, they do not override the fact that the language and framework are under the control of Microsoft. All the people bitching at Sun's control of Java seem to just look the other way when .NET is mentioned. Who gives a rip that they've submitted it to some standards committee? Do you think Microsoft can't "embrace and extend" .NET? Do you think they don't have several dozen submarine patents ready to go?

      I'll believe the hype when I see a workable, usable, and complete implementation of .NET on any other platform besides Windows. I can take a Java app developed on Windows and run it on Linux, FreeBSD and Solaris. I cannot do the same for *ANY* .NET application.

      Microsoft wants developer writing Windows-only applications. .NET is one tool they are using to accomplish this.

      --
      Don't blame me, I didn't vote for either of them!
    30. Re:"Co-opt Java" by D-Cypell · · Score: 1
      event handling is MUCH improved in C# for example


      I dont agree. All C# does is take the widely understood OOP concept named the observer pattern and formalize it in language syntax (Delegates).

      I personally feel that simple syntax is something that makes Java great. Keep the syntax simple and recommend good OOP to do things like event listening.
    31. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      they're all tools to provide a means to an end. If you can develop a vb killer for Linux, go ahead do it.

    32. Re:"Co-opt Java" by stuntpope · · Score: 1

      uh, Java WebStart? If 'nobody' includes the US Government, then ok, you're right.

    33. Re:"Co-opt Java" by Glug · · Score: 1

      But people DO say that Java was co-opted C++

      People that say that are talking about the technical side of things. The business aspects are a different issue. Java did not co-opt C++ with the goal of eliminating all future development in C++ in mind, but co-opting commercial software development based on Java is precisely what C# is all about. Sun never perceived that their operating system market share was threatened by the use of C++. Microsoft, on the other hand, did perceive that their operating system market share was threatened by the use of Java, and C#/.NET was their solution.

      Java allowed developers to write software for Windows that was not dependent on Windows APIs. There is no software development platform technology that Bill Gates is more afraid of. C# and the .NET core concept - that of compiling all other languages into a bytecode interpreter that Microsoft controls - not Sun, not anybody else - was the driving force behind the development of C#. C#'s technology was nowhere near as important to Microsoft as the need to deal with the threat posed by Java.

      When it comes to making a major technology commitment decision such as deciding whether to base future development of a large commercial software development project on C# and .NET or Java or Forth on old surplus Lego Mindstorms RCX bricks, one had better consider all the issues. The business strategy behind C#'s existance is highly relevant to such decisions because C# is designed to make sure you buy into and stick with C#, .NET, and all that that entails. If your business plan for a product calls for marketing it to anything other than the Windows customer base, you're dead if you don't take C#'s strategic reason for existance into account.

    34. Re:"Co-opt Java" by callipygian-showsyst · · Score: 1

      What about Apple and "Objective-C"? Isn't that a similar (but failed) attempt at a proprietary language?

    35. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      I like the cut of your jib, sir.

    36. Re:"Co-opt Java" by SideshowBob · · Score: 1

      ObjC is a standardized language. Mac OS X uses GCC, the language parser is open and in the main branch of GCC, and you can compile ObjC code on any platform that has a GCC port. Nothing at all like .Net (or even Java)

      The fact that for most of its life it has been associated with one set of frameworks (NeXT's/Apple's) is an unfortunate coincidence. In fact Objective-C predates NeXT. ObjC even predates C++.

      Apple doesn't own ObjC, and in fact didn't even create it.

    37. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      Well, perhaps development at Sun is very slow, but enums were in C++ long before Java was created and it's only after C# that they suddenly appeared in Java.

    38. Re:"Co-opt Java" by maxgilead · · Score: 1

      But why any self-respecting hacker would want to use it

      One of many answers would be: because it's nice, clean, object-oriented, high level language without many problems that are problematic in lower-level languages (C, C++, C# to name most obvious ones). For me it's pleasure to work with Java. When coding in C/++ I was continuously fighting with code about countless irrelevant details and problems which are simply gone when using Java.

      If some of you are wondering about C# being lower level than Java - learn about both languages better. It is lower level language, more primitive and with inferior VM design. No, I don't imply Java is perfect - it's not. But C# is much worse than it.

    39. Re:"Co-opt Java" by ClosedSource · · Score: 1

      "Java allowed developers to write software for Windows that was not dependent on Windows APIs"

      Excuse me? Java applications that run under Windows are fully dependent on the Windows API. What do you think the JVM talks to - the ROM BIOS?

      As far as the threat posed by Java, Sun had already failed on the Windows desktop before C# and the CLR were released.

    40. Re:"Co-opt Java" by blincoln · · Score: 2, Interesting

      Nobody uses java for "internet downloadable applications", or even intranet downloadable ones.

      Retek does, and it's one of - if not *the* - most popular set of apps for the backend of the retail industry in the US.

      --
      "...always new atoms but always doing the same dance, remembering what the dance was yesterday." -Richard Feynman
    41. Re:"Co-opt Java" by Lord+Omlette · · Score: 1

      It gets better, I had to google in order to double-check the lyrics, and I came across this.

      --
      [o]_O
    42. Re:"Co-opt Java" by mrm677 · · Score: 1

      Sun embraced the internet years before Microsoft and looked out into the future and realized that desktop computing and huge, standalone applications were going to be increasingly replaced by device computing and small, internet downloadable applications would be prevalant.

      To that end, they tried to design a language that was simple, that had built-in libraries to handle basic internet protocols and to a large extent, their vision was spot-on and Java was hugely successful.


      Yeah, Sun had vision alright. Funny that they designed Java originally for embedded systems...then that whole Internet thing came along...

    43. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      Don't get too carried away with your '[sic]' comments... your spelling isn't any better.

    44. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      I can take a Java app developed on Windows and run it on Linux, FreeBSD and Solaris

      Unless that app was developed with the latest JVM and uses threads, in which case FreeBSD support (such as it is) goes to crap.

    45. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      Java applications that run under Windows are fully dependent on the Windows API. What do you think the JVM talks to - the ROM BIOS?

      I think you may be missing what a Virtual Machine does.

      The JVM for Windows is fully dependent on the Windows API, but the JVM for Solaris, the JVM for Linux, and the JVM for the Timex Sinclair 9000 are not. The threat to Microsoft was that someone could write a Java program, compile it into Java bytecode, and that same bytecode would run on all of those JVMs without changes. The idea was that the JVM would act as an OS abstraction layer, and that no OS-specific API calls would have to exist in a Java program. That's what "write-once run-anywhere" was referring to.

      As far as the threat posed by Java, Sun had already failed on the Windows desktop before C# and the CLR were released.

      Yes, Microsoft's changes to the VM were both sneaky and effective.

    46. Re:"Co-opt Java" by City+Jim+3000 · · Score: 0

      Microsoft wants developer writing Windows-only applications. .NET is one tool they are using to accomplish this.

      And what, exactly, is wrong with that? Right now I'm developing two .NET applications which are specified by my customers to run only in Windows (98 and upwards). I'm using Access for data storage and with all the ease of .NET I'm getting time for my hobbies too, which includes writing a Java-based "WWW" game.

    47. Re:"Co-opt Java" by Anonymous Coward · · Score: 2, Informative

      Your arguments on Java are baseless. Java was originally designed to be as an appliance/emmbedded application development system. The problem was they couldn't get anyone interested at the time they originally developed it so they decided that "Hey, this internet thing is getting some publicity, let's use it there." Ten years later, it's finally starting to get used for what it was originally intended: cell phones, ATM's, etc.

    48. Re:"Co-opt Java" by ClosedSource · · Score: 1

      "The JVM for Windows is fully dependent on the Windows API ..."

      Perhaps the problem was that you didn't say what you were thinking in your first post.

      "Yes, Microsoft's changes to the VM were both sneaky and effective"

      But I was responding to your claim that C# was the Java killer. I don't agree with your conclusions about why Java failed on the desktop, but if you agree that it did, than there's no need for MS to produce C# to kill something that is already dead.

    49. Re:"Co-opt Java" by sageman · · Score: 1

      Java, really, was most-likely designed to co-opt more than just one language. It's more than likely that the developers looked at great Smalltalk features (which was co-opting the idea of objects first introduced in the original OO language, Simula 67, created, oddly enough, in 1967, one could claim) such as the bytecode compilation, but now you DO see the co-opting of C++ with, ta-da, Java Generics and Enumerated Data types (as of Java 1.5, http://java.sun.com/developer/technicalArticles/re leases/j2se15/). And as far as garbage collection, well, other languages had this feature. But, really, who cares? Java is a great language (I don't know about C#, as I know, pretty-much, nothing about it yet because I haven't found a way to even write them in linux and don't know if I even want to) and that's pretty much the most important feature of Java (co-opted from all other great languages, haha).

      --
      --- "To iterate is human, to recurse divine." -- Robert Heller
    50. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      Please provide evidence to support your claim, first.

    51. Re:"Co-opt Java" by Anonymous Coward · · Score: 2, Interesting

      Sun's Java Desktop System seems to be doing quite well.

      10,000 to the United India Insurance Company, 500,000 to 1,000,000 per year to the China Standard Software Co, and approval from the UK government for a 5 year purchase agreement.

      Downloadable Java applets seem to be doing quite well on the internet, including for games, custom user interfaces, security applications, etc.

      At the company I work at, one of our main design tools is a java application that you just copy from the server (essentially download) and run. The developers came from another company where they were doing the same thing.

      NASA is using Java to control the Mars Rovers, and track satellites.

      More and more tools built by Computer Science researchers are in Java, like this Bayesian Network tool, or are switching from other languages to Java, like this static program verification tool.

      In short, I think you completely missed it with your answer.

    52. Re:"Co-opt Java" by angel'o'sphere · · Score: 1


      Their vision of thin-client computing was shown to be a pipe dream

      The company I'm working for currently has about 10,000 thin clients running.
      Not sure if that is right a "pipe dream".
      When you see how many Active-X controls are embedded and downloaded in web pages our days, I think even the "internet downloadable applications" thing is still existing.
      Furthermore: java is mainly used via "Java Web Start" if downloading is wanted.
      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    53. Re:"Co-opt Java" by angel'o'sphere · · Score: 1

      The C++ generics and the STL weren't standard when Java arrived.


      C++ never had or has generics. It has templates, which is a hughe difference. Also it had templates allready when Java arrived and STL also did allready exist.

      I used the original STL implementation in 1993/1994 when HP offered it as downloads.

      However you are competely right: STL was not accepted into the standard and the so called "C++ standard library" where the STL is now part of, did not exist either or was not submitted as standard.

      Most C++ compilers did not reliable support STL till 1999. Thats imho the main reason why Java got such a boost. because a lot of C++ coders simply did no longer want to have all the porting issues.

      C++ still today has no standard GUI library, or standard TCP/IP libraries or standard threading libraries.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    54. Re:"Co-opt Java" by Brandybuck · · Score: 1

      And what, exactly, is wrong with that? [Windows-only applications]

      Oh man, you have a lot to learn! The problem with Windows-only applications is that they only run on Windows.

      Maybe in your fantasy world you think utopia will only come about when everyone is forced to use Windows, but in the reality it will never happen. What will happen instead is a polarization if increased incompatibilities.

      Portability should be your number one concern. Always. If you can't be portable, clearly document why you can't, and where the unportable parts are. As it now stands, .NET is not a portable framework.

      --
      Don't blame me, I didn't vote for either of them!
    55. Re:"Co-opt Java" by rnd() · · Score: 1

      Sun embraced the internet years before Microsoft and looked out into the future and realized that desktop computing and huge, standalone applications were going to be increasingly replaced by device computing and small, internet downloadable applications would be prevalant.


      Can you point to any significant examples of the paradigm shift that Microsoft supposedly sat on the sidelines and watched?

      As one of this post's sister posts mentions, nobody uses java for internet downloadable apps.

      --

      Amazing magic tricks

    56. Re:"Co-opt Java" by 0x00000dcc · · Score: 1
      You may not yet be as bad as the guy that lives on the corner of my block, with the foil under his NY Yankees basball cap, but the distinction is small.

      Man you hit the nail on the head with that one! As a long-time Red Sox fan, I have come to know Yankees fans are friggin nuts, but what's up with the tin foil under the caps? A new Steinbrenner (r) mandate? Sheesh ...

      --

      -- (Score:i, Imaginary)

    57. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      Well... Java was a last ditch effort by Sun to stay alive as well. Seeing that most of the development teams were leaving Sun platforms for all the other platforms so Sun says... well, we gotta make something that is platform independent so we can leverage development efforts on other platforms or we gonna not have any development on our platform any more.

      Also, Sun has retained the ownership to Java so it isn't even a public standard (C# is, btw). It's a perfect example of the hypocrisy in the "Open" community.

    58. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      please tell me you're not the same person advocating GTK#, hahahaha. oh boy.

      qt's lovely. sure binary compatability's broken a couple of times but source compatability is excellent.

    59. Re:"Co-opt Java" by aztracker1 · · Score: 1

      I don't beleive it was solely to circumvent Java perse.. also, how many "open source" implimentations of "Java" are there? there are two maturing projects in porting .Net ...

      I hate MS's politics.. however, imho .Net, esp ASP.Net are probably the best developer platform to date. Now, with regards to C#, it was based in C-Style syntax, as was C++, and Java.. the framework itself burrows ideas from Java, but it isn't like the JVM was the first runtime environment for a language.. or the first bytecode language either.

      C# is a pretty nice language, and the layout allowing for integration with unmanaged(legacy) code is much easier than it is in Java. There are a few other things that are nicer (IMO)... I would love to see a cross-platform, generic XUL based interface (I know the next .net is supposed to have something similar).. that works in ms' .net, as well as mono, or portable.net... that also works accrossed gnome, kde, osx/aqua, and windows... I know that Java brings a lot of that, but the constant changing of the language/and revisions to it actually detract... C#, and the .Net framework hasn't really significantly changed since first introduced.

      --
      Michael J. Ryan - tracker1.info
    60. Re:"Co-opt Java" by Lord+Kano · · Score: 1

      Nobody uses java for "internet downloadable applications", or even intranet downloadable ones.

      Oracle does!

      LK

      --
      "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
    61. Re:"Co-opt Java" by juancn · · Score: 1

      Well, nobody used Java... but everybody uses Macromedia's Flash.

      At that point they were right, but Java ended up being really good for the server market.

    62. Re:"Co-opt Java" by matchlight · · Score: 1

      Exactly!

    63. Re:"Co-opt Java" by Anonymous Coward · · Score: 0

      Microsoft devs get called lots of things, but stupid is rarely one of them.

      Sure they are, all the time in fact. Don't you read Slashdot?

    64. Re:"Co-opt Java" by chicogeek · · Score: 1

      Perhaps before correcting the spelling of others, you should correct your own poor selection of words?

      From your original post:

      "They are not bed in that..."

      So, do you have anything to back up your claim that .NET exists solely to displace Java? I didn't think so. You may carry on with your delusion...

  2. Interesting Hejlsberg article by Anonymous Coward · · Score: 5, Informative

    There a great interview with The father of C# here too,

    1. Re:Interesting Hejlsberg article by Anonymous Coward · · Score: 0

      > There a great interview [sys-con.com] with The father of C# here too,

      I thought that James Gosling was the Father of C# ;-).

    2. Re:Interesting Hejlsberg article by Anonymous Coward · · Score: 0

      someone tries to warn us /.ers its a tubgirl link and gets modded down. booo to you moderators

  3. Re:C# History Site by Anonymous Coward · · Score: 0

    Yep, it boggles my mind why people do this crap.

  4. Interview on the .NET Show by enkafan · · Score: 5, Informative

    There is a pretty good interview on the .NET show on MSDN with Anders too. It runs about one hour, so get a comfy chair.

    1. Re:Interview on the .NET Show by ryen · · Score: 0

      that guy looks frightingly similar to Bill Gates. Microsoft clones, anyone?

  5. Re:C# History Site by Anonymous Coward · · Score: 0

    It's a scat site. Mod it to hell.

  6. More about Anders Hejlsburg by atlasheavy · · Score: 4, Informative

    Joel Spolsky published a great article a while back on .Net, his company's strategy for the platform, and why Anders so damn cool. Also, just in case you're curious as to how his last name is pronounced, it's pronounced hells-burg.

    --

    iRooster, the Mac OS X a
    1. Re:More about Anders Hejlsburg by The_DOD_player · · Score: 5, Informative

      Also, just in case you're curious as to how his last name is pronounced, it's pronounced hells-burg.

      No, it most certainly is not!
      First its Hejlsberg, not Hejlsburg. "Hejl" is pronounced just like "Heil", as a german would in a WW2 movie :). "berg", the "g" is more or less mute, so it pronounced more like "bear".
      So its "Heils-bear"

    2. Re:More about Anders Hejlsburg by bolind · · Score: 3, Informative

      It's Hejlsberg, and it's pronounced more like "heil-s-bear", heil as in "sieg heil" or "tile".

      I should know, as we come from the same country.

    3. Re:More about Anders Hejlsburg by atlasheavy · · Score: 0, Offtopic

      thanks for the clarification. I'll have to correct the person who told me in no uncertain terms "it's pronounced hells-burg... don't mispronounce Anders' name!" :-)

      --

      iRooster, the Mac OS X a
    4. Re:More about Anders Hejlsburg by atlasheavy · · Score: 0, Offtopic

      hold on one second while I pull my foot out of my mouth.... thanks for correcting me, i sure look dumb now, but at least i know enough to correct the person who i heard that from :). cheers.

      --

      iRooster, the Mac OS X a
  7. Here's a direct link to the Artima articles... by tcopeland · · Score: 5, Informative

    ...right here to save you a click thru the MSDN page.

    1. Re:Here's a direct link to the Artima articles... by phxhawke · · Score: 1

      Which is what I was about to post as well. It just
      took me too long to get find damn it!

    2. Re:Here's a direct link to the Artima articles... by phxhawke · · Score: 1

      Well, I know what I'm going to be modding down once I get my Mod Points.

  8. Re:How and Why C# Was Made by JamesP · · Score: 0, Flamebait

    Sorry to disagree...

    Java is the worse crap SUN could have pulled. The whole of it, extending interfaces, illogic class naming, having to call a trillion classes to do something. .NET is usable, but Java is something horrific.

    C# is much more like Python than Java...

    --
    how long until /. fixes commenting on Chrome?
  9. Re:How and Why C# Was Made by atlasheavy · · Score: 5, Interesting

    Microsoft starts trying to tell people that "OO is soo... yeasterday. You want Indigo."

    You're referring to Don Box, specifically, right? I don't think it's so much that Don is pooh-pooh'ing OOP in general, it's that he feels that a service-oriented architecture is better suited to the kind of problems we face today than DCOM or CORBA. His point is that trying to use an OOP metaphor for enormous, architecturally sound remote object invocation/data transfer systems is a terribly complex task.

    Also, keep in mind that Don wrote *the* book on Microsoft's COM technology; OOP has its place, but CORBA and DCOM are not really the place.

    --

    iRooster, the Mac OS X a
  10. How C# was made by moronga · · Score: 4, Funny

    They hit the black key to the right of C.

    1. Re:How C# was made by irokitt · · Score: 1

      Your keyboard is different from mine. I have to simultaneously hold down the third key over from C and hit the key centered above the W and E.

      --
      If my answers frighten you, stop asking scary questions.
    2. Re:How C# was made by Anonymous Coward · · Score: 0

      what are you talking about.... I always thought that was Bb

    3. Re:How C# was made by jhines · · Score: 2, Funny

      It sounds better than D-Flat, at least to the marketing droids.

    4. Re:How C# was made by chromatic · · Score: 5, Funny

      I thought my amplifier was cool for going up to 11, but it can't compete with a piano that goes up to W!

    5. Re:How C# was made by Anonymous Coward · · Score: 0

      I have to press the lower of the two keys to the left of my Return key. British keyboards are much more convenient for any language which uses # for comments...

    6. Re:How C# was made by Anonymous Coward · · Score: 0

      Db, dude... Bb is a completely different thing.

    7. Re:How C# was made by torenth · · Score: 1

      Actually, D-Flat only sounds the same as C-Sharp on a piano (pianos are even-tempered, and slightly out of tune compared to, say, violins). They should actually be about a half step apart, and so aren't actually the same note.

      --
      'Phone-jacking: Give someone a ring, they'll have to answer to find out who it is!' - Threni
    8. Re:How C# was made by Anonymous Coward · · Score: 0

      No, I'm guessing that the story started of with "C++ and Java loved each other very much..."

    9. re: How C# was made by ratfynk · · Score: 1
      Certainly not sugar and spice, though it might seem nice, in truth it was written by mice.

      the answer to the universe and everything is.....C#

      --
      OH THE SHAME I fell off the wagon and use sigs again!
    10. Re:How C# was made by Anonymous Coward · · Score: 0

      Where the hell did you study music theory? D-flat and C-sharp are the same note, period. The only time they are a half-step apart on a violin is when it's being played by a tone-deaf amputee.

    11. Re:How C# was made by transient · · Score: 1

      I could see a horn being slightly out-of-tune compared to a piano, but not a stringed instrument. You put your finger in the exact same place for C# and Db when playing strings.

      --

      irb(main):001:0>
    12. Re:How C# was made by Ambient+Sheep · · Score: 1

      You need to look up the difference between natural and even-tempered scales. In the latter, they're the same thing, in a natural scale they're not. Can supply more detail in the unlikely event you're interested.

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

    no, not yet. check back.. oh, never.

  12. MOD PARENT DOWN by Anonymous Coward · · Score: 0

    parent is a troll that calls anything insightful a link to goatse or tubgirl

  13. Re:OT: SCO reveals files and line #s of "copied" c by Anonymous Coward · · Score: 0

    It's a pretty long document, so it will take a while to read and put the proper spin on the story. Give it another hour or two.

  14. C# got made? by October_30th · · Score: 1

    So what exactly did C# to get made?

    --
    The owls are not what they seem
    1. Re:C# got made? by Anonymous Coward · · Score: 0

      Read your comment out loud--it makes absolutely no sense at all.

    2. Re:C# got made? by October_30th · · Score: 1

      Not a Sopranos-fan, are you?

      --
      The owls are not what they seem
    3. Re:C# got made? by tommck · · Score: 1

      C# whacked Java's dad with two taps to the back of the skull in broad daylight in front of the Quickie-Mart...

      --
      ---- It puts the lotion on its skin or else it gets the hose again. It does this whenever it's told.
  15. does c# matter to any one by earthstar · · Score: 0, Troll

    so whats the big deal about c# ,huh? is it really useful for anything at all?

    1. Re:does c# matter to any one by Sabalon · · Score: 3, Interesting

      C# may not be that great compared to C++ or Java. But what .net provides is pretty nice.

      My officemate wrote a function in vb.net on a Windows box, running via ASP.NET/IIS/Win2k. I wrote a small little C# program on my Linux box that calls the procedure on the windows box. It looks something like this:
      result=addup(2,5);
      with 7 being put in result. Nice and simple. Could have easily been something to add a user to a box...or I could reimplement the same function on my Linux box to add a user there and he could call it from an vb script.

      It does a great job of providing cross platform calls without adding tons of overhead or a lengthy API...the libraries do all the setup/teardown instead of the programmer, and it is a lot cleaner than parsing html output.

      It may not be perfect, but I'm just sporting a woody because I finally somewhat understand what the hell the nebulous .net is partially supposed to be...all thanks to Mono.

    2. Re:does c# matter to any one by aled · · Score: 1

      I fail to see why is your example so great. It could be easily implemented in Java before .Net existed.

      --

      "I think this line is mostly filler"
    3. Re:does c# matter to any one by Richard_at_work · · Score: 1

      What he is saying is great is the ability to share functions between languages easily. Yes, you can do this today, to a certain fasion, but its a lot lot easier in .net.

    4. Re:does c# matter to any one by T-Ranger · · Score: 1

      Or with RPC before Java...

    5. Re:does c# matter to any one by Anonymous Coward · · Score: 0

      Could you post the code please?
      I'm just now learning C# (with Mono) :)

    6. Re:does c# matter to any one by prockcore · · Score: 1

      I fail to see why is your example so great. It could be easily implemented in Java before .Net existed.

      Maybe his machine doesn't have 256 megs of ram to devote to java apps.

    7. Re:does c# matter to any one by aled · · Score: 1

      1) Java by default won't use more than 64Mb of heap. If you want to give it more you must do using command line parameters.
      2) I think that older versions of Java (previous to .Net as my post says) used less memory than current distributions. In any case the memory used will depend on what are you doing.
      3) I don't work with .Net but given that conceptually works like Java (GC, VM, IL, JIT) I assume that runtime requirements are very similar. Feel to correct me if I'm wrong, I would like to know.

      --

      "I think this line is mostly filler"
    8. Re:does c# matter to any one by aled · · Score: 1

      He was talking more about calling code between platforms. I assume he is using Web Services. I was at a local Microsoft presentation around two years ago were they showed calling between .Net and other non-.Net languages like Perl and Java. When they showed the sample with Java the MS guy says the Java code is simpler than the C# code. There was the silence of a cementary for some moments...

      --

      "I think this line is mostly filler"
    9. Re:does c# matter to any one by Sabalon · · Score: 1

      Mabye it's not, but since I think Java sucks donkey ass I find it a slightly better solution.

    10. Re:does c# matter to any one by Sabalon · · Score: 1

      True...but isn't RPC number 2 on the SANS list and advised to be turned off asap unless one really needs it?

    11. Re:does c# matter to any one by aled · · Score: 1

      Mind to explain why do you think Java sucks and what's the difference with C# that doesn't?

      --

      "I think this line is mostly filler"
    12. Re:does c# matter to any one by T-Ranger · · Score: 1
      Perhaps. But back in the stone ages you diddnt have script kiddies outnumbering quality admins. And even today, with effective firewall rules RPC can be resonably secure.

      I bought an ORA RPC book for 25cents (library discard, ~1995). I guess you could say it uses NFS as a case study. At its foundation NFS is basicly UFS, with an arbitrary split at some level, 'just' wrapping functions into RPC calls. NFS v1 that is...

  16. Re:How and Why C# Was Made by irokitt · · Score: 1

    Unfortunately, I know that many instructors have also been confused into thinking that Microsoft is moving away from OOP. The result? "Oh, we'll only skim over the object-oriented portions of C++ in this class. Most of you will program for Windows, and Windows is moving away from Object-Oriented Programming."
    *sigh*

    --
    If my answers frighten you, stop asking scary questions.
  17. Sun Should Embrace and Extend by gurustu · · Score: 5, Insightful
    It's very easy for Java devs (and I'm one) to sneer at C# as just another MS ploy to lure people away from quality, but I think that there's no question that C# has some language features that should be migrated into Java.

    It's well known that the C# designers paid a lot of attention to Java, but more importantly, it's also quite clear that they also spent a lot of time paying attention to the experience of developing in Java.

    So while I might not entirely agree with the uncaught exceptions or the way methods aren't virtual by default, I do think it would be a good idea for Sun to take the lesson from MS, and take what is best about C# and move it into Java.

    1. Re:Sun Should Embrace and Extend by JohnnyCannuk · · Score: 3, Informative

      ...uhmm

      Go here and when you done, go here and get it.

      When you are done playing, come back and see if your post makes sense.

      --
      Never by hatred has hatred been appeased, only by kindness - the Buddha
    2. Re:Sun Should Embrace and Extend by aled · · Score: 2, Interesting

      Of all the features that C# has the only I would like to see in Java is explicit override. Fortunately there is a proposal for incorporating that with the metadata support in 1.5. The other features I want off of my projects.

      --

      "I think this line is mostly filler"
    3. Re:Sun Should Embrace and Extend by Anonymous Coward · · Score: 0

      "but I think that there's no question that C# has some language features that should be migrated into Java"

      Ummm, *cough* foreach statements, Java 1.5 *cough*

    4. Re:Sun Should Embrace and Extend by gurustu · · Score: 5, Insightful
      I've been following the 1.5 release pretty closely for a while now, and it has some excellent additions. I'm especially pleased with the generics, the enumerated constants, the ability to define a method as accepting an undefined number of parameters, and the improved monitoring. The amount of code I'll be able to remove from my codebase will be large.

      However, that doesn't invalidate what I said initially. 1.5 isn't a response to C# (well, maybe the enumerated types are), but seems to be kind of orthogonal to C#. It is a distinct improvement to the language, but that isn't the same thing as "embrace and extend". Those improvements don't give Java evangelists the ability to say "The C# language has no good feature that Java doesn't."

      I'm also making an argument about intellectual honesty. Java (like any other piece of software) will never flower into its full potential unless the people who believe in it are willing to acknowledge the strengths of its competitors, and then adopt those strengths where it can.

      It isn't a sign of weakness to do that, but a sign of strength.

    5. Re:Sun Should Embrace and Extend by Anonymous Coward · · Score: 0

      Oh boy, one more VM for me to tell the developers that NO, they can't use it to develop, because we're still shipping the application under 1.4.1_p2.

    6. Re:Sun Should Embrace and Extend by Anonymous Coward · · Score: 0

      it's called java 1.5

    7. Re:Sun Should Embrace and Extend by InfoTaku · · Score: 1

      "I'm also making an argument about intellectual honesty. Java (like any other piece of software) will never flower into its full potential unless the people who believe in it are willing to acknowledge the strengths of its competitors, and then adopt those strengths where it can."

      Sir, I salute you! :)
      I only wish I had mod points to spare.

      --
      [favorite blog] http://planet.gnome.org/
    8. Re:Sun Should Embrace and Extend by fatcat1111 · · Score: 1

      ..the ability to define a method as accepting an undefined number of parameters...

      This has been in since 1.0

      --
      How Politicians Lie: http://www.factcheck.org/
    9. Re:Sun Should Embrace and Extend by fatcat1111 · · Score: 1

      Boy would I ever like to see property accessors like in C#. I mean, the compiler knows which side of the assignment the property is on -- why do I have to prefix get_ or set_ to let it know what it should be able to figure out?!

      --
      How Politicians Lie: http://www.factcheck.org/
    10. Re:Sun Should Embrace and Extend by aled · · Score: 1

      I have seen this in Delphi, and while it makes you write less I don't feel comfortable without knowing clearly what happens when I do an assignment.

      --

      "I think this line is mostly filler"
  18. well? by Anonymous Coward · · Score: 0

    C#. What's it all about? Is it good or is it whack?

  19. Why do big companies want pseudo-compiled langs? by Futurepower(R) · · Score: 3, Insightful


    It seems to me that big companies like Sun and Microsoft like pseudo-compiled languages like Java and those in .NET like C# for two reasons:

    1) Pseudo-compiled languages are easily decompiled. If a small competitor writes an especially useful program, it is easy to see the logic by just decompiling the source code. In business programming, the business systems logic can be EXTREMELY complicated. It's easier to copy it from a competitor who has proven success. See these links for information about decompilation. Of course, the best methods of decompilation are not made public:

    .NET Decompilers

    Java Decompilers

    A friend wrote this:

    "I regularly use decompilers for Java classes. The last library I decompiled is TupleSpace from IBM, a library for network communication (useful if doing clustering). The result was of a shocking clarity. :) Thank you IBM.

    "That was especially easy because the code had few local variables (in the bytecode, local variables have an identifier that is a number) and no obfuscation."

    2) Pseudo-compiled languages are slower. That raises the cost of hardware. Sun makes most of its money from selling hardware. Slower software requires more expensive hardware. Microsoft makes most of its money selling operating systems. The customers most important to Microsoft are not you and I. Microsoft's important customers are the systems builders like Dell and HP. Systems builders want slow software so they can sell more hardware. Microsoft wants slow software so people buy more systems and therefore more operating systems licenses.

  20. Re:C# History Site by Anonymous Coward · · Score: 0

    Holy fuck!!! This the is fucking gross! And the popups on the goddamned site even got past the pop-up blocker on Mozilla Firebird!

  21. It was a piano joke. by Anonymous Coward · · Score: 1, Informative

    NT

    1. Re:It was a piano joke. by JPriest · · Score: 1

      I would have posted that as AC too. If you were in the band you must never tell!

      --
      Saying Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders.
  22. Anders leaving Borland - a blessing in disguise ? by gmania · · Score: 2, Interesting

    Having used TP and DelpiI was kind of disappointed to see Anders join Microsoft a few years back. But now behold .... Delphi 8 adopts quite nicely to .net and is actually giving Borland a new lease on life and delivering where Kylix couldn't.

    Having used both java and delphi I allways missed some sort of generics. I found Anders thoughts to be quite interesting. Question: is it possible to change the java generics-implementation in such a way that it would loose the limitations mentioned (and changing the JVM in the process offcourse)?

  23. Bb is to the left. by Anonymous Coward · · Score: 0

    Bb is to the left.

  24. Re:How and Why C# Was Made by ergo98 · · Score: 0

    I think you missed a couple of fairly critical points in your timeline.

    -2. C++ is invented, adding a usable OOP layer onto Java.

    -1. Dozens of interpreted, or semi-compiled languages (such as Visual Basic, which preceded Java) exist. Many of them are cross platform.

    0. No one writes software for Sun, so they think up a plan to let people write software for Windows, while still allowing it to run on Sun. Java is the obvious result, and is basically the merging of -1 and -2, though Java fanboys will forever imagine that it was a wonderfully unique idea that appeared out of nowhere.

    Also

    4.5 Microsoft's implementation of Java absolutely stomps Sun's on the Microsoft platform. Microsoft implements additional platform specific extensions, as is allowed under the Java spec, to make it more usable on the Windows platform. Seeing point 0, this really pisses off Sun who yoinks their license back.

  25. Checked Exceptions by po8 · · Score: 4, Informative

    Actually, Java supports both checked and unchecked throwables: the latter with the class Error. My programming style is to make throws that I don't expect to be "routinely" caught throw Errors rather than Exceptions. An Error can still be caught, but since you don't expect it, you needn't declare it.

    The checked exceptions are still useful for the case where it would probably be a bug not to handle the exception, e.g. "search found no element" or "file not found". The reason for the two kinds of throwables is exactly this: you don't want to declare that every method doing division throws DivideByZero. Unfortunately, the Java library designers don't seem to have gotten it, and so there's a bunch of things like IOException that IMHO should have been Errors.

    1. Re:Checked Exceptions by AndyS · · Score: 2, Interesting

      I think you probably want RuntimeException rather than Error - error is meant to be things like 'OutOfMemory' or 'LinkingError'

      NullPointerException is a runtime exception for example, and so is ClassCastException.

      If you want to squash IOExceptions then just wrap them in RuntimeExceptions - ie

      try {
      blah;
      } catch(IOException ioe) { throw new RuntimeException(ioe); }

      - but I'd wager that there might well be some remedial action you can take other than this.

      There are cases that go the other way - for example, Integer.parseInt() raises a RuntimeException when it should actually be a checked exception. I think there's a fairly pitched battle about this at Sun.

    2. Re:Checked Exceptions by Anonymous Coward · · Score: 0

      That's a great way to handle it. Instead of changing the language, you can just use it intelligently. :-)

      By the way, another thing to do if you want to stop the exponentially-expanding-throws problem that he gave as an example is to make all related exceptions a subclass of some other exception. If you have a GUI app that throws zillions of different exceptions for improper user input, for searches that found no results, etc., etc., you just create a single exception class and make everything a subclass of that. Then at least you can put three or four big overarching exception types in your throws clause without doing throws Exception. So you get something meaningful without having to write a big list of a billion classes. That way, you don't totally destroy the utility of checked exceptions, but they are not as tedious either. (Of course, the fun would be designing a coherent and sane class hierarchy of exceptions to use with this.)

    3. Re:Checked Exceptions by Anonymous Coward · · Score: 5, Informative

      Java supports both checked and unchecked throwables: the latter with the class Error.

      Unchecked exceptions should be derived from the RuntimeException class. Generally subclasses of Error are not meant to be caught ("An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch" - from the Javadoc for Error).

      you don't want to declare that every method doing division throws DivideByZero

      That doesn't throw an exception/error at all, it returns NaN.

      there's a bunch of things like IOException that IMHO should have been Errors

      IOException is something that needs to be checked. It can occur because of low disk space, broken network connections (including NFS mounts), bad character coding, etc. Even FileNotFoundException is a subclass of it.

    4. Re:Checked Exceptions by Anonymous Coward · · Score: 1, Interesting

      If the caller is not doing anything wrong and yet the request cannot be fulfilled, then the method should throw checked exception. E.g.

      createFile("foo.txt"); // assuming this creates the file correctly.
      FileReader = new FileReader("foo.txt");

      Here, user did nothing wrong. Yet, user can get error (e.g. someone deleted file before FileReader constructor called). In this case, the method needs to tell user, what went wrong. This requires checked exception.

      OTOH, there are cases, where user did plain stupid things. It is the caller's error. E.g.
      Hashtable h = new Hashtable();
      h.put(null, null);

      The api spec clearly says, that you can't have null value. The "put" method need not declare this exception. The user could have avoided this error entirely on its own. This is unchecked exception.

      I abosultely disagree with C# developer on this issue that checked exceptions are not needed. I think this is one of the most strongest features of java.

    5. Re:Checked Exceptions by D-Cypell · · Score: 1

      Ive always considered the Exception/RuntimeException/Error thing to be a little poor in the design.

      I dont really see the need for two different unchecked throwables, and certainly not because of loose contracts like "you shouldnt try to catch errors but if you like you can try to catch RuntimeException". I'll catch whatever I like thank you very much.

      I also dont like C#'s ham-fisted approch of having no checked exceptions at all.

      Personally I would have gone with Throwable as an abstract base class with CheckedException and UncheckedException as two subclasses, buts thats me.

    6. Re:Checked Exceptions by tunah · · Score: 1
      you don't want to declare that every method doing division throws DivideByZero
      That doesn't throw an exception/error at all, it returns NaN. For floating point only.
      --
      Free Java games for your phone: Tontie, Sokoban
    7. Re:Checked Exceptions by Ben+Hutchings · · Score: 1

      If I understand this correctly, an Error exception generally indicates a bug in the program. An application which uses plug-in modules can catch Error in order to insulate itself somewhat from bugs in those modules. There's nothing useful that the module can do if there's a bug in it; it should give up and let the framework handle the problem. Now there's some doubt in my mind as to how well an application can insulate itself from plug-ins running in the same VM and therefore sharing state with it, but maybe this can work.

    8. Re:Checked Exceptions by po8 · · Score: 1

      IOException is something that needs to be checked. It can occur because of low disk space, broken network connections (including NFS mounts), bad character coding, etc. Even FileNotFoundException is a subclass of it.

      An exception only needs to be checked if you have some plan for how to handle it. In general, if my Java program loses a network connection, fills up its disk, etc., I just want my program to crash. Failing to handle the exception and letting it propagate to top level will do that.

      Too many Java programs catch IOExceptions, print some message that completely obscured what happened, and then exit anyway. I wish they would just let the IOException propagate up, but the status of IOException discourages doing that.

    9. Re:Checked Exceptions by ajagci · · Score: 1

      IOException is something that needs to be checked.

      Maybe, maybe not. But checked exceptions make the additional assumption that everybody up the call chain, up to the point where the handler is, actually should be aware of the possibility that that a particular exception can be thrown and should hence declare it.

      That's a stupid assumption because there is no reason why it should be satisfied in an object-oriented program. It ends up encoding knowledge about exceptions in places that don't need to know about those exceptions at all, or it forces me to declare new wrapper exception types anywhere where I need to pass those things up.

      Checked exceptions were an idiotic design choice. Many other languages had been down that road years before and ended up rejecting checked exceptions because they make no sense.

  26. They stole it from SCO by Anonymous Coward · · Score: 0
    Just wait. SCO is going to add this to their suit also. In not less than a week.

    (Yes, I know, the suit is against IBM. Please don't tell SCO...)

  27. Wake up and smell the marketing bullshit! by Anonymous Coward · · Score: 4, Interesting
    But co-optinging C++ was not made as a business decision to lock in Sun customers, it was made as part of Sun's vision of "The Net is the Computer" (or whatever they called it).

    For fucks sake, man! Wake up and smell the marketing bullshit. The most innovative impressive thing about Java was that it was successfully marketed as basically the second coming (more tangibly as the solution to 10 different huge problems), all while just being another platform. Get it? They created their own platform without hardware leverage, OS leverage, app leverage, etc. It's bootstrapping by marketing.

  28. Re:How and Why C# Was Made by Anonymous Coward · · Score: 0

    C++ is invented, adding a usable OOP layer onto Java.

    Uh, yeah.

    Visual Basic, which preceded Java

    You mean "ruby"

    they think up a plan to let people write software for Windows, while still allowing it to run on Sun

    Java, which was called Oak originally, was created for small and embedded systems, such as set-top boxes. ... Idiot. Fanboy.

  29. Re:Anders leaving Borland - a blessing in disguise by superangrybrit · · Score: 1, Offtopic

    The status bar foils your plot to get users to the tubgirl pic. Better luck next time. ;)

  30. Re:How and Why C# Was Made by ergo98 · · Score: 1

    Oh, mother of...

    Preview, damnit, preview!

    "C++ is invented, adding a usable OOP layer onto C."

  31. oh, and what's the next release of Java have? by tjstork · · Score: 0, Insightful


    real enumerations, like C#
    real attributes and program metadata, like C#
    real foreach, like C#
    generics, like the next version of C#

    Face it, if C# borrows from Java, the next release of Java is a ripoff of C#.

    --
    This is my sig.
    1. Re:oh, and what's the next release of Java have? by Shados · · Score: 4, Insightful

      Bingo...and in the end, we programmers don't have 1, but -two- improved languages, as they try to improve to each other. MS trying to lock in their customers or not, Sun trying to control java or not...doesn't matter... Now we have 2 languages that try to improve on each other as fast as possible, and we win!

    2. Re:oh, and what's the next release of Java have? by Panix · · Score: 2, Informative

      Unfortunately, Java gets most of these features at a superficial level, since it has to support older VMs. Sun sees that C# has these things and that developers want them, so they give them as much of the syntactic advantage as they can without "breaking" their older VMs... its really a shame.

      The Microsoft CLR has support for many of these features (and others) built into the underlying framework. As a result, things like Generics in C# are about a hundred times as functional and advantageous than they are in Java. Read the article that was linked to in this story, and it will readily become clear that Java is playing catch up at this point. The C# creators really thought of these things *up front* and designed the framework for them, and it really shows.

      One of the best examples of this in the interview is that of generics. In C#, if you declare a List of Customers (List), you can see that all the way down to the Reflection/introspection level. It really, genuinely is a List of Customers. However, in Java, because they have to live with their inferior framework, a List of Customers at the Reflection level is a List of Objects... hence, its just an illusion. You get the type checking at compile time, but lose performance advantage and true Generics support.

      Thank God for the folks at Ximian though! I really like much of the .NET development framework, and now I can use it on UNIX based systems. I am still waiting for a nice release that will fully run on Mac OS X though.

    3. Re:oh, and what's the next release of Java have? by D-Cypell · · Score: 1

      I wont be using any of these features (with the possible exception of foreach).

      Enums type behaviour is possible with public static final attributes.

      Metadata is exactly what the XDoclet project was designed to accomplish.

      Generics are not the way to ensure typesafety of a collection, encapsulation is.

  32. Because pseudo-compiled languages are better.. by leerpm · · Score: 2, Insightful

    In many cases, pseudo-compiled languages, or languages that use a VM are a better choice. No worrying about memory management, buffer overflows, etc.

    There will always be a place for C and C++ in places where you *NEED* low-level control over things like memory management, or where performance is very critical. But for most applications, this is simply not the case. You want a language that can do all you need it to do, and you don't want to worry about the rest of the details. Java and C#/.Net are the next big thing in commercial programming. But they certainly won't be the last. There will be another language that is better in 10 years from now. But right now it is a good thing that we have two choices, instead of one. Competition is a *good* thing.

    1. Re:Because pseudo-compiled languages are better.. by Scott+Wood · · Score: 2, Informative

      You can get garbage collection and array bounds checking in fully compiled languages (such as D), too.

      And you'd better still worry about such things to a certain extent, or else you'll be throwing exceptions on legitimate usage cases when your fixed-size buffer turned out to be too small, running out of memory because you didn't bother nuking references to old objects, etc.

    2. Re:Because pseudo-compiled languages are better.. by Anonymous Coward · · Score: 0

      Or Objective C to name a language actually used in comercial systems.

    3. Re:Because pseudo-compiled languages are better.. by leerpm · · Score: 1

      You can get garbage collection and array bounds checking in fully compiled languages (such as D [digitalmars.com]), too.

      There is more to buffer overflows than just array index checking. Remember char* ? Difficult to do array-index checking in a compiled language if the size of the char* is determined at run-time.

    4. Re:Because pseudo-compiled languages are better.. by mystran · · Score: 1
      In many cases, pseudo-compiled languages, or languages that use a VM are a better choice. No worrying about memory management, buffer overflows, etc.

      There is no reason you can't do all this with compiled code. Hell, you can garbage collect even languages like C and C++ if you want. If the language model is designed for garbage collection, it makes no difference whether the code is native or bytecode. To check for overflows, you basicly make the compiler add the checks that you'd add manually when dealing non-checked language. And before anyone starts with dynamic typing, that's STILL compilable to native just fine. You can do dynamic typing with C++ after all if you want..

      While I agree with your second point, and admit that compiling to safe native code makes the code somewhat slower than "unsafe" C/C++ code, you still can compile to native just fine. The biggest benefit of bytecode over native is portability: compile once, run everywhere. Another is safety, at least in theory, as the bytecode can either be designed to only work with safe language model, or verified to follow such model. Typed pointers make such verification much easier at least.

      The reason Java is so little slower than C++ is that JRE compiles (at least some of) it to native on the fly after all. In the meanwhile, I'll go write a native-backend for the compiler of my private Lisp dialect :)

      --
      Software should be free as in speech, but if we also get some free beer, all the better.
    5. Re:Because pseudo-compiled languages are better.. by Scott+Wood · · Score: 1

      So don't use char *. In D, you can pass the array itself by reference, which includes size information. Dynamically resizeable arrays are also available.

      My point was that it has nothing to do with whether the code runs in a virtual machine or not.

    6. Re:Because pseudo-compiled languages are better.. by Anonymous Coward · · Score: 0

      Huh? char * IS an array. It is indexed. The size of char does NOT change at runtime, your code must be recompiled if this happens. char * buffer overrun is PRECISELY an array bounds checking error.

    7. Re:Because pseudo-compiled languages are better.. by stonecypher · · Score: 1

      You can get garbage collection and bounds checking in fully compiled languages (such as C++,) too. Simply install a garbage collector, which generally does something silly like overloading global new, or write it into a class with operator new.

      Bounds checking? vector.at(), not vector[], simpleton. Learn yr tools, anakin!

      --
      StoneCypher is Full of BS
  33. Re:Why do big companies want pseudo-compiled langs by sik0fewl · · Score: 2, Insightful

    Well, pseudo-compiled languages is hardly a "big company" thing. Look at Python for instance. It's all over the place (in the open source world).

    --
    I remember when legal used to mean lawful, now it means some kind of loophole. - Leo Kessler
  34. Re:How and Why C# Was Made by cybermace5 · · Score: 2, Funny

    I think the old adage needs to be updated: If you want to eat sausage, obey the laws, and use C#, you should never watch them being made.

    --
    ...
  35. Re:How and Why C# Was Made by AndroidCat · · Score: 2, Funny
    Don wrote *the* book on Microsoft's COM technology

    Another one? But I haven't finished Brockschmidt yet! :)

    --
    One line blog. I hear that they're called Twitters now.
  36. Re:Why do big companies want pseudo-compiled langs by tcopeland · · Score: 2, Insightful

    > it is easy to see the logic by just
    > decompiling the source code.

    You mean bytecode, probably.

    > the business systems logic can be
    > EXTREMELY complicated

    If it's that complicated, having a bunch of decompiled source code is not going to be that useful. You're better off programming it yourself so you understand it and can change it when you need to.

    > Pseudo-compiled languages are slower.

    But not _much_ slower. A $3K dual CPU Linux server can serve up a lot of Tomcat hits. Need more? Buy a load-balancer and a few more servers. Not a big deal.

  37. recipe by Anonymous Coward · · Score: 0

    4 bats
    2 mole eyes
    25 spider eggs
    6 left arms from virgins
    1 ripped of letter from another language

  38. Re:Why do big companies want pseudo-compiled langs by aled · · Score: 2, Interesting

    That's the biggest FUD I have seem so far. Your talking about "pseudocompiled" makes me think you don't know how either language really works.
    OTOH I agree that both are relative simple to decompile.
    The speed will depend of your particular use, but in some cases programs in Java are faster than C programs.

    --

    "I think this line is mostly filler"
  39. Nice language, bad motives by E.S+Taog · · Score: 2, Insightful

    why trust your development to a language designed to lock you in to Windows? C#, for all its niceities is just a way of getting you to buy more Windows 2003 Server licenses.

    1. Re:Nice language, bad motives by prockcore · · Score: 4, Insightful

      why trust your development to a language designed to lock you in to Windows? C#, for all its niceities is just a way of getting you to buy more Windows 2003 Server licenses.

      C# is just a language, it doesn't lock you into Windows at all. Mono supports the entire C# language.

      It's the classes you choose to use that lock you onto a specific platform.

      You can't blame C# if people want to use classes that aren't available on other platforms.

      Its like saying that C++ sucks because DirectX doesn't work on Linux.

    2. Re:Nice language, bad motives by bucky0 · · Score: 1

      I'm not a c# programmer but...

      Is there a STL-type library under c#, and is there a port under mono? If not, it would make c# under other os's kindof pointless, if a few base classes werent implemented.

      just curious..

      --

      -Bucky
    3. Re:Nice language, bad motives by prockcore · · Score: 1

      Is there a STL-type library under c#, and is there a port under mono?

      Yeah, there's a class library full of things like vectors, lists, and other basic types. It also has network classes, compiler classes, file classes. Mono has a great deal of the standard class library implemented.

      People keep saying that mono will always be playing catch-up. But the standard class library hasn't changed in 2 years. Unlike Sun's class library which changes every 6 months.

    4. Re:Nice language, bad motives by Anonymous Coward · · Score: 0
      People keep saying that mono will always be playing catch-up. But the standard class library hasn't changed in 2 years.

      How are they ever going to catch up if they haven't done any work in two years?? This is madness.

      Unlike Sun's class library which changes every 6 months.

      Unlike the mono team, it seems Sun actually work on their class library. As long as they don't break backwards compatiblity I'm happy, and they haven't done that at all in Java2. Hooray!

      Come on mono people, stop being so lazy and get some work done.

    5. Re:Nice language, bad motives by prockcore · · Score: 1

      Unlike the mono team, it seems Sun actually work on their class library.

      You misunderstood. MS hasn't changed the class library in 2 years. Mono has been updating their class library nearly every day (not changing the API, just implementing things that haven't been implemented yet)

    6. Re:Nice language, bad motives by Anonymous Coward · · Score: 1, Insightful

      C# is just a language, it doesn't lock you into Windows at all. Mono supports the entire C# language.

      Bzzt. Mono does not support the entire language, much less the than the entirety of the implementation that Microsoft uses which has many significant parts not submitted for standarization.

      You can't blame C# if people want to use classes that aren't available on other platforms.

      People will use whatever is in the class library. Windows-specific classes will yield Windows-specific apps. It's only delusional Microserf cheerleaders that think that C# is not designed to lock you in Windows.

      Any idea how far along GTK# is at implementing the WinForms API? I've got new for you: not far at all. And no one should be expecting an implementation any time soon.

      To give you an idea of how in-depth this one specific API is, last I read on Mono's page, they are thinking about implementing WinForms with wine(a tremendously large C application+library) and then reimplementing parts of it in GTK+(a somewhat smaller, but still large toolkit library) . If this doesn't scream man-decades of effort and gazillions of platform inconsistencies to you, you aren't familiar with the technologies involved.

      Its like saying that C++ sucks because DirectX doesn't work on Linux.

      No, there's a whole world of reasons why C# is furthering Microsoft's own interests, to the detriment of non-Microsoft platforms. It would be absurb to believe otherwise. This is why C# sucks if you are using one of those platforms -- it is not the Messiah language we all hope to deliver us from the horrors of C/C++. It is a false prophet designed to ensare all to its will to dwell in Hades or dwell not at all.
    7. Re:Nice language, bad motives by e-Motion · · Score: 1

      C# is just a language, it doesn't lock you into Windows at all. Mono supports the entire C# language.

      I seriously doubt this. Unless C# remains unchanged for many years, Mono will always have to play catch-up to C# and the .NET framework. It may work as a poor man's version of .NET, but let's not kid ourselves by implying that it is a full-fledged portable replacement for Microsoft's implementation.

      It's the classes you choose to use that lock you onto a specific platform. You can't blame C# if people want to use classes that aren't available on other platforms.

      And does Microsoft document all of the classes that are not supported on other platforms? Are they at at least attempting to make their framework portable? Why should they? Unlike Sun, they are not striving to produce a spec for a complete solution (with tons of libraries) that other companies can implement on other platforms. They want you to use Windows and other MS products, plain and simple.

      Its like saying that C++ sucks because DirectX doesn't work on Linux.

      This is more accurate, IMHO:

      Saying that .NET sucks on linux is like saying that C++ sucks because DirectX doesn't work on Linux.

      The difference is that DirectX is a documented windows-only API, whereas .NET is an MS-specific framework masquerading as a "portable" solution. Don't buy into the "potential for portability" hype, especially if you're focusing mostly on the incomplete Mono implementation.

  40. Re:How and Why C# Was Made by rdean400 · · Score: 2, Insightful

    Your 4.5 is wrong, and even in a world in which it made sense, it'd still be wrong. Sun's whole marketing mantra around Java was "Write Once. Run Anywhere." Allowing platform-specific extensions would break that, so it's an obvious non-starter. Sun's reaction wasn't correct, but it was an allowable one.

  41. Re:How and Why C# Was Made by ergo98 · · Score: 1

    Uh, yeah.

    I apologize profusely for that typo, though it was fairly obvious.

    You mean "ruby"

    Err, no I mean exactly what I said, which is that there was dozens of interpreted or quazi-compiled languages before Java. It's a neat concept and a good implementation, but it certainly wasn't revolutionary.

    Java, which was called Oak originally, was created for small and embedded systems, such as set-top boxes. ... Idiot. Fanboy.

    Obviously I was being a bit facetious given the original flamebait troll. There is no doubt whatsoever that .NET "borrows" many ideas from Java, but it's absurd to paint Java as an amazing new development that invented these concepts (just as it's equally absurd to claim that Macs invented the GUI, though that's an entirely different debate).

  42. C#? by Anonymous Coward · · Score: 0

    What's this now? OSNews?

    Talk about slow days...

  43. Re:Why do big companies want pseudo-compiled langs by Anonymous Coward · · Score: 0

    And yet, open source is even EASIER to read, and MS isn't real keen on that. If they're going to do something somewhat unethical, you'd figure they'd like to get comments along with it.

    And gee, yes, Pseudo-compiled languages are generally slower, and yet often less prone to memory problems, and more portable, and oh wait, I'm responding to dork conspiracy nut who got modded up to +3 by a bunch of other people who the more and more I read about their anger with MS, the more I think it has a good deal to do with jealousy that they didn't get to apply the screws first and make the big billions.

  44. Re:How and Why C# Was Made by thasmudyan · · Score: 2, Insightful

    .NET is usable, but Java is something horrific.

    I wonder why .NET-bashers never get modded down but anyone who dislikes Java goes to karma hell, LOL...

  45. They lie! by dexterpexter · · Score: 5, Funny

    Gonna burn some karma on this...

    Gandalf: This is C#. Forged by the Dark Lord and his engineers in the fires of Mount Redmond. Taken by him from the hand of evil himself. All who use it are bound to him. Gates needs only this ring to cover all the lands of a second darkness... He is seeking it, seeking it; all his thought is bent on it.

    Frodo: Alright, we put it away. We keep it hidden. We never speak of it again... No one knows its here, do they? Do they, Gandalf?

    Gandalf: Unfortunately, yes. The power of Gates is far reaching. The innocent would use C# from a desire to do good, but through them, it would wield a power too great and terrible to imagine.

    You get the idea... ;) And yes, I am just teasing.

    --

    *-*-*-*-*-*-*-*
    "We are Linux. Resistance is measured in Ohms."
    1. Re:They lie! by Anonymous Coward · · Score: 0

      You seem to be very protective of your karma. You DO realize that in the grand scheme of things, your posts on Slashdot are not a measurement of your life, right?

    2. Re:They lie! by Anonymous Coward · · Score: 0

      Gonna burn some karma on this...

      And, due to the strange system of Slashdot, you *have* indeed burned karma, despite being modded up to +5 - because your up-mods were "Funny", which doesn't give karma, but your down-mods were "Flamebait" and "Overrated", which do remove karma.

      Slashdot is broken. Nobody should be able to lose karma from a +5 post.

    3. Re:They lie! by Anonymous Coward · · Score: 0

      i exchanged five karma points for a loaf of bread once in a tavern.

    4. Re:They lie! by Xpilot · · Score: 1

      Miguelomir : The weapon of the Enemy is a gift! Let is use it against him!

      --
      "Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it." -- Linus Torvalds
  46. Re:C# History Site by Anonymous Coward · · Score: 0

    I didn't get any pop-ups (I'm running Linux Firebird 0.7), but it did move the entire browser window around. Kinda cool but that should definately not be allowed.

  47. Re:C# History Site by Anonymous Coward · · Score: 0

    What does homosecuality have to do with scat?

    Moron

  48. Re:Why do big companies want pseudo-compiled langs by T-Ranger · · Score: 1
    Need more? Buy a load-balancer and a few more servers. Not a big deal.

    You just bought a bunch of hardware; you just proved his point.

    But thats not necessaraly a bad thing. Its a trade off. Hardware is cheap. Throwing hardware at the problem is very often the cheapest solution.

  49. Dude, that's awesome by Anonymous Coward · · Score: 0

    I'll try to utilize this wonderful slashbot-clickwank in the future. My hats off to you.

  50. Re:How and Why C# Was Made by Saint+Stephen · · Score: 1

    When I started at Microsoft in June 2000, at the PDC that month they announced "NGWS" - Next Generation Windows Services, originally internall called "Cool". In fact the first time I saw the source code for the .NET Framework class library all the .cs files were named .cool files.

    Windows Forms was originally WFC (Java AFC extensions). Get it! All .NET is the Windows-specific java work that Microsoft was working on that Sun sued them over! When they got sued they just named it C# instead of Java!

    Now does it make sense?

  51. Re:Why do big companies want pseudo-compiled langs by tcopeland · · Score: 1

    > You just bought a bunch of hardware;
    > you just proved his point.

    Not really; his point was that I'd buy a $60K E6500, my point was that I'd buy a couple of $3K pizza boxes.

    > Throwing hardware at the problem is very
    > often the cheapest solution

    Yup, and if you can cut your development time down by using Java vs C, everyone's happy.

  52. missing the point, but it doesn't matter by ajagci · · Score: 5, Informative

    I think on many issues, Hejlsberg is missing the point and the reasons he gives aren't necessarily the actual reasons why particular design tradeoffs are good ones.

    But it really doesn't matter. The changes that C# made relative to Java are obvious and proven (e.g., value classes, removal of statically checked exception declarations, declared unsafe code sections). Many of them had made Sun's bug parade. All of them had been in other languages before either Java or C#. In fact, C# is, in many ways, close to Modula-3.

    There seems to be another reason for some of the design decisions: patents. Sun has patents on several aspects of the JVM and Java, and if Microsoft wanted to be free of potential future claims by Sun, they had to avoid those in their own competing virtual machine.

    Keep in mind that Hejlsberg is also a salesperson for the language anyway. That means that he may not be telling you the real reasons behind design decisions, but the reasons that sell the language well.

    In any case, however it came into existence, C# is a somewhat better language than Java, and we should be happy about that: whether you are planning on using C# or not, it raises the bar for what is considered standard in industry. Without C#, Sun probably wouldn't even have made the largely cosmetic changes they made to Java in 1.5, and maybe the continued existence of C# will force them to fix other misfeatures of Java and the JVM in future versions. And C# (but not .NET) may turn out to be the free and open language that Java should have been; time will tell.

  53. Re:How and Why C# Was Made by 1010011010 · · Score: 0

    Hi! Thanks for the corroboration! Malakai will be by later to give you your tin-foil hat and foil polish, and perform the indoctrination ritual.

    --
    Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
  54. Re:Why do big companies want pseudo-compiled langs by prockcore · · Score: 4, Interesting

    1) Pseudo-compiled languages are easily decompiled.

    Um, compiled languages are easily decompiled as well.
    http://hte.sf.net is a badass hexeditor/disassembler.

    Case in point, I walked through the assembly of iTunes to figure out the AES key that iTunes uses for iTMS. And iTunes was written in C++.

  55. The difference is by Duhavid · · Score: 1

    Java took good stuff from C++ in order to make the language easy to adopt. Easy for experienced C++ programmers to start running with.

    C# seems to be about salvaging the effort put into J++, which was about fragmenting Java. And likely about that same cause as far as is possible within the bounds possible.

    The difference is in the intent.

    --
    emt 377 emt 4
  56. Re:How and Why C# Was Made by Reality+Master+101 · · Score: 2, Insightful
    I don't think C# was created to compete with Java at all (as others have pointed out, interpreted languages have existed for a long, long time).

    But say it was. Who cares? Every language is based to some extent on what came before it. The question is, does it improve on other languages? Does it have a niche that it serves better than other options?

    In this case, the answer is yes. Java is horrible kludgy in a lot of ways, and yes, it's horribly slow for large applications (although, small benchmarks can hide it's slowness). And no, I don't want to debate yet again the merits of Java. I think it sucks. If you think otherwise, more power to you. I'm glad it works for you.

    --
    Sometimes it's best to just let stupid people be stupid.
  57. Re:How and Why C# Was Made by Saint+Stephen · · Score: 1

    Hey, dumbshit, I worked there. A ten-year veteran told me the planning for .NET began in 1996 -- that's when A.H. was hired, anyway. I had read-only access to the source. I'm right.

  58. WRONG (about pronunciation) by Anonymous Coward · · Score: 0

    it's pronounced 'Hile-spare'

    (from Copenhagen, Denmark - where Anders went to university)

  59. Re:How and Why C# Was Made by Anonymous+Brave+Guy · · Score: 1
    You're referring to Don Box, specifically, right?

    I'm always wary of giving credit to someone proclaiming the Next Great Thing, when they've spent the last several years as a leading advocate of the Previous Great Thing, then suddenly start finding all these previously overlooked drawbacks in the older technology when the newer one arrives. Don Box seems awfully close to that position right now.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  60. Re:How and Why C# Was Made by Anonymous Coward · · Score: 0

    Yes, yes, exactly. Might makes right.

    Yep it do, dont it.

    - George W. Bush.

  61. Re:How and Why C# Was Made by 1010011010 · · Score: 0

    I know you are. I wasn't poking fun at you. Re-read my reply. I appreciate your posting.

    --
    Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
  62. -1 : Revisionist troll by Anonymous Coward · · Score: 0

    This guy is a tinfoil hat retard pushing his paranoid agenda supported by a revisionist history. Ignore him as he deserves.

    Thanks

  63. worst C# drawback by iezhy · · Score: 3, Insightful

    most serious C# drawback is that it doesn't have (and probbably will never have) so rich and wide open source community like Java does (Apache group, Object Web group and many many many more...).

    Each tiny crappy component, each crappy lib for C# out there on the net is sold, and sometimes for outrageous prices (a month ago seached for a plugin to generate properties from variables - something like getter/setter generator macros, so common in most Java IDEs - found it for 100$ per seat! OMG!). there is no idea of sharing, neither the source nor experience, and this IMHO will be the main cause of C# setback.

    And oh, most computer literate people pronouce '#' as 'hash', not 'sharp' :-))

    1. Re:worst C# drawback by Max_Abernethy · · Score: 1

      Note that C# can use C++ libraries, of which there are quire a few. Yeah, '#' as sharp is lame. They should've just picked a new name altogether, since C# really only descends from C++ indirectly through Java, but I guess their marketing department figured that if people saw 'C' they'd feel a little more comfortable.

    2. Re:worst C# drawback by iezhy · · Score: 1

      using old C++ libs (so-called unmanaged code) from C# is as much pain in the ass as using them from Java using JNI, imho

    3. Re:worst C# drawback by Anonymous Coward · · Score: 0

      And oh, most computer literate people pronouce '#' as 'hash', not 'sharp' :-))

      Having knowledge of cattle brands, I think of it as C "pigpen" as that brand mark is commonly known. One could also consider it C Tic Tac Doh.

    4. Re:worst C# drawback by NoData · · Score: 1

      And oh, most computer literate people pronouce '#' as 'hash', not 'sharp' :-))

      That's right, and that's why, for the other reasons you mention, C# is properly pronounced "CASH"

    5. Re:worst C# drawback by Anonymous Coward · · Score: 0

      Ah yes, the large Java open source community THAT REQUIRES THE USER TO INSTALL SUN'S PROPRIETARY AND BUDDY JAVA RUNTIME ENVIRONMENT. Oh yes, that so-called "open source" community. The one that's based on more proprietary code than any of the great Mono-based C# GNOME applications.

      Thanks for the FUD, though. Anti-Slash would be proud.

    6. Re:worst C# drawback by enkafan · · Score: 4, Informative

      Here's your macro: http://weblogs.asp.net/jan/archive/2003/04/29/6168 .aspx
      There are plenty of people working on tons of free libraries out there. The gotdotnet workspaces are pretty good place to search for things, but your best best is to follow the weblogs on asp.net.

    7. Re:worst C# drawback by rgelb1 · · Score: 1

      >>something like getter/setter generator macros... found it for 100$ per seat! OMG!

      This is really elementary. Track me down via the website and I'll send my implementation for $0 per seat. OMG!

    8. Re:worst C# drawback by Bazouel · · Score: 3, Informative

      Ever bothered to look at http://www.codeproject.com ??

      How about you write your own getter/setter macro and publish it there ? That is how a community is built, slowly but surely.

      --
      Intelligence shared is intelligence squared.
    9. Re:worst C# drawback by aderen · · Score: 2, Informative

      You can download vs.net property generator for free from my site http://www.adersoftware.com/index.cfm?page=vsPrope rtyGenerator
      no source code included, but if you need it, I can email that to you.

    10. Re:worst C# drawback by panoplos · · Score: 1

      You must have never looked at the Mono project.

      I believe that once Mono gets to 1.0, along with MonoDevelop (a SharpDelevlop port to Mono and GTK#), there will be MUCH interest in the open source community for releasing libraries and entire subsystems.

      I'm personally amazed by the pace of development the Mono team have been jugging along at, and there are already a lot of good things coming out of the Mono community; for instance, mod_mono is already capable of running a number of full-blown ASP.NET applications written for the MS.NET CLR.

    11. Re:worst C# drawback by stonecypher · · Score: 0, Offtopic

      except, we can't call it c hash, because when we see hash, we smoke it, and frankly, i've tried smoking c#, and it's damned harsh. not worth it at all.

      --
      StoneCypher is Full of BS
  64. Yes, easily turned into assembly language... by Futurepower(R) · · Score: 1


    Yes, easily turned into assembly language, but it is much harder to decide what the assembly language is doing than with pseudo-compiled byte code that is a collection of obvious calls to the run-time library.

  65. Language/tools are secondary by teetam · · Score: 3, Insightful
    Why do people spend so much effort fighting over which tool/language is better? The whole question is secondary to me.

    The truth is - existing software quality sucks. There are a few exceptions, but there are too many poor quality products being shipped everyday sometimes costing millions of dollars. The fault is seldom with the tools or the language of choice.

    There are so many parts of the whole software development process that needs to be improved. With the right process, people and management it is possible to make great software regardless of the language.

    When automobile engineers argue, do they argue about the quality of their cars, their features and design or do they childishly bicker about which wrench is better?

    --
    All your favorite sites in one place!
    1. Re:Language/tools are secondary by 91degrees · · Score: 2, Insightful
      It's a good point, but the language can make a difference. C has a lot of potential for error that a higher level language just doesn't have; the most obvious example being strings. In C, to concatenate 2 strings, you might type
      char *s1 = "The quick";
      char *s2 = "Brown fox";
      s1 = strcat(s1,s2);
      Which could crash, or foul up data (or possibly do nothing) because you're writing over the end of a pointer. A high level language will have strings as a built in type. Concatinating them will simply create a new string. This sort of error is simply impossible to make happpen in a lot of high level languages.

      A programming language is a lot more than just a tool. The language you choose will affect the end product quite substantially.
    2. Re:Language/tools are secondary by voodoo1man · · Score: 2, Insightful
      There are so many parts of the whole software development process that needs to be improved. With the right process, people and management it is possible to make great software regardless of the language.

      There is no such thing as the right process, there is no such thing as the right people, and there certainly is no such thing as the right management, because none of these things can be designed. On the other hand, tools can be designed and implemented to perform optimally, and it is not all that hard to do so. The efficiency gained by using such tools will cover their cost many times, and this is not even considering the psychological effect of craftsmanship that I will discuss below.

      When automobile engineers argue, do they argue about the quality of their cars, their features and design or do they childishly bicker about which wrench is better?

      A universal quality of nearly all craftsmen is pride in their tools, because almost all craftsmen are overwhelmingly dependent on them (and with some this starts to approach symbiosis). Automobile designers don't argue about wrenches, because they don't use them. Mechanics argue about wrenches. Automobile designers argue about CAD systems.

      Why do people spend so much effort fighting over which tool/language is better?

      The fact that in this case the tool is the language answers your question. Why do you think the Quebecois resist the anglicization of their language so strongly? Or how about Esperanto? Another thing you should consider is that despite computational universality, the Sapir-Whorf hypothesis applies much more strongly to most programming languages than to natural ones because there is no way to introduce new concepts into those languages.

      The truth is - existing software quality sucks. There are a few exceptions, but there are too many poor quality products being shipped everyday sometimes costing millions of dollars. The fault is seldom with the tools or the language of choice.

      Just as the fact that a plumber installed your toilet improperly is seldom the fault of his tools. The question now is how do you propose to improve the result of the end product? There is only a finite amount of capable people to do the job (and I believe that this number grows arithmetically while the general population grows almost exponentially). You can't select good "management" (if it even exists), because you cannot choose your own boss. Despite what you imply, process is a function of people and tools, and not some fixed, abstract plan. The only thing you can change quantitatively for the better is tools.

      --

      In the great CONS chain of life, you can either be the CAR or be in the CDR.

    3. Re:Language/tools are secondary by Anonymous Coward · · Score: 0

      Nice example, what about this one:

      try { // some code expects you to catch a exception
      }
      catch (Exception e) { // ...do nothing
      }

      While this one may not crash it could foul up data as well. A higher level language does not make a program much saver or of better quality if the programmer is an idiot.

    4. Re:Language/tools are secondary by globalar · · Score: 2, Informative

      "There are so many parts of the whole software development process that needs to be improved."

      Completely true.

      In a time when tools are myriad, code can be found for free, and the Internet archives and Google searches lessons and tutorials for us, software developement is crazy. And its funny and ironic that the most essential part to software developement, the developement (it's process: the drafting, coherent, problem-solving design, habitual testing and review, documentation, etc.) is seen as expendable!

      Someone somewhere once had the great idea to cut back in software developement - make an unrealistic timeline, change the project's goals and pretend the code will reflect those changes, switch people in and out during developement like nodes in cluster, outsource, skip some testing or only test what you know works, etc.

      You are right. Programmers, engineers, etc. can make wonders with far fewer resources, capable tools, and little financial incentive. But without some sense in the process, without a plan to succeed and solve problem(s) with this software (especially adherence to the plan), whatever wonders may have been created are lost in bad habit. So what happens in a lot projects (probably the majority)? Let's buy more resources, more capable tools, and dump other things into the developement.

      Fifth grade, I had a teacher who made us repeat a short sentence to her everytime we "forgot" to do our homework:

      "Mrs. H, I failed to plan to succeed."

      And everytime we said it, it was true.

    5. Re:Language/tools are secondary by Haeleth · · Score: 3, Insightful

      A higher level language does not make a program much saver or of better quality if the programmer is an idiot.

      So because a language might not prevent every stupid mistake a programmer might ever make, there's no point trying to help any programmer ever avoid any mistake?

      That makes no sense.

      Of course it's always possible to break a program. The point of higher level languages is that they make it harder to break programs. This is not so they can serve as a crutch for incompetent programmers - it's so that they can make competent programmers more productive. Sure, a good programmer isn't going to make many mistakes with pointers, but if the language they use provides ways to do things without using pointers at all, then they aren't going to make any mistakes with pointers.

      (Now, it's nice if the language also provides the pointers so they can use those where it's useful, but most of the things pointers are used for in C - array traversal, say - can be done just as efficiently with higher level constructs.)

      Want an analogy? Someone really skilled, with a really sharp eye and a really steady hand, could probably draw a perfectly straight line with pencil and paper. But professional draftsmen use rulers. I wonder why that is?

    6. Re:Language/tools are secondary by Anonymous Coward · · Score: 0

      So because a language might not prevent every stupid mistake a programmer might ever make, there's no point trying to help any programmer ever avoid any mistake?

      No, there is a point. I just wanted to say that one has to weight experience of the developers against language features if one chooses a language for a project.

      (Now, it's nice if the language also provides the pointers so they can use those where it's useful, but most of the things pointers are used for in C - array traversal, say - can be done just as efficiently with higher level constructs.)


      Look, i am not at all in general for pointers. But consider this: To get dynamic data structures in C you have to code the allocation and freeing of memory on your own. (agreed, you will get more errorprone, hard to maintain code). On the other hand, if you do not understand a garbage collector exactly you might think that memory is a nonissue in Java. This misconception can result in hard to solve memory leaks after month of developing. The point is: C forces you to understand the concept before you use it (the concept is simple) while java (and many other high level languages) do not.

      In your analogy the draftsman would use a computer and a printer to draw the line (so he would first need to learn the paint program to achieve his result).

    7. Re:Language/tools are secondary by RogerWilco · · Score: 1

      A lot of theory about how to create good software and manage the software developement process properly is already quite old.
      A book like "The mythical man month" by Frederick P. Brooks is from the seventies and contains concepts true but foreign to most managers today. I have experience at several companies in software developement and I see 2 main problems:
      1) programmers without a proper background, self-educated or otherwise, that have some mastery of a certain language but no education or skills in developent and management. These are they pleople that have only 2 answers to the question: "When should one use UML", either "Always" or "what's UML".
      2) Managers of a software developement process, without insight into the fact that software developement is a very unusual kind of process where most normal management techniques do not work.

      Some books:
      "The mythical man month" - Frederick P. Brooks
      "Principles of Software engineering management" - Tom Gilb
      "Object-Oriented and Classical Software Engineering" - Stephen R. Schach
      Please note that I am no expert in this field, I have only just started discovering Software Engineering myself about 2 years ago, but it has given me a much clearer view on how to develop software properly and manage it properly. It has realy worked for me.

      --
      RogerWilco the Adventurous Janitor
    8. Re:Language/tools are secondary by Anonymous Coward · · Score: 0

      No. A programming language should not be a band-aid that allows medicore programmers to be more likely to write ok code. A programming language should provide useful abstractions (and the capability to provide MORE abstractions) such that the programmer can easily express his logic. With easy expression comes less bugs.

      With your example, the problem is a munging of abstractions. A char* is not a string, though it can represent one. C++ allows the programmer to create a string type, if such a thing is needed. It doesn't build in a string type, assuming it was needed. That makes C++ a better designed language than Java or C#.

    9. Re:Language/tools are secondary by stonecypher · · Score: 1

      Why do people spend so much effort fighting over which tool/language is better?

      So that we can learn from our developments and mistakes, and then progress.

      The truth is - existing software quality sucks.

      And without discussion we'll never find out how to improve that.

      --
      StoneCypher is Full of BS
    10. Re:Language/tools are secondary by Anonymous Coward · · Score: 0

      True. But it does improve the quality of the software produced by good programmers.

      High level programming languages do not just provide programmers with safety either. They provide important abstractions that make the task of programming easier.

    11. Re:Language/tools are secondary by 91degrees · · Score: 1

      Surely a string is a useful abstraction. Even C supports them to an extent. Any string in double quotes is a const char[].

      The problem with my example is I mixed in pointers. This is one of the biggest problems with C - The need to use pointers to handle efficient allocation causes a lot of memory related errors. Even good programmers can make these mistakes, and memory is not something that all programmers should have to worry about.

      I'm not saying C is a badly designed language. It is not. It does what it does very well. What I am saying is that a lot of the time it is the wrong language for the job.

    12. Re:Language/tools are secondary by Anonymous Coward · · Score: 0

      Engineers? Wrenches?

      Mechanics and tools, maybe. It depends on who is paying for their tools and what kind of environment they work in. Their work toolkit might be all Snap-On or MAC tools, but at home is probably a mishmash of tools from whomever they go to when they have a problem that needs fixing and they don't have the tool for it.

  66. J++ fragmenting Java by EnglishTim · · Score: 1

    I don't think J++ was ever really about fragmenting Java, it was rather about using it in the way they wanted to. Obviously, they weren't really concerned by any portability issues but I don't get the impression that they were out to fuck Java up.

    1. Re:J++ fragmenting Java by ClosedSource · · Score: 1

      MS took the opportunity to make J++ the best language to use for COM programming. They also knew that programmers were interested in the language and so they decided to support it.

      If you recall, Java applications in those days were much slower than they are now so J++ gave the programmer the option to make their app more efficient by allowing more direct calls to the API than standard Java allowed. The tradeoff was in portability. This tradeoff was no secret.

      The net effect was that Java applications looked more appropriate and ran faster on Windows than "pure Java" apps. You could argue that J++ actually improved Java's image at that time.

    2. Re:J++ fragmenting Java by Duhavid · · Score: 1

      Then why didnt they just ignore it? They had VC++ and VB, what did having a Java impl add for them, except more work?

      Java made the underlying platform unimportant, the exact opposite of MS's strategy ( undoubtedly Sun's exact strategy ), which would have made it easier for Java app environments to have the underlying platform replaced by a non-windows environment. Threat to MS.

      I think it is pretty clear that MS saw that, felt threatened, and moved to do something about it. As I understand it, the licensing was supposed to be that you would support the write once run anywhere idea, which MS did not do, attempting to specialize their version to fragment this. ( Leading to the MS / Sun lawsuit ).

      Now, of course they are not going to come out and say that. The developer community would not support that, and there might be other problems.

      Now, if you think I simply have a case of sour grapes toward MS, I would disagree. I started out an MS fan, and thru watching them over the years, I have learned to distrust their motives and actions. I would love nothing better than for MS to wake up and be a cooperative player and work with others ( obviously, there would be competition in there as well, but as long that is handled in an upstanding manner, that is expected. ).

      --
      emt 377 emt 4
    3. Re:J++ fragmenting Java by Duhavid · · Score: 1

      Why was yet another COM language needed?

      VB and VC++ where both already very COM aware, and performance oriented ( well, VC++ was anyway ). What did MS gain in having J++ COM aware, except to take something away from a competitor.

      --
      emt 377 emt 4
    4. Re:J++ fragmenting Java by EnglishTim · · Score: 1

      Then why didnt they just ignore it? They had VC++ and VB, what did having a Java impl add for them, except more work?

      Java made the underlying platform unimportant


      I think it's important here to seperate what made Java attractive into two parts:

      a) Productivity: MS felt that you could be more productive in Java, and it wasn't a hack of a language like VB.
      b) The portability. I don't really think MS were as bothered by the portability, although it wouldn't surprise me if they were looking at (and are continuing to look at) ways in which they can untie themselves from x86.

    5. Re:J++ fragmenting Java by ClosedSource · · Score: 1

      I wouldn't call VB or VC++ "COM aware", more like COM compatible.

      There are a number of technical reasons why it's easier to perform COM programming using J++. The general idea is that MS's JVM makes COM objects look like Java objects. The J++ programmer never has to call Release() or QueryInterface() the way C++ programmers have to.

    6. Re:J++ fragmenting Java by Duhavid · · Score: 1

      Wrapped in a C++ smart pointer ( the way I do most of my COM programming ), the objects look "native", and I dont have to call AddRef or Release. No difference, as far as I can see, huge effort on the part of MS.

      --
      emt 377 emt 4
    7. Re:J++ fragmenting Java by Duhavid · · Score: 1

      NT nominally separates them from x86, if they just create the HAL for it ( and change up the compilers ).

      I have not noticed that MS cares about my productivity except as it benefits them. To wit, they have buried all the VS 6.0 stuff ( in newer MSDN ), in order to drive more sales and adoption of VS.Net. This makes it harder for me to do my job, should it require the older tools ( and MS propaganda not withstanding, there are good and valid reasons why one might want to stick with the older stuff ). Also, VB was "invented here" java wasnt. MS mostly tends to prefer the stuff they make.

      They have, as far as I know, charged for J++. What was the benefit to MS?

      Making the platform unimportant means that the whole OS can change, not just the chipset the OS is running on. MS sees that as a threat.

      --
      emt 377 emt 4
    8. Re:J++ fragmenting Java by EnglishTim · · Score: 1

      Well, I think they like the idea that if they did move over to Windows running on several architectures, the applications would not require recompilation.

      As for productivity - yes, they are intested in making Windows the easiest platform to develop on. Easier to develop is likely to equal more applications. I know what you mean about MSDN, though - it is a pain that they only ever have the docs for the latest a greatest on there.

      I'm sure you're right though that they don't like the idea of the same program running on multiple OSs, but at the same time I don't think that was why they did what they did with J++.

    9. Re:J++ fragmenting Java by ClosedSource · · Score: 1

      You have the right to have the opinion that smart pointers are not a kludge, but the fact remains that the J++ JVM lets programmers treat COM objects as first class objects without application-level wrappers. If J++ was merely designed to prevent cross-platform development, there would be no reason to add this capability to J++.

    10. Re:J++ fragmenting Java by Duhavid · · Score: 1

      Whether the code that does the bridging is in or out of sight, it is still there. Kludge? Perhaps. Not really to the point, I think. If they wanted a language to have some set of capabilities and features, they could create their own, and be above board and not pee in some other companies soup. If J++ were not supposed to prevent cross-platform development, then this ( COM ) would not be added as a capability, because once you add it, then your only option for platform is a windows platform. Thus executing on MS's plan to tie you to windows.

      --
      emt 377 emt 4
    11. Re:J++ fragmenting Java by ClosedSource · · Score: 1

      Despite the fact that I have answered your question: "Why was yet another COM language needed?" you now consider the question irrelevent because it conflicts with your unwavering belief that J++ is entirely about fragmenting Java. It's clear that no evidence will convince you otherwise, so I'll give up.

    12. Re:J++ fragmenting Java by Duhavid · · Score: 1

      I would respectfully suggest that you have a few "unwavering" beliefs yourself.

      I have yet to see any evidence from you that J++ was such a terribly good thing that it was worth the effort. Note, "worth the effort". Surely the effort was considerable, and they have recouped little to nothing in the way of revenue from it. I dont see what can be considered so stand out great about J++ *from MS's point of view* that it was worth it *to them* to do this.

      Assume for a moment that you did / could. Why use Java for this? Why not create your own language?

      Further, SUN's intent with the language was specifically that it not be specialized to any particular OS/platform.

      And just for the record, my belief is not unwavering. You simply have not convinced me.

      --
      emt 377 emt 4
  67. Re:How and Why C# Was Made by Anonymous Coward · · Score: 0
    How was it wrong to try make Java more useful on Windows than VB (that's essentially what MS did)? Of course many MS haters would have preferred everybody programming for Windows to be stuck with VB, so from that point of view you are right.

    Sun's reaction wasn't correct, but it was an allowable one.

    And MS reaction was just as allowable - take all the work they did on win32 and COM interop and port it to their on runtime so Sun can go f*ck themselves.

  68. Not too innovative by Anonymous Coward · · Score: 0

    This project is how C# should be.

  69. Why does C# have redundant syntax? by pbridger · · Score: 2, Interesting

    One thing I've never seen explained in any of the designer interviews on C# or Java is why they both have the redundant 'new' keyword.

    Neither language allows you to create objects on the stack, so using new to denote 'on the heap' is completely redundant.

    Also, why can't language designers take hints from the *productive* languages as well as the *popular* ones.
    I'm not saying that good programming is a speed typing contest, but modern, popular languages require far too many key presses to get stuff done.

    C#/Java
    Type varName = new Type(args);

    Python:
    varName = Type(args)

    Want static typing? Why not type inference like OCaml?
    Damn them.

    1. Re:Why does C# have redundant syntax? by ctlajoie · · Score: 3, Insightful

      Personally, I like the 'new' keyword. It makes it very clear where an object is being instantiated, and not just assigned through a function (that's what var = Type(args) looks like to me).

      Also, C# allows the core types to be allocated on the stack. Here is a line I pulled from my code:
      byte* buffer = stackalloc byte[256];

      stackalloc can only be used inside an unsafe context.

    2. Re:Why does C# have redundant syntax? by aziraphale · · Score: 2, Informative

      Actually, it's worse than you think...

      int i = new int(1);

      No heap allocation has occurred, we've just allocated an int32 on the stack and dumped the output of the int32 constructor into it. That new keyword is really just an indicator that tells us we're calling a constructor.

      And how about this:

      int[] ints = {1, 2, 3, 4, 5};

      That just allocated a new heap object, and there's no new keyword in sight...

      (Before anyone argues that that's just like string s = "hello", it isn't... string literals are constants, they're pulled out of the interned string pool when they're referenced. Array literals like the one above are created in bytecode on the fly.)

    3. Re:Why does C# have redundant syntax? by Anonymous Coward · · Score: 0

      int i = new int(1);

      Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
      for Microsoft (R) .NET Framework version 1.1.4322
      Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

      testSlashDotFUD.cs(22,15): error CS0143: The type 'int' has no constructors defined


      "new" exists for syntactic clarity. It clearly signifies that a new thing is being created. The array syntax is syntactic sugar for new int[5]{...} but if cut C# code you should probably know that all arrays are object types anyway.

      Both C# and Java are improvements over C++ from a purely syntactic perspective.

    4. Re:Why does C# have redundant syntax? by tommck · · Score: 1

      in C#, structures are not declared usnig new and classes are...
      There IS a difference.

      --
      ---- It puts the lotion on its skin or else it gets the hose again. It does this whenever it's told.
  70. Re:I'm sorry by geekoid · · Score: 1

    no not flamebait, and honest opinion from someone who has used the product.

    Sheesh, who gave Bill Gates mod points?

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  71. Templates are strong typed in C++ by Kupek · · Score: 5, Informative

    C++ is the opposite. In C++, you can do anything you damn well please on a variable of a type parameter type. But then once you instantiate it, it may not work, and you'll get some cryptic error messages. For example, if you have a type parameter T, and variables x and y of type T, and you say x + y, well you had better have an operator+ defined for + of two Ts, or you'll get some cryptic error message. So in a sense, C++ templates are actually untyped, or loosely typed. Whereas C# generics are strongly typed.

    I disagree with that assessment. Both C# and C++ generics/templates are strongly typed. It's just that the enforcement happens in different places.

    In C++, if you try to stick a class into a templated class when that class doesn't have a particular member function defined, the compiler will yell at you, just like Hejlsberg said. But for some reason, this doesn't count as type checking? Yes, template error messages can be strange (and very long) if you're not familiar with them. But that's just a lesson in "know your tools."

    To me, "strongly typed" is strict type enforcement at compile time. C++ templates certainly do this.

    Constraints, however, are something that I think are a generally good idea. Stroustrup's reasoning for not including them in C++ was that "Requiring the user to provide such information decreases the flexibility of the parameterization facility without easing the implementation or increasing the safety of the facility." (The Design and Evolution of C++, Stroustrup, 343).

    He does, however, show an interesting way to get around this using inheritance:

    template <class T>
    class Comparable {
    T& operator=(const T&);
    int operator==(const T&, const T&);
    int operator<=(const T&, constT&);
    int operator<(const T&, const T&);
    };

    template <class T : Comparable>
    class vector { // . . .
    };

    (The D&E of C++, Stroustrup, 344)

    This technique is similar to how C# does constraints, class List where T: IComparable. One is supported and enforced by the language, the other is a natural consequence of the languages facilities. In general, I think that constraints are probably a good thing. Having an error message like "Can not instantiate class Y<T> because T does not implement z()" is probably best, and when looking at a class' declaration, it would be nice to see up front what assumptions the templated class makes.

    1. Re:Templates are strong typed in C++ by code_martial · · Score: 2, Interesting

      Constraints, however, are something that I think are a generally good idea.

      Stroustrup seems to be thinking of them for C++0x. See this paper, for example, from the C++ Standards Committee papers.

    2. Re:Templates are strong typed in C++ by Anonymous Coward · · Score: 0

      >> But that's just a lesson in "know your tools."

      Someday the majority of programmers will choose tools that don't require arcane knowledge to use, so they can concentrate on getting their programs working.

    3. Re:Templates are strong typed in C++ by Kupek · · Score: 1

      Knowing that you have to implement certain member (or global) functions in order for a templated class to compile is hardly arcane knowledge.

  72. Quick! by Anonymous Coward · · Score: 1, Funny

    Drop it in the hot java!

  73. Re:Why do big companies want pseudo-compiled langs by Brandybuck · · Score: 1

    But not _much_ slower.

    Says the person with the dual CPU server. From the first day of Java, the proselytizers kept telling me to get faster hardware and wait for the next version. I now have hardware 30 times faster, and four major versions later, and Java STILL crawls on my system. Even purely interpreted languages like Python and Ruby are faster!

    --
    Don't blame me, I didn't vote for either of them!
  74. Its not pronounced Coctothorpe ?!??!! by Anonymous Coward · · Score: 0

    Its not pronounced Coctothorpe ?!??!!

    I actually think coctothorpe sounds
    appropriate for some reason.

  75. Re:How and Why C# Was Made by rufusdufus · · Score: 2, Interesting

    There is history before java that matters too; Such as Microsoft had its own processor independant P-Code compiler nearly a decade before java, but kept it private probably as a competitive advantage. This is a cold irony.

    Microsoft was worried about java even before it became popular; for the simple reason that if a portable internet language did become popular, it would obviate the need for windows.

    Microsoft did not get their hat handed to them when they attempted to co-opt java: seems to have worked nicely.

  76. Sun should learn from Microsoft by Anonymous Coward · · Score: 0

    .NET has a lot of strengths and I think people dismiss them. The problem with .NET is its windows only support. The mono project and dotGnu don't count. They both suck. I tried to get mono to run on freebsd.. although there is a port, i couldn't get the thing to work with apache for anything. .NET is so much easier to do web development with. I may have to return to the evil microsoft realm because even with patching windows everyday it saves me a LOT of time using .NET wheither it is C#, VB.NET whatever.

    Java is wordy and the Servlet/JSP system sucks. It takes too long to do anything because you are worrying about low level crap. I often forget to do decent data validation because i'm worrying about dum stuff. I actually wrote a message board in C faster than in java simply because i didn't have to screw with tomcat for a year.

    A IIS/.NET solution is much quicker than an Apache httpd/Tomcat/JSP/SERVLET/AXIS/insert your favorite web framework here setup.

    closed source sucks because of portability, and open source sucks because 2 guys make money off of you coding (like redhat) and another guy writes a book about your work. Its a lose, lose situation.

    I'd kill for something like .NET in OSX and FreeBSD but not a lame open source attempt. No one even ported VB! Come on!

    1. Re:Sun should learn from Microsoft by Anonymous Coward · · Score: 0

      No real programmer would ever admit to writing code in VB, so why would one implement it?

  77. Its not redundant by s88 · · Score: 1


    In your example, I know with complete certainty that I am creating a new "Type" and assigning it to the variable "varName". This is not the case if it used the syntax of Python. How do you know I am not calling a method called "Type"?

    Scott

    1. Re:Its not redundant by hobuddy · · Score: 3, Informative

      In your example, I know with complete certainty that I am creating a new "Type" and assigning it to the variable "varName". This is not the case if it used the syntax of Python. How do you know I am not calling a method called "Type"?

      You don't know, and you shouldn't.

      Suppose at first you do, in fact, instantiate a new object via the 'Type()' call. Later, during the optimization phase, you discover that in most cases you can return a reference to a pre-existing, pooled object. In Python, you can make that change without breaking client code; not so when object creation is explicitly annotated.

      As to whether Type is a method, function, or class constructor, it doesn't matter as long as the returned objects implement the required interface.

      --
      Erlang.org: wow
    2. Re:Its not redundant by DrEasy · · Score: 2, Insightful
      Exactly! Alternatively, you could use the Smalltalk idea of making new() a static method. No need for a special syntax for creating an object!

      You would then have something like this in Java:

      Type myType = Type.new(); //invokes Type's static new() method

      And of course you should feel free to override the implementation of new(), just like you would do it in any constructor. No more need for messy super()... Oh but static methods in Java can't inherit behavior? Because classes aren't considered as objects? Doh! How very object-oriented... (end of sarcasm)

      In any true object-oriented language, you should be able to write almost everything as object.method(argument), and this is not the case with Java unfortunately...

      --
      "In our tactical decisions, we are operating contrary to our strategic interest."
    3. Re:Its not redundant by Anonymous+Brave+Guy · · Score: 1
      In any true object-oriented language, you should be able to write almost everything as object.method(argument), and this is not the case with Java unfortunately...

      I see your point, but of course that "purist" view is also why OO struggles so hard to model some simple concepts, which frequently boil down to examples of multiple dispatch.

      If languages are going to support objects, they'll be improved by having a uniform syntax for all of:

      • method calls
      • multimethod calls
      • non-member function calls
      • accessing members/properties directly.

      You can have the really useful thing from OO -- the power of implicit type coercion and polymorphism -- without creating artificial distinctions between actions that are really serving the same purpose. It's just that many languages -- notably including C++, Java and C# -- don't.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    4. Re:Its not redundant by bnenning · · Score: 1

      You would then have something like this in Java:

      Type myType = Type.new(); //invokes Type's static new() method

      And of course you should feel free to override the implementation of new(), just like you would do it in any constructor. No more need for messy super()... Oh but static methods in Java can't inherit behavior? Because classes aren't considered as objects? Doh! How very object-oriented... (end of sarcasm)


      Agreed 110%. And if the "constructor" takes arguments, not only could you give it a better name ("type=Type.newWithFoo(foo)"), but subclasses wouldn't need to pointlessly re-implement the constructors to do nothing but call super.

      Objective-C does exactly this (along with almost, but not quite, treating classes as true objects), and it's very nice.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
  78. What did they miss about checked exceptions by 21mhz · · Score: 4, Insightful
    I must say he doesn't seem to grok exceptions very well.
    Anders Hejlsberg: The scalability issue is somewhat related to the versionability issue. In the small, checked exceptions are very enticing. With a little example, you can show that you've actually checked that you caught the FileNotFoundException, and isn't that great? Well, that's fine when you're just calling one API. The trouble begins when you start building big systems where you're talking to four or five different subsystems. Each subsystem throws four to ten exceptions. Now, each time you walk up the ladder of aggregation, you have this exponential hierarchy below you of exceptions you have to deal with. You end up having to declare 40 exceptions that you might throw. And once you aggregate that with another subsystem you've got 80 exceptions in your throws clause. It just balloons out of control.

    Well, if you're a Java programmer worth your salt, you DON'T propagate every exception class the underlying modules might want to throw. You make your code catch exceptions rising from below and either handle them or massage them into the exception set your module exports. This is much better for the upper-level users because they want to deal only with situations raised by, and meaningful for, the APIs at hand, and they don't have to care about what would brew beneath.
    If you don't want to lose exception stack information, as of J2SE 1.4, you can chain an original exception to your higher-level exception, so that everything would be rolled down nicely in a trace printout.
    --
    My exception safety is -fno-exceptions.
    1. Re:What did they miss about checked exceptions by LadyLucky · · Score: 1
      Wow, someone who understands exceptions. The only justification I can possibly see for the C# approach is that so few people really understand exception handling in Java, such as the example you have listed above. You catch the implementation specific exception, add context, and rethrow as an interface specific exception.

      Prior to 1.4, we always had a base exception class that did the nesting for us, by overriding the printStackTrace() methods, and printing out both.

      --
      dominionrd.blogspot.com - Restaurants on
    2. Re:What did they miss about checked exceptions by balbeir · · Score: 1

      Ah, you hit the nail right on the head. I couldn't have said it better. The lack of checked exceptions is a major C# weakness IMHO. It's all about compile-time checking versus runtime checking. The more stuff you can get the compiler to check the less you get to debug these things at runtime, which is a waste of time.

    3. Re:What did they miss about checked exceptions by ajagci · · Score: 1

      The only justification I can possibly see for the C# approach is that so few people really understand exception handling in Java, such as the example you have listed above. You catch the implementation specific exception, add context, and rethrow as an interface specific exception.

      Yeah, and what have you gained? Every interface has at least one interface-specific exception, and the IOException that a caller expected is now wrapped up in some obscure wrapper class.

      Wow, someone who understands exceptions.

      Too bad he doesn't understand OOP.

    4. Re:What did they miss about checked exceptions by Anonymous Coward · · Score: 0

      What about the point Anders makes about updating libraries? When the library function you expected to throw expection A gets upgraded to throw exception B, your code breaks. And even worse, your code breaks every single place that library is used. With C#, you only have to update the one place where you care about that exception.

      aQazaQa

    5. Re:What did they miss about checked exceptions by aziraphale · · Score: 3, Insightful

      Oh, he understands, alright. Object oriented programming is all about exposing clean programming interfaces, and what exceptions your objects' methods throw are as much a part of those interfaces as their parameter lists and return types. The point of interfaces is that they abstract you away from implementation. When I call a method called getWeatherForecast(), I want it to return me the weather forecast, or throw me a WeatherNotAvailableException. I don't want it to sometimes throw a DbException because it had to go and talk to a database, or sometimes an IOException because it's reading from a cached file, or sometimes throw a NetException because it's talking through a socket, or sometimes throw a SoapException because it's trying to reach a web service. None of these things are of any possible interest to my code - I have no interest in considering how that component is going about its business of getting me a weather forecast. Were you never taught to consider objects as black boxes? The implementation of an object's method is not the concern of the calling code, and that is why we wrap exceptions. All the time. Now, it may be that the WeatherNotAvailableException might have some information attached to it that could be of use to a human troubleshooting the source of the lack of availability - but this information should be contextually relevant. Randomly propagating exceptions from inside the black box of a method are not contextually useful. so, I call getWeatherForecast() and I get back a SocketException: 'The host could not be found'. Great. That's meaningless to my code. It doesn't know what host the method was trying to reach, nor is it really interested. A WeatherNotAvailableException saying 'The weather service at http://weather.example.com/ could not be reached' would be a lot more useful.

    6. Re:What did they miss about checked exceptions by 21mhz · · Score: 1

      The sad truth is, programmers never bother to update, even if they should care about the new exception.
      The interviewer was right on the money: when a throw specification changes, it's a breaking change, whether it's checked or not. And it's better be checked, lest you get unexpected exceptions popping up in production code. When exceptions are checked, you're aware of the new exception the first time you compile against the upgraded method.

      --
      My exception safety is -fno-exceptions.
    7. Re:What did they miss about checked exceptions by Anonymous Coward · · Score: 0

      Nobody expects to change a method's argument list without breaking all code that calls it, so why do people expect to change the method's exception specification without the same problems? Interfaces should be immutable, and deprecated and replaced when necessary. If it didn't occur to you that you'd want to throw some exception, either you didn't think through problems in that method's requirements or there are implementation details you're failing to shield your callers from.

    8. Re:What did they miss about checked exceptions by ajagci · · Score: 1

      Object oriented programming is all about exposing clean programming interfaces,

      Sure.

      and what exceptions your objects' methods throw are as much a part of those interfaces as their parameter lists and return types.

      Yes, that's what exception declarations are trying to achieve, but they are trying to achieve the unachievable. The whole point behind exceptions is that they are non-local exits.

      When I call a method called getWeatherForecast(), I want it to return me the weather forecast, or throw me a WeatherNotAvailableException. I don't want it to sometimes throw a DbException because it had to go and talk to a database, or sometimes an IOException because it's reading from a cached file, or sometimes throw a NetException because it's talking through a socket, or sometimes throw a SoapException because it's trying to reach a web service.

      Yes, and in that case, getWeatherForcast() might catch some exceptions and re-throw a WeatherNotAvailableException--nothing is keeping you from that in languages without exception declarations. The problem is that you erroneously assume that all exception handling in OO systems can be structured that way, and it can't.

      Note that Java's exception declaration system makes no guarantees anyway, since you can still get unexpected errors and exceptions from any method you call.

  79. Re:Why do big companies want pseudo-compiled langs by Glock27 · · Score: 2, Interesting
    It seems to me that big companies like Sun and Microsoft like pseudo-compiled languages like Java

    I guess you've not heard of gcj, TowerJ or the other traditional ahead-of-time compilers for Java, eh?

    Java is not necessarily a VM based language - that's not to say that VMs aren't useful in lots of situations. Obfuscators also often work well. Of course, if you're doing server-side code, decompilation isn't an issue at all...

    Nice straw man though... ;-)

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  80. Gates and Balmer by jay-be-em · · Score: 1

    Got it on. The resulting santorum became known as C#

    --
    "Orthodoxy means not thinking--not needing to think. Orthodoxy is unconsciousness." --Eric Blair
  81. Why did MS make J#? by Jugalator · · Score: 1

    Answer: To beat Java.

    C# wasn't made to beat Java.
    J# is.

    --
    Beware: In C++, your friends can see your privates!
    1. Re:Why did MS make J#? by Max_Abernethy · · Score: 1

      J# failed, because it's faster but old, and crappy. Perhaps C# can be seen as Microsoft's second shot.

    2. Re:Why did MS make J#? by Anonymous Coward · · Score: 0

      No - you are thinking of J++. J# is a new and different animal. One to replace Java my giving Java code a much easier porting path to .NET.

  82. Obsfucation by Space_Soldier · · Score: 0

    That is why you use obsfucation programs. They can decompile all they want, they won't understand anything.

  83. Re:C# History Site by Anonymous Coward · · Score: 0

    Uh, the fact that you push shit around with your dick?

    Moron

  84. Re:OT: SCO reveals files and line #s of "copied" c by Anonymous Coward · · Score: 0

    Damn, three whole hours--it was 3:34pm when AC posted it here and 6:51pm when Slashdot put it on the site. sssssssssssssssssssssssssssssssspin

  85. Downloadable applications by maxgilead · · Score: 2, Interesting

    You should be much more careful with 'nobody' word.

    As my first-hand experience I can say that we use Java for both server and client side for corporate software and yes, it's downloadable application. Excellent solution if you ask me, trivial to update, secure, portable and very nice environment for developers too.

  86. Server-side makes no difference... by Futurepower(R) · · Score: 1


    Server-side makes no difference for commercial products. The competitor merely buys a copy.

    The compilers are not true compilers, as far as I know. They compile to byte code.

    1. Re:Server-side makes no difference... by Anonymous Coward · · Score: 0

      GCJ compiles Java to native code. That is not byte code. You obviously know nothing about the subject.

    2. Re:Server-side makes no difference... by Glock27 · · Score: 1
      Server-side makes no difference for commercial products. The competitor merely buys a copy.

      It certainly does if your product is a service delivered from your servers...you know, like E-bay, Amazon, or Yahoo. You've heard of them I hope? ;-) (Sorry about the delayed response BTW - I hope you notice the reply.)

      Traditional software sales are only one possibility out of many...

      The compilers are not true compilers, as far as I know. They compile to byte code.

      You don't know far enough. They are true, traditional compilers, compiling to a regular executable file. ELF in the case of Linux, I believe. (To preempt one of your replies, gcj also includes a bytecode interpreter so it can handle truly dynamic code - but high performance code is compiled traditionally.)

      I hope that cleared things up a bit. :-)

      --
      Galileo: "The Earth revolves around the Sun!"
      Score: -1 100% Flamebait
  87. Re:Why do big companies want pseudo-compiled langs by Anonymous Coward · · Score: 0

    Just so you know, disassemble != decompile. It's not so easy to decompile assembly back into C/C++, so make a relevant comparison.

  88. Re:How and Why C# Was Made by Aelfinn · · Score: 1

    13. And even with all the vitriolic hate for MSFT and its evil business practices it was the Open Source Community which eventually drove SUNW out of business.

  89. Re:I'm sorry by Anonymous Coward · · Score: 0

    You got modded down by the old-timer assembly-hackers who thrive on goto ;)

  90. Re:C# History Site by Anonymous Coward · · Score: 0

    It boggles my mind that some people *do* crap. But we gotta tolerate those homos. Excellent lobbying and SIG power, for sure.

  91. Constraints on type parameters by Anonymous+Brave+Guy · · Score: 2, Interesting

    AIUI, the major reason many of the big names in C++ don't like language-supported constraints on type parameters is that just having "derives from this base class" isn't a sufficiently general condition for good support of generic programming.

    C++ enforces any necessary interfaces at compile-time, by checking whether the instantiation of a function template can be interpreted properly with the functions available. Requiring every class that supports == to derive from EqualityComparable is just a cumbersome extra for no benefit in a generic, C++ based world, where there are more ways to define and implement interfaces than just inheritance. If it doesn't support ==, the function template will fail to compile at the point of instantiation anyway. (OK, strictly speaking export messes up the compile-time/link-time distinction slightly, but the basic point is still valid.)

    Incidentally, it is possible to use template wizardry in C++ to enforce various plausible constraints on type parameters if you really want to restrict them more than their usage within the function template does anyway, perhaps to guard against a possible misinterpretation of the template code in some cases. It's relatively straightforward to do this, and requires little more code than the formal constraints used by some of the other languages under discussion.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Constraints on type parameters by Kupek · · Score: 1

      Requiring every class that supports == to derive from EqualityComparable is just a cumbersome extra for no benefit in a generic, C++ based world, where there are more ways to define and implement interfaces than just inheritance.

      For the C++ world, I don't like that way either. If constraints were in C++, I think they should be done on a member function basis. That is, you explicity state which member functions must be implemented.

    2. Re:Constraints on type parameters by Anonymous+Brave+Guy · · Score: 1
      If constraints were in C++, I think they should be done on a member function basis. That is, you explicity state which member functions must be implemented.

      But that doesn't work either...

      You can (and probably should) implement binary operators as free functions, for example, if necessary making them friends of the class in question. When I write if(a==b), C++ just needs to know what the == operator means in this context. It doesn't, and shouldn't, matter exactly how it's defined, or whether it's a member function; again, imposing such a limitation gains you nothing and damages support for generic programming.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    3. Re:Constraints on type parameters by Kupek · · Score: 1

      You're right, "member function" was the incorrect phrase. Sometimes they will be member functions, sometimes they will not. But, really, that wouldn't change what a constraint would look like in the language.

  92. I think he understands just fine by Anonymous+Brave+Guy · · Score: 1

    What you say is certainly true up to a point: the highest level code in a particular subsystem, right behind its interface, should indeed define any exceptions it's going to allow out of the subsystem as part of that interface. If there is language-level support for enforcing that definition, it probably makes sense to use it.

    However, within the subsystem itself, you often don't want to be translating exceptions at every layer. To do so defeats one of the major advantages of exceptions: you can throw an exception up through several layers at once to a handler, and intervening layers don't have to care unless they're taking some action to handle (or part-handle) the particular exception you threw. In that environment, you could easily wind up with many possible exceptions being thrown from different contexts, but handled in a small number of places. Even with inhertiance and catching groups of related exceptions at once to keep the complexity down, having to give a full specification for everything would soon become unwieldy.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:I think he understands just fine by Anonymous Coward · · Score: 0

      If you do not want to handle the exceptions of a subsystem everytime you use it why don't you create a wrapper (facade or whatever) to do it only once ?

    2. Re:I think he understands just fine by Anonymous Coward · · Score: 0

      Well, you COULD catch all error exceptions at a central location in your project trivially if Java supported multiple inheritance.

  93. Re:Why do big companies want pseudo-compiled langs by master_p · · Score: 1

    but in some cases programs in Java are faster than C programs

    And which cases are that ? from the moment a Java program uses casts (that is, every Java program), it's by definition slower than the equivalent C/C++ program). A Java cast is like the operator 'dynamic_cast' in C++. Imagine a C++ program full of dynamic casts!!!

    I don't think languages play any role. What is important is portability and the ready-to-use libraries. For example, I know many programmers who use C++ and QT who are as productive as the Java ones. I wrote the last couple of days a 5000 kloc program in Qt, with various forms etc.

    You know what is missing from Java ? a decent callback mechanism. The observer-listener classes just don't cut it. I've seen many times for programmers to implement dispatch tables and choosing dynamically which method to call. On the contrary, C# has delegates...a much better mechanism. Of course, nothing beats Qt's signals and slots: it's the ultimate way to write reliable component software.

    Another point I would like to make is that it's funny that it took them 4 years to design C#. That's a lot of time, don't you think ? any competent C++ programmer will tell you C++ deficiencies right away. Why did it took them 4 years ? I have tried to design my own language as a pet exercise and it took me 1 week from C++ to C#.

  94. Well, "throws Exception" by r6144 · · Score: 1
    If you don't want to handle the checked exception mess, just use "throws Exception" in every method. Of course, you can use more specific classes if the method isn't supposed to throw anything else, according to the interface.

    In this way I can avoid handling most exceptions when I don't really know how. Certain APIs constrains the exceptions you may throw (for example EJBException only), in which case I have to do some chaining. Catching exceptions without doing anything, or with only a stacktrace, seriously hampers debugging, so I never do that.

    I think C#'s approach, where every method implicitly "throws Exception", is practical in most cases. Catching exceptions when I do not really want to is both cumbersome and dirty, and declaring "throws Exception" in every method looks a bit funny.

  95. Where he "worked as an architect of Visual J++" by rabs · · Score: 0


    I wonder how he dealt with the political climate that surrounded this. I mean, first J++, a dead-end language that would be used to corner Java programmers into Microsoft's plans, then C#, the next step in "embrace and extend."

    - rabs

  96. Anything with a runtime library like GCJ's is ... by Futurepower(R) · · Score: 1


    Quoting from the GCJ web site: "Compiled applications are linked with the GCJ runtime, libgcj, which provides the core class libraries, a garbage collector, and a bytecode interpreter. libgcj can dynamically load and interpret class files, resulting in mixed compiled/interpreted applications."

    Anything with a runtime library like GCJ's is easily decompiled. That's because the code largely consists of calls to the library.

    Another thing: I understand that people who visit Slashdot sometimes have less than the normal social sophistication. But it is possible to learn. The first step in learning is to avoid attacking the other person when you disagree.

    I have expressed a reasonable opinion, I think. However, in this thread I've been called a "dork conspiracy nut" and you said, "You obviously know nothing about the subject", when you obviously didn't visit the GCJ web site and read the second paragraph.

    There is a VERY important issue here: The business logic of even something as simple as an e-commerce web site is very, very complex. There nothing difficult about it, but it is detailed and complex. The underlying issue is that it is extremely easy to discover all the steps by de-compiling a business application. There's no complex math. There's no complicated understanding required. It is much easier to de-compile than to invent all the steps yourself.

    Microsoft's license agreement for its compilers specifically prevents its customers from competing with Microsoft. How's that for an anti-trust violation? Big companies are VERY aware of this issue. They cripple the competition any way they can; that's their mentally disturbed idea of how to live their lives. There's no conspiracy; that's just the way they do business.

    I'm taking my time to give my opinion because giving it could make a difference. We should all realize that C# is just another distraction from working to get the language that we all really need. C# has nice features, but someone should express some ideas that show that the success is very limited. The designer of C# is just a cog in the adversarial business machine.

  97. Java as J++ as VB wasn't the real issue by Latent+Heat · · Score: 1
    I actually have a little bit of experience with J++. I have a set of ActiveX components I want to use with C#, but C# throws security exceptions when you use any "unmanaged code" in a C# executable launched from a network share unless you give full privileges to the network share, so I was looking into J++ as an alternative.

    J++ really is .NET Version 0.9, and it is pretty slick -- it does everything Visual Basic does, but you are using Java. Never succeeded in the market: VB types weren't interested and Java types didn't want to be polluted by it.

    I think the sticking point was that if Microsoft walled off its J++ Windows-specific extensions in the microsoft.com.whatever JAR files, everything would have been cool. But Microsoft was accused of monkeying with the System.lang.java stuff and some other hacks that broke Java as crossplatform -- stuff reminiscent of Windows 3.1 checking to see if it was being launched from DR-DOS and the like. Was there also some non-JNI compatible native hookup as well?

    Knowing Microsoft, they were up to their old tricks, and J++ as a Visual Basic clone wasn't what the fight was about. Heck, SWT is not portable Java in the way SUN defines it, but apart from SUN's moaning and groaning about it, SWT is perfectly conformant with what you are allowed to do with Java and be square with the license agreements.

    I think Microsoft got off better in the popular press (SUN wanted Microsoft to implement Java, Microsoft implemented Java and even improved it (!), and now SUN is complaining -- what is the matter with those SUN dudes?). But I believe that Microsoft was really f-ing with SUN and SUN had a leg to stand on.

    Where SUN was stupid is that they told the world that Java was about breaking Microsoft dominance before they were really in a position to rule the world, and what were they thinking that they could be in partnership with Microsoft in bringing Java to Windows without Microsoft trying to ream them just like everyone else? But the ideas that SUN is a bunch of crybabies who can't decide if they want Microsoft to put Java on Windows or not is more Microsoft having better PR than the reality on the ground.

    SUN is for real a "victim of a crime", and going consensually into that hotel room didn't make what happened next less of a crime, but people are saying what were they thinking when they entered that hotel room.

  98. Toss OOP by Anonymous Coward · · Score: 0

    His point is that trying to use an OOP metaphor for enormous, architecturally sound remote object invocation/data transfer systems is a terribly complex task.

    Toss OO for such. Procedural with database transactions will be simpler. There is no objective evidence that it is worse or scales less.

  99. Hejlsberg's wrong about checked exceptions. by Anonymous Coward · · Score: 0

    His arguments regarding scalability and versionability are specious and basicall amount to "some coders misuse the feature". Checked exceptions should only be thrown when the exception should be caught. Thrown an unchecked exception if it doesn't matter it gets caught.

    Hejlsberg talks, in the distributed objects section, about the importance of letting coders choose whether use distributed objects (by forcing the code to be distributed or not, but not both as in Java). But he won't let us choose whether to use checked exceptions since C# doesn't support them at all. Methinks he's marketing C# rather than explaining it. Can't he just say "we hope to catch Java's level of feature maturity soon"? I'd give his arguments more credence if he did.

  100. Re:Why do big companies want pseudo-compiled langs by aled · · Score: 1

    from the moment a Java program uses casts (that is, every Java program), it's by definition slower than the equivalent C/C++ program)

    May be you mean that a cast in cast is slower that a cast in C??
    Don't let reality disturb you but just with a little googling you can find some article with facts about Java speed and how could it be faster than C.

    Imagine a C++ program full of dynamic casts!!!

    I can't. I also can't imagine a Java program full of casts. Most I have seen or written have only a few casts.

    I know many programmers who use C++ and QT who are as productive as the Java ones.

    A programmer could be productive in any language. When talking about language productivity I usually assume it's refered to a general case, in some context. Example: I believe most programmers are more productive in Java for database enterprise apps than in Oracle PRO/C (Yuck!). Also the Java database programs are more portable and independent of the DB.

    any competent C++ programmer will tell you C++ deficiencies right away

    Not always. Some C++ programmer have their C++ hats down to the waist making them virtually (:-) blind to other languages features. By example take STL, which many believe is an end in itself when it should be a means.

    --

    "I think this line is mostly filler"
  101. Re:Why do big companies want pseudo-compiled langs by pod · · Score: 1

    Compiling down to native assembler ops (like C/C++ is) really mangles your code. Even very basic optimizations will result in drastically different source. Hell, Java bytecode to Java decompilation sometimes has no resemblance.

    --
    "Hot lesbian witches! It's fucking genius!"
  102. That was then, this is now by DannyO152 · · Score: 1

    Last month, Mr. Spolsky noted he had acquired a more nuanced point of view about when to develop in C#. Still, as your link notes, he thought it was the thing to do in April aught-two.

  103. Re:Anything with a runtime library like GCJ's is . by Anonymous Coward · · Score: 0

    Goddamn you are a fuckwit. GCJ can compile to native machine code you idiot (it uses the gcc backend as it is merely a frontend just like the cp frontend).

    libgcj is compiled to machine code but has the capability to interpret bytecode in the case that you want to use bytecode class files.

    Using gcj and libgcj it is possible to compile a completely native machine code application.

    Anyway this is not a matter of opinion, it is an issue of fact. Your opinions have no bearing on the actual capabilities of gcj.

    You obviously don't have the background to understand what gcj is.

  104. If Anders would just return the favor... by fm6 · · Score: 2, Funny

    Now we only need for Anders to write an article explaining why Spolsky is such a jackass...

  105. Re:I'm sorry by Anonymous Coward · · Score: 0

    Linus uses goto within the kernel. And C# only allows goto as a means of explicitly marking switch-case statement fall through. Nothing else.

  106. Java, C#, C++, Objective C, etc.. by rofthorax · · Score: 1

    All stole from smalltalk and c, its c's syntax with smalltalk's concepts.. Java: smalltalk in the form of c++, with parts of object hiearchy located in libraries, with the added problem of deprecation of object classes which keeps developers on their toes. C++: like java only compileable, and just as indecisive about the structure.. c: a form of assembly that evolved into higher forms of expression through clever syntax.. Smalltalk: higher concept and form of design, based on objects and the development of applciations by the usage and inheritance of object classes, but to share applications, due to the dependence on underlying object classes, one must deliver all underlying objects that the application depends on, resulting in usually copying the entire smalltalk system (this is like, if we wanted to get a copy of Emacs, we need to get Lisp as well, or if we want IE we need Windows as well). C#: who knows, looks like its massively dependent on another architecture, that being .NET .. The grand being that programs will be based on disparate objects across the world, or alternatively all at Microsoft where they can suck the wallets of everyone dynamically: I'm sorry, you can't use MSWord today, the text object was deprecated last night, to use Word you will have to upgrade, that will cost you 250,000 dollars.. Of course this is a pipe dream for Bill Gates.. But.. Eventually it will be true.. PS- Javascript is not a Java language, it was a name stollen by Netscape to attribute value ro their browser language. I would expect that C# stole C in the name to attribute glory to it from the C world.. Microsoft is forever changign the language and stealing names, this is what they are good at.

    --
    Just say no to license servers!!
    1. Re:Java, C#, C++, Objective C, etc.. by Anonymous Coward · · Score: 0

      I've got some extra tinfoil for you tard

    2. Re:Java, C#, C++, Objective C, etc.. by Anonymous Coward · · Score: 0

      Wow, you don't get out much do you? There's professional help out there for you.

    3. Re:Java, C#, C++, Objective C, etc.. by Anonymous Coward · · Score: 0

      Hey asswipe, how about you make a donation to me for having to listen to your psychopathic ramblings.

  107. Re:C# History Site by Narchie+Troll · · Score: 1

    That's what enemas are for.

  108. wrong analysis by ajagci · · Score: 2, Insightful

    most serious C# drawback is that it doesn't have (and probbably will never have) so rich and wide open source community like Java does (Apache group, Object Web group and many many many more...)

    It is true that there is more open source server-side web stuff for Java than there is for C#. But, against that, you have to hold that C# actually has a full-featured, high-performance, compatible open source implementation. Also, you can get a full-featured, open-source, widely-used GUI toolkit for C#, namely Gtk#.

    And all that open source Java stuff doesn't really matter as long as Sun owns key parts of the platform (e.g., the Swing implementation). Yes, you can exchange open source Java libraries all you want, but Sun has ultimate control.

    Each tiny crappy component, each crappy lib for C# out there on the net is sold,

    No, it isn't. You are thinking .NET components. .NET and C# are two entirely different things. There is a lot of open source C# software out there (check go-mono.com).

    What you should really be asking if you are interested in open source is: if I only use open source tools, how do the two software platforms compare? And if you only use open source tools, Java looks like a pretty sad platform: you can choose between Kaffe, orp, and gcj as runtimes, but none of them are anywhere near complete and most open source Java libraries don't run on them. You can't even get a working open source Swing implementation. In comparison, C# is much further along: Mono has a lot of the .NET APIs implemented, and, additionally already has a complete set of open source toolkits and libraries, with APIs that, unlike the Java stuff, are already familiar to existing open source programmers.

  109. pseudo-compiled languages can't fix logic errors by emarkp · · Score: 1
    In many cases, pseudo-compiled languages, or languages that use a VM are a better choice. No worrying about memory management, buffer overflows, etc.
    Memory management (GC, smart pointers, etc.) are all available with C++ right now. Buffer overflows are logic errors, not syntax errors. Learn to write correct code and you won't get a silent buffer overrun or a thrown exception (available in C++ as well, see std::vector::at() member function). The biggest problem with all GC languages I've seen is the issue of lifetime management. I don't care so much about when memory is reclaimed (that is after all just a resource the OS should manage). I do care when the object's life ends--it is then that the object must take care of any logic that must follow if it is going away. The C# model is that once you're being garbage collected, you have no guarantee about any object which you might have a reference to. Hence you need to differentiate between being disposed of by the program vs. by the system. Oh, and if you want to check that reliably, you need to worry about muliple threads disposing of the object, etc. Some of the most exciting developments I've seen in the C++ community arise (ironically) with Herb Sutter's suggestions about how to make Managed C++ better (that is, make a C++ variant that is GC friendly). He separates the ideas of lifetime management and memory management. And although I disagree with some of his conclusions, he clearly gets it.
    There will always be a place for C and C++ in places where you *NEED* low-level control over things like memory management, or where performance is very critical. But for most applications, this is simply not the case. You want a language that can do all you need it to do, and you don't want to worry about the rest of the details.
    But I don't worry about details in C++ anymore. And haven't for several years now. The problem with languages which "take care of the details" is that they don't let you take care of the details. I much prefer an expressive language which allows me to do what I need to with minimal fuss, but lets me get into the details if necessary over a language (or environment) which ties my hands. Especially when it really doesn't fix things, like Java's null-pointer exception, or C#'s brain-dead 'using'.
  110. Re:Anders leaving Borland - a blessing in disguise by nimblebrain · · Score: 1

    I remember the scores of Chicken Littles that came out of the woodwork when Anders got 'fished' from Borland. Regardless, under the hands of Chuck J and others, it still went along swimmingly.

    It's actually pretty interesting the ties between some parts of Borland and Microsoft's .NET team. (I was at BorCon a couple of years back when Anders did a keynote speech, and did demonstrations of ASP.NET... using Delphi 7's .NET Preview Compiler to very good effect.) They've had to face a number of the same challenges. .NET actually has to approach the Windows API in the same manner as many decent class libraries have (glad to see that the .NET framework is miles away from the spaghetti vomitus of MFC, likely in part an Anders influence). Borland had to work around the idiosyncracies of the Windows rich-text APIs in making their TRichText control. Such experiences are valuable. In return, Borland gets some excellent heads-ups on the technology.

    I've had a chance to use Delphi 8/for .NET, and I must say that Danny Thorpe, Corbin Dunn et al have done a marvellous job in making porting to .NET easy. Compared to porting to Kylix/CLX (which 'everyone wanted', but nobody would pay for - *laugh*), porting to .NET was a breeze. I even ported DUnit across while I was at it :)

    As to missing generics, I, too, missed some sort of generics. I loved Ada's model for generics, loathed the way most C++ compilers handled templates (more specifically at the time, how they handled errors and tracing :), although I got good mileage out of them.

    I have an implementation of Rossen Assenov's generics for Delphi (using a trick similar to that in C++ before the 2.1 standard) here on my web page. A few limitations (which you can get around if you're not averse to 2-layer-deep includes :), but works like an absolute charm, and it does still work in Delphi for .NET (though you will have to ensure you aren't using pointers in your list classes if you want to be managed-code compliant :).

    --
    Binary geeks can count to 1,023 on their fingers :)
  111. your entire view is wrong by ajagci · · Score: 1

    You apparently view software systems as being composed of "upper-level users" and "what is beneath". That's a very procedural world-view. In a procedural world-view, Java's exception handling makes sense.

    But for object-oriented programming styles, things don't work that way. In an object-oriented style, when we have method P calling method Q calling method R, then method P may know exactly what exceptions method R may throw, but method Q may be from a completely different library and should not have to know or care about exceptions that propagate from R to P.

    Declared exceptions in Java are a testament to procedural thinking; they show that a lot of Java programmers pay lip service to OOP but still just program like they were writing FORTRAN programs.

    1. Re:your entire view is wrong by aziraphale · · Score: 1

      Odd that you talk about OO programming as involving stacks of method calls... that sounds more like procedural, function-pointer-led thinking than OO, interface-led thinking to me.

      Let me break this out into terms I understand. Let's say methods P and R belong to a class, C. C implements interface I, defined in a thirdparty library. I declares the signature of method R. The library also defines another class, D, which has a method, Q, which takes as an argument an object of type I.

      So, we have an instance of C, and its method P has been called. This code calles Q on an instance of D, passing in itself as an argument of type I. Because Q knows the I interface, it can call R(), so it does. R() throws an exception, expecting it to somehow make its way back to P()... and that's where it breaks down.

      What right does R() have to assume that the code anywhere above it in the callstack comes from the same library? Why can't it have been code in a completely different library that instantiated C, and called Q()? So why should R be allowed to throw any exceptions at all that Q doesn't know about? This is what Java's typed, checked exceptions give you - the ability for the interface I to declare what exceptions implementing code is allowed to throw.

      I don't see how you can end up in the situation you described without the method Q having some interest in the behavior of R...

    2. Re:your entire view is wrong by ajagci · · Score: 1

      Odd that you talk about OO programming as involving stacks of method calls... that sounds more like procedural, function-pointer-led thinking than OO, interface-led thinking to me.

      Exception handling does involve stacks of procedure calls. That's precisely why exposing it in an OOL is a bad idea: it forces programmers to encode procedural aspects of their object-oriented designs in exception declarations. Worse, it can't be done correctly in general.

      I don't see how you can end up in the situation you described without the method Q having some interest in the behavior of R...

      Easy. Consider the Comparator class. Let's say the comparison involves operations that can throw an IOException. You will notice that the Comparator methods don't declare any exceptions, and why should they? The "sort" method isn't interested in anything that can go wrong with Comparator. Whether you wrap the exception or not, it just has to get propagated upwards anyway.

      What right does R() have to assume that the code anywhere above it in the callstack comes from the same library? Why can't it have been code in a completely different library that instantiated C, and called Q()?

      Well, in that case, you have a bug. Unfortunately, it's a bug that cannot be avoided by exception declarations. The motivation behind exception declarations is laudable, but they just don't achieve their goals--they only cause people to add a lot more code that, in the end, is no safer than what they started with.

  112. Obfuscation does nothing... by Futurepower(R) · · Score: 1


    Obfuscation does nothing but keep casual viewers out. Sooner or later the code must be executed. A record of the execution can be decompiled, such as with an in-circuit emulator or software CPU emulator. In cases where there is a lot of business logic, such as in an e-commerce web site, it is extremely valuable to see how a successful competitor solved all the tricky, quirky problems of making e-commerce easy for visitors.

  113. How C# Was Made by cfuse · · Score: 2, Funny

    Wasn't it just done by covering one of the holes and blowing down the tube?

  114. 'Ravioli code', eh? by 21mhz · · Score: 1

    Have you ever designed a moderately complex system?
    On the scale of individual classes, yes, I be as OOP-minded as the next guy. But dealing with hundreds of classes requires separating functionally different parts of your program to subsystems, with reduced and well-defined coupling between them. This hasn't changed since the days of procedural programming. Except, with careful use of new tricks like exceptions (pun intended), you can define it better.

    --
    My exception safety is -fno-exceptions.
  115. I don't think so. Here's why. by Deef · · Score: 1
    I can't agree with you on that. I think you have seen code which uses exceptions incorrectly if you have reached this conclusion.

    In your example, the error conditions that may cause method Q to fail should be part of Q's contract. Whether it is implemented in terms of P or not, it still has certain failure modes that may need to be handled differently by its caller. This is part of what you need to know to call that method correctly. Whether or not Q is implemented in terms of P is irrelevant. What matters is that Q's INTERFACE needs to be able to report certain kinds of exceptions.

    Go read the post by aziraphale a couple of ones above this one. He lays it out pretty well. (I'd give him mod points if I could.)

    In general, you shouldn't be propagating implementation-specific exceptions to your callers unless they are guaranteed to be essentially indistinguishable "failure" reports (and thus OK to make unchecked). The only exceptions you should be propagating in a checked fashion are interface-specific ones that explain what is happening in terms of the interface, not in terms of how the interface is implemented. It is perfectly reasonable to make those exceptions checked exceptions.

    If I create a getTheWidget() method, it is quite reasonable to have it throw a WidgetNotAvailableException. I shouldn't be having it throw a FileNotFoundException that the caller is expected to know about and trap (and thus treat differently from other runtime exceptions that might also be thrown). If the widget is truly not available because a file could not be found, and I can't treat this as a fatal the-program-is-over kind of exception, then the right thing to do is throw a WidgetNotAvailableException. (There might be a FileNotFoundException wrapped inside, for use in debugging. JDK 1.4 and up provides a standard way to do this.) That way, the caller does not need to know the specifics of WHY the widget was not available. It only needs to know that this was the case, so it can handle that case differently than, say, WidgetIsDamagedException.

    Unfortunately, I have met relatively few Java programmers who are aware of this design choice in the language, and misuse of exceptions is fairly rampant. I wish Sun would publish more how-to articles on this kind of design issue.

    1. Re:I don't think so. Here's why. by Deef · · Score: 1

      Actually, I was referring to the aziraphale article titled "what did they miss about checked exceptions", not the one immediately above my previous article, which appeared as I was posting it.

    2. Re:I don't think so. Here's why. by ajagci · · Score: 1

      I can't agree with you on that. I think you have seen code which uses exceptions incorrectly if you have reached this conclusion.

      Yes, the fact that a lot of exception handling in Java libraries is broken is one indication that exception declarations are having the opposite effect from what they are intended to achieve.

      In general, you shouldn't be propagating implementation-specific exceptions to your callers unless they are guaranteed to be essentially indistinguishable "failure" reports

      The problem is not with that "in general" statement (one can argue about it, but it's a question of style), it's with trying to enforce it through mandatory exception declarations. Mandatory exception declarations may help with that particular style of exception handling, but they break other, widely-accepted styles of exception handling.

      C++ also has exception declarations. C++ lets you guarantee to a caller that an interface doesn't throw anything you don't expect it to throw, just like you want it to. But C++'s exception declaration system doesn't break other code. Java's designers just got it wrong.

  116. MOD PARENT UP by Deef · · Score: 1

    I agree completely. Well said. Not enough Java programmers (or C++ programmers, for that matter) understand this.

  117. Here's your property generator macro for vs.net by Otis_INF · · Score: 1

    My property macro for VS.NET is located here:
    http://weblogs.asp.net/cnagel/archive/2004/01/21/6 1153.aspx#61172
    I tried to paste it here, but the filters won't let me :)

    --
    Never underestimate the relief of true separation of Religion and State.
  118. Brief Historic Note by j.leidner · · Score: 2, Informative
    "After 13 years with Borland, Hejlsberg joined Microsoft in 1996 [...]"

    If you remember what happened a while ago, the story goes: Microsoft was facing competition from Borland, so they hired away all their lead developers to break the company's neck.

    It almost worked.

    PS: Don't use anything that has a '#' in it and isn't music!

  119. C# sucks by Anonymous Coward · · Score: 0

    C# sucks so bad dude its like VB.

    I love Java and Linux

    1. Re:C# sucks by aztracker1 · · Score: 1

      Obviously from someone who hasn't done much with C#.

      --
      Michael J. Ryan - tracker1.info
  120. Re:Why do big companies want pseudo-compiled langs by Anonymous Coward · · Score: 0

    I have to agree with the parent. IT's Sunday here now, and I spent the better half of Saturday night trying to hack this IBM Host on Demand 4 Java client (5250 emulator, through ssl) to connect to my remote system. couldn't get it to go for a number of reasons:

    1) it's a very old app (our corporate offices won't upgrade) so it highlights the changes in the language over the years that haven't been compatible- so you try old JREs and whatnot to no avail, due to most modern browsers not handling THOSE right

    2) once I finally got it running, it didn't want to connect to an SSL socket- i think it's a deeper error than not just connecting, like it couldn't decode some of its messages that it got FROm the socket.

    Once i saw this, i started using a debug library to get at the HTTPS stream and holy crap this thing is just simple terminal emulation over an arbitrary SSL port.

    five minutes later i've got stunnel fwd'ing it to a local port, and tn5250 connecting to that.

    I freaking hate java.

  121. One sentence that caught me... by netsharc · · Score: 1

    "We have a wiki now on the internal web with the issues list, resolutions for them, and so on."

    So MS does use open source projects! In supporting the development of their own closed source product! Ha! Open Source wins!

    --
    What time is it/will be over there? Check with my iPhone app!
    1. Re:One sentence that caught me... by Anonymous Coward · · Score: 0

      I didn't know there was a battle going on?

      Oh I get it! You believe proprietary software is immoral.

      Been smoking from RMS pipe too long.

    2. Re:One sentence that caught me... by Anonymous Coward · · Score: 0

      Proprietary software is the biggest reason so many of our systems suck. The profession is stagnating because we aren't allowed to learn from each others' work. Imagine what a disaster civil engineering would be if all bridges and buildings were hidden under tarps and could only be used after waiving all warranties of safety.

  122. Language wars are back by tjstork · · Score: 1

    These are sweet days.

    --
    This is my sig.
  123. Re:Why do big companies want pseudo-compiled langs by rnd() · · Score: 1

    The parent is the most wacko conspiracy theory I've read on Slashdot in about 2 years. Please someone, mod it "Funny"...

    --

    Amazing magic tricks

  124. interesting quote by Anonymous Coward · · Score: 1, Insightful
    Moreover, web services run on existing infrastructure that we know scales. Web services that run over HTTP are just machine-to-machine communication over precisely the same infrastructure that we all use daily when we use browsers. And we know perfectly well how to scale that. If there's anything we know about scaling up, that's it. So why not leverage that? That's what web services do. Whereas, we know precious little about how to scale CORBA systems in a geo-scalable fashion. We just don't. There's just no knowledge about it, and I've never heard of anyone being particularly successful doing it.

    I found this particular statement from Anders insightful. Just because he and his peers are not aware of CORBA systems scaling to geo-scale, they assume it can't. Although anders and his co-workers are experts in language design and building compilers, they are obvious detached from the world of application development. The requirements of application development are seldom as clear cut as designing a language.

    Most of the top 20 financial firms use CORBA and other ORB drivers to handle geo-scale applications. I believe anders needs to get out into application development and spend about 10 years in the field. Once he does, he will realize CORBA is there for a reason. The simplistic examples and views of anders definitely provides insight into many of .NET's short coming with handling complex processes. Doing distributed objects is because large institutions have to integrate with numerous systems. Handling that in a transactional manner isn't appropriate in a stateless Webservice or simple SOAP. what you really want is data + behavior. Just the values isn't enough to know what else to do in case a process fails.

    I can't help but feel microsoft and .NET have taken a huge step back in terms of getting into enterprise backend applications. Trying to update data in multiple database isn't easy and never will be. Forcing webservices on these types of applications if foolish and doomed to failure.

  125. Re:Why do big companies want pseudo-compiled langs by that+_evil+_gleek · · Score: 1

    Perhaps the original author should have said / trivially /easy to decompile.
    And thats decompile not disassemble. In other words getting back the C++
    with only withspace changes (indenting) and no comments -- but, actually, it sounds like they lose variable names, etc. I think some old basics and maybe applescript would decompile and give you the same names, ( bigfunc not func10234. )

    Anyway, if they want to steal the logic, then ,yeah, there are C (& C++ )decompilers, but whats the logic going to look like after /optimizing/? Working out that the compiler unrolled an inner loop from the assembler can be SO much fun. And can look less like the original than, say , an interative VS recursive imp.

    If it takes them to do a K-MAP to work out how the other guy did it, then they just did as much work to steal it from the other guy as do it-- or nearly...

    Then again obfuscation /is/ probably doable just ADD in junk to the logic,
    loads of crap look like
    if ( ( VERSION + YEAR ) / 2000.0 2.0 )
    g= JUNKVariable1 * 1000 + ... / etc
    else
    g= REALformula
    REPEAT ADINiFINITUM
    if they'll never get the real names back then that should munge things a bit.

  126. It was never then, it is always now by fm6 · · Score: 1
    Spolsky is a man of idiot enthusiasms. He sees some C# features he likes and decides that .NET is glorious. Then he discovers his old deployment techniques don't work any more and decides that .NET is evil. As we speak, somebody is explaining to him that .NET deployment involves a kind of dynamic linking that's a nice inprovement from the old way, and he'll think .NET is glorious again.

    I wonder if he knows Jerry Pournelle?

    1. Re:It was never then, it is always now by DannyO152 · · Score: 1

      As we speak, somebody is explaining to him that .NET deployment involves a kind of dynamic linking that's a nice inprovement from the old way, and he'll think .NET is glorious again.

      Fair enough. Though perhaps your heading should be "It will be then again." And I suppose the point with Mr. Spolsky is figuring out when it's an idiotic enthusiasm and when it's a brilliant insight, meaning, I guess one should exercise much care before citing him as an endorser or condemner of a platform.

    2. Re:It was never then, it is always now by fm6 · · Score: 1

      Personally, I'd use care before citing Mr. Spolsky on any issue more complex than "What time is it?" But that's just me!

  127. Re:How and Why C# Was Made by Anonymous Coward · · Score: 0

    Windows Forms was originally WFC (Java AFC extensions). Get it! All .NET is the Windows-specific java work that Microsoft was working on that Sun sued them over! When they got sued they just named it C# instead of Java!

    That's how it started, but not how it finished. .NET is far more than Windows specific Java work now and to discount it as such demonstrates a clear lack of understanding.

    I'm guessing that you don't work for Microsoft anymore right?

  128. Re:How and Why C# Was Made by Anonymous Coward · · Score: 0

    You're being intellectually disingeuous, and engaging in doublethink.

  129. Arguing Makes Me Cry by cuebol · · Score: 1

    After hearing the same freaking 'X is better than Y' argument over and over I have to comment on how pointless it really is. Each language has its own strengths and weaknesses. While lower level languages such as assembly are great for system programming, could you imagine writing complex user applications in pure asm? *shivers*. Perhaps we should quit arguing over which language is better and master the language we choose to develop in. Just my opinion.

  130. Re:I'm sorry by pmorrison · · Score: 2, Interesting

    There are people besides Gates who might disagree with your opinion of goto. Read what Steve McConell has to say in his -balanced- portrait of goto: http://www.stevemcconnell.com/ccgoto.htm

    Notice that one of goto's defenders (for appropriate circumstances) is none other than Don Knuth.

    I generally avoid goto like the plauge... but sometimes it's the right tool for the job.

  131. Cross-platform GUI? by fille · · Score: 1

    Since a lot of projects need a GUI, how does c# performs on this? Since windows.form is missing from Mono, C# seems pretty useless in this respect. Of course, GTK# exists but then you'll have to rewrite your app anyway.. Java seems a better platform for cross-platform GUI stuff to me. Or are there alternative toolkits available??

  132. Re:Why do big companies want pseudo-compiled langs by master_p · · Score: 1

    May be you mean that a cast in cast is slower that a cast in C??

    Of course it is.

    Don't let reality disturb you

    You are ignorant of how casts work in Java. That's a problem with most people that haven't worked with C++ dynamic casts. It's ok though, since the new bunch of languages target audience is just like you.

    I can't. I also can't imagine a Java program full of casts. Most I have seen or written have only a few casts

    How come you didn't use collections then ? What kind of application does not use collections ? only the type of applications that contain forms and widgets connected to databases. But from the moment your application contains a data model, there are collections in there, which means lots of casts.

    A programmer could be productive in any language

    I said exactly that. : I don't think languages play any role

    Not always.

    Reduntant comment. Nothing someone says is the absolute truth.

    Some C++ programmer have their C++ hats down to the waist

    Well, most programmers that have gone through the pain of going deep into programming languages and C++ (and they are not simple users of the language, because their company said so), have good knowledge of the deficiencies of the language. But they also know ways to solve the problems, using tools the language provides. Which is not the case with any other language.

    My colleagues are always asking me how do I manage to write C++ apps without memory leaks. They don't understand it, but, even if they know C++, they have never really got into the language. They deal with it superficially. But there are some really simple rules to follow:

    Anything that can be on the stack must be on the stack. For example, there is no point allocating Point classes, since they are only gonna be used for assignment.

    Heap-allocated objects that are referenced by more than one position are reference counted. There are plenty of smart pointer classes around, and it is really easy to construct one, if there is none available.

    Heap-allocated objects most certainly have an 'owner', which deletes them when no longer needed.

    By using stack-allocated objects, RAII is possible. I don't have to explicitely close a file...I simply declare it somewhere, and it closes itself upon the function returning. This is very important, yet overlooked.

    By example take STL, which many believe is an end in itself when it should be a means

    Do you know any other language that the 'sort' algorithm is defined once and it is valid for all types of collections, and the algorithm does not go through a virtual interface ? there is none, except C++. If this does not tell you something, then nothing will.

    About that article at the link you posted:

    the overhead of Java compared to C is probably about the same magnitude as that of C relative to Fortran

    It is just fud. There are numeric libraries around, like blitz++ which is just as fast as fortran for all known cases. I haven't seen any Java app that confirms this for C.

    There are arguments that Java may overtake C shortly; in fact this is already happening on Linux (with respect to gcc)

    Instead of replying to the abolve, the article gives the answer itself:

    Intel they found that the Java performance was very reasonable compared to C (e.g, 20% slower)

    Java was faster than at least one C compiler (KAI compiler on Linux)

    the performance gap is small enough to be of little or no concern to programmers

    Even if I was telling jokes, I wouldn't put out the above really lame arguments. 20% not being slow enough ? a fluid dynamics simulation which takes 5 working days to complete in C/Fortran, it will take 6 days with Java!!! repeat the above test N times, and you have N days of delay...and the 20% is

  133. Advice on the structure of the GCJ binary? by Futurepower(R) · · Score: 1


    Glock27, thanks for your reply. Of course I know that people generally think of server code as safe. But all it takes is for one of thousands of Amazon employees to provide a copy or a back door from one of maybe hundreds of servers, and the security is compromised. We spend a lot of time thinking about security, and it is easy to lose sight of the fact that "social engineering" is simple in many cases. Remember that the code for doing analysis of nuclear explosions from Los Alamos was available freely on the Internet for years, even though Los Alamos was supposedly secure, and the secrets were extremely valuable.

    Also, there are many examples of cases where the code is available in byte code format. Commercial products provide everything, of course.

    You are right, I don't know enough about GCJ. This is the issue: How is the binary formatted? Does GCJ bind the entire run-time library routines into the binary as one contiguous code block? Or, does GCJ sort through the library and build the library routines into the binary interspersed with the code? The first case provides a binary that is easy to de-compile. The second is far more secure, but still provides a machine method of de-compilation.

    The problem is with the way that calls to the library are formatted in languages originally meant to be interpreted. It is easy to look for the structure of the calls, and once found, it is especially easy to see what the calls are doing. Those who don't do disassembly or de-compilation may not realize how easy it is.

    In many programs, having the list of calls and their parameters would still not be valuable, because it is difficult to understand how the programmer has structured the program. However, most people don't realize that many of the most valuable programs merely contain business rules. These are VERY complex for a programmer to discover on his own, and very easy to copy.

    Do you know enough about the structure of the GCJ binary to provide some advice on this matter?

  134. Re:Why do big companies want pseudo-compiled langs by aled · · Score: 1

    which means lots of casts.

    What I mean is that I doubt very much that casts is the only or principal problem in Java performance.

    My colleagues are always asking me how do I manage to write C++ apps without memory leaks. They don't understand it, but, even if they know C++, they have never really got into the language.

    That's one important drawback on C++, very few really understand it.

    There are numeric libraries around, like blitz++ which is just as fast as fortran for all known cases.

    I have read in /. from Fortran programmers that C/C++ couldn't do a lot of useful optimizations than Fortran can do.
    I have never claimed Java is good on numerical intensive applications, like the fluid simulation you point. But it may getting a little nearer.
    The Osnew benchmark isn't a good one, except that it shows problems with Java implementation of trig functions. Those problems could be easily corrected by Sun if they even care.

    In any case I think that we need more recent and well designed benchmarks, rather than theories on how it should be faster/slower than don't show in practice.

    --

    "I think this line is mostly filler"
  135. Re:Why do big companies want pseudo-compiled langs by Anonymous Coward · · Score: 0
    Do you know any other language that the 'sort' algorithm is defined once and it is valid for all types of collections, and the algorithm does not go through a virtual interface ?

    Generics in Ada could do this even before C++. I think Eiffel, Haskell, and ML can too.

    Java pointers use double indirection.

    I doubt this; copying collectors that move objects without double indirection have been well understood for years. Just store a pointer to the object's new address at its old address after it's been moved, and update other pointers to the object as they're scanned.

    The most usual case though is to allocate and object and store a reference to it to be used later.

    Depends on your design style. People working on generational collectors have observed that most peer objects have about the same lifetime, and it's quite rare for old objects to contain pointers to new objects. And note that free() overhead is proportional to the number of dead objects, while GC overhead is proportional to the number of live objects, so each is faster in different circumstances.

  136. Re:Why do big companies want pseudo-compiled langs by Anonymous Coward · · Score: 0

    I would believe you, except for the fact that companies are often hotbeds of compressed evil ;-)

  137. Re:Why do big companies want pseudo-compiled langs by master_p · · Score: 0

    Generics in Ada could do this even before C++. I think Eiffel, Haskell, and ML can too

    Ada generics is specification of Ada95, not Ada83...at around 1996, C++'s templates were almost stable.

    Haskell and ML are interpreted languages. They never got out of the academic environment. They have certain advantages, but their interpreted nature and their difficulty to develop reusable libraries have been a major drawback. In the ML I've used, all interesting libraries were coded in C, and used by ML.

    Eiffel is a fine programming language. I don't know why it hasn't caught on. Eiffel engineers don't know either (and this is a famous joke amongst them).

    Just store a pointer to the object's new address at its old address after it's been moved, and update other pointers to the object as they're scanned

    Sun's documentation:

    Java 2 SDK for Solaris exact garbage collection uses direct pointers for objects, rather than handles. Using direct pointers decrease memory consumption, speed allocation, and increase system performance by eliminating one level of indirection in accessing objects

    Here is another link about Java using double indirection:http://h18012.www1.hp.com/java/perform ance/FastVM.html

    There is certainly double indirection in there, as it is evident from the above links. And although Java code itself may not use double indirection, native calls do. That means that everytime the JVM calls some native method (most probably coded in C), it passes a handle to the object, not a C pointer.

    Depends on your design style

    No, it does not. Even value classes like Integer that are to used as keys as maps and hashtables are like that. And each time you want to do a lookup in a map/hashtable, you need to create a new object. What a waste of resources!!! Java 1.5 with generics will solve this, of course.

  138. Re:Why do big companies want pseudo-compiled langs by master_p · · Score: 1

    What I mean is that I doubt very much that casts is the only or principal problem in Java performance

    You didn't say that. You explicitely said that you have never seen a java app with lots of casts. Don't try to change what you've said.

    Of course there are other problems in Java. The lack of RAII is a good example.

    That's one important drawback on C++, very few really understand it

    And why is it a drawback ? if I write apps without memory leaks, everyone can. I am a fairly average person. And manual memory management gives better performance to those who need it. For example, one of the apps I participated in was an environment emulator for a weapon system that included lots of binary data exchanged between the weapon system and the radar consoles/processing units. I wrote it in such a way that memory was recycled efficiently. I couldn't done it with Java.

    I have read in /. from Fortran programmers that C/C++ couldn't do a lot of useful optimizations than Fortran can do.

    Fortran uses static tables. If you use static tables in C, without pointer aliases, the result is exactly the same.

    I have never claimed Java is good on numerical intensive applications

    But the article you posted did. In fact, Java is good in numerical computation, because, in the end, there are not many different ways to add/subtract/multiply/divide numbers. Java sucks in other things, like collections, for example.

    Eventually, Java will be equal to C++. Two programs that compile exactly to the same native code and use exactly the same algorithms will have the same speed. And, for whatever trick Java may throw in, C++ can throw another one: there are very good garbage collectors for C++, as there are for Java.

  139. Re:Why do big companies want pseudo-compiled langs by aled · · Score: 1

    You didn't say that. You explicitely said that you have never seen a java app with lots of casts. Don't try to change what you've said.

    What I did say was "can't imagine a Java program full of casts" meaning casts on every line or near that. If I wasn't clear I apologize but I'm not changing things here.
    About RAII, yes it's not applicable to Java or other GC languages. But if you can write a C++ program without memory leaks you will have no problem closing every resource :-) Seriously, this may require a redesign depending of how resources are managed.

    And why is it a drawback?

    Because if there are less people trained to do a thing you have to search harder/pay more/train more before things get done. OTOH Java have this problem also, just there is a difference in the class of knowledge usually found on each language.
    On your example I agree with you on that there are apps that are better (or easier, or even could only be) implemented in the other language (be Java, C++ or basic). I'm just not ruling out that someone else could make an implementation that works good enough to satisfy the requirements in language X (where X could be Java).

    fortran
    I'm not a Fortran programmer, if you say so, let it be.

    Java is good in numerical computation
    I don't understand what is your point here. You first seemed to support the idea that Java was to slow to do this, now the opossite. Or where just mentioning the article? I'm a little lost here.

    Eventually, Java will be equal to C++
    I think that Java will always be slower (even a little) than C++. But I remember when most programs were made in assembler and C was the slow new language. C winned in the because it was easier (that subjetive concept) to write programs in, rather that because of it's speed.

    there are very good garbage collectors for C++
    While automatic GC is possible in C++ I don't found the concept appealing. C++ just wasn't designed for this.

    --

    "I think this line is mostly filler"
  140. Re:Why do big companies want pseudo-compiled langs by master_p · · Score: 1

    can't imagine a Java program full of casts

    If you can't imagine it, you haven't seen it, either.

    If you haven't seen a Java app with lots of casts, it means the app didn't use collections. Which means it was a trivial app.

    it's not applicable to Java or other GC languages

    D can do it.

    But if you can write a C++ program without memory leaks you will have no problem closing every resource

    I don't have to close anything. RAII takes care of that.

    Because if there are less people trained to do a thing you have to search harder/pay more/train more before things get done

    But if people aren't trained, how are they gonna learn ? it's a chicken and egg problem.

    I don't understand what is your point here. You first seemed to support the idea that Java was to slow to do this, now the opossite. Or where just mentioning the article? I'm a little lost here

    I never said that Java is slow in numerical computations. I said that the article(s) you posted had flaws in it(them)...these "flaws" are deliberate, in my opinion, from people that never gave a dime understanding C++ and how they can be productive with it. For example, they did not compare the top Java version 1.4.2 against a top C++ compiler such as the Intel one. It's unfair, it's biased.

    I also said that Java is generally slower than C++, mostly because of the way collections/iterators work, no value objects and because of the GC.

    I think that Java will always be slower (even a little) than C++.

    Well, the difference will be so small, as to be negligible. Eventually, the language and the JVM will improve so much as to reach the state of a statically compiled language.

    But I remember when most programs were made in assembler and C was the slow new language. C winned in the because it was easier (that subjetive concept) to write programs in, rather that because of it's speed.

    Nope. The jump from assembly to C gave you a 10x boost in productivity, while the jump from C++ to Java gives you 0.1x boost. In reality, it gives you nothing, if the libraries you use are well written(Qt for example).

    Have you worked with Qt ? it is the best library ever written. Don't let others fool you: it gives you the full power of C++ and Java!!! you don't even have to manage memory. It has a wonderful signals and slots mechanism, and plenty of classes for everything. And a program you write under Windows runs as-is in Linux/Mac/Solaris/Unix. No, I don't work for Trolltech, but I am so much impressed with it, I can't stop talking about it. Something made in Java is usually done faster and better in Qt.

    Of course, Java has its own good points. But its not all that is cranked up to be. For example, you may have not to delete things, but you sure have to make pointers null. IF you don't, memory is not released. I have seen this numerous times, and it is the Java memory leak problem (leak, in the sense that it is never freed).

  141. Re:Why do big companies want pseudo-compiled langs by aled · · Score: 1

    The jump from assembly to C gave you a 10x boost in productivity, while the jump from C++ to Java gives you 0.1x boost. In reality, it gives you nothing, if the libraries you use are well written(Qt for example). Have you worked with Qt ? it is the best library ever written

    I differe here, because I think library support is one of Java strengths, and one in which I find a boost in productivity.

    I haven't used Qt, so I checked in teh feature list and it seems impresive, covering DB, XML, networking and graphics. I just would like to point that is not part of the standard, and I understand that you have to pay a licence for commercial closed source apps. I just mentioned it because other people think is free, not because I'm against it.
    Java has an even more functionality in is standard libs.

    Java makes it very very easy to reuse third party, and there are lots of excelent ones, like those from Jakarta. Because the base types are standard, portable ABI and no need to recompile your program (no #include nonsense) you can just use without adapting or recompiling as many C/C++ libs. You don't have problems linking libs compiled from different compilers or platforms (for example: linking in C/C++ from two different compilers won't work because of different runtime libs, or C++ name decoring). So you have a lot of functionality in libs that can be reused as is that helps productivity a lot.

    --

    "I think this line is mostly filler"
  142. Re:Why do big companies want pseudo-compiled langs by master_p · · Score: 1

    I differe here, because I think library support is one of Java strengths, and one in which I find a boost in productivity

    I just would like to point that is not part of the standard

    Don't confuse the language with libraries. When we talk about the language, we mean the syntax, the semantic rules, etc.

    I understand that you have to pay a licence for commercial closed source apps

    It has nothing to do with the language though. Trolltech is a small company, they are not Sun. They have to earn something for their outstanding work.

    If you personally can't afford to buy the toolkit, then you are not making something for commercial use, are you ? in that case, you can use the open source Qt licence. if, on the other hand, you have a company and want to make a commercial product, it pays to buy the Qt library. It's not that expensive.

    But price has nothing to do with productivity. It's another issue alltogether.

    Because the base types are standard, portable ABI and no need to recompile your program (no #include nonsense)

    Java is a compiled language. You have to compile it before the program runs. There is even a javac tool which produces the bytecode output. It's the bytecode that it is dynamically translated, not Java itself.

    Why is include nonsense ? it may slow down compilation, but only for those compilers that don't support pre-compiled headers. If you use pre-compiled headers, #include = import.

    you can just use without adapting or recompiling as many C/C++ libs

    You recompile once, for your machine. After that, you don't recompile anything any more. You may consider the compilation as an installation step. After all, C++ is a statically compiled language. Compiling for a specific CPU gives you the advantage of using optimizations specific for that CPU.

    You don't have problems linking libs compiled from different compilers or platforms (for example: linking in C/C++ from two different compilers won't work because of different runtime libs, or C++ name decoring).

    But the C++ standard does not define an ABI. And it's actually right not to!!! Imagine having to use binary libraries compiled on a 486 and used in a shiny new P4!!! all those optimizations will be gone! C++ is about source code compatibility between platforms.

    I am not saying that Java is flawed in the compilation area. It isn't. But C++ is not flawed either. They are different because they were born out of different needs. C++ was born static, because, at the time that it was born, dynamic recompilation was impossible. But it does not hurt development of stand-alone applications.

  143. Re:How and Why C# Was Made by Anonymous Coward · · Score: 0

    You're making disingenuous accusations to discount a valid argument.

  144. Re:Why do big companies want pseudo-compiled langs by Anonymous Coward · · Score: 0

    Ada 83 did have generics. Dispatch was always static until Ada 95 added tagged types.

    Every current JVM design I'm aware of uses direct pointers to access objects, only storing an object's "forwarding address" while the GC is running (so that all direct pointers to an object can be updated). Certainly it's possible to move objects without using handles. JNI's extra layer of indirection isn't there to enable moving objects, but to prevent native code from knowing anything about how this JVM implements objects, and it doesn't affect GC performance at all (as part of the JVM, the GC code doesn't have to limit itself to using JNI to access fields).

    Using hashmaps is a design choice, and this only raises locality issues if a map and its keys and values don't have the same lifetime.