Slashdot Mirror


Microsoft Releases C# Language Reference

Snoop Baron writes: "Microsoft has released information about C# on their Visual Studio homepage; the article includes an early version of their C# Language Reference. After having browsed the C# Language Reference PDF I believe they have made some mistakes that Java thankfully avoids. What do you think?"

158 of 623 comments (clear)

  1. Re:C# is not ActiveX by Anonymous Coward · · Score: 2

    Pretty close.

    DDE and OLE 1.0 begat OLE2.0

    VBXs were separate, based loosely on the Dialog Editor API, but enhanced to support events (it funneled everything through a specific, fixed memory address making a 32bit version a problem).

    OLE 2.0 begat OCXs (around '94/'95), both 16-bit and 32-bit versions. This was intended to replace OCXs. VB4 was the craptacular result (arguable the worst product ever released by MS... thankfully all the programmers on that project were neutered and buried alive underneath a new building on the redmond campus).

    OLE 2.0 begat ActiveX (to 'netify the damn things... basically a marketing strategy for OLE interface based technology).

    C# is an attempt to simplify OLE. It is another buy-in technology where choosing to use it will make you like alot easier if you use w2k and greater products. This isn't a general purpose portable language like Java, so the comparisons in the broadest sense are meaningless. Syntax comparisons, however, are always useful.

  2. Type safety, "unsafe" ops, overload,versioning,... by Anonymous Coward · · Score: 2

    From my read, C# has the following features not found in Java:

    Default type safety for writing secure code with explicit "unsafe" operations for unchecked casts, direct access to system memory and memory layout.

    Operator overloading with a more restricted model than C++, which seems designed to create predictable composition of operators.

    Versioning where overridden functions must be explicitly called out.

    Support for non-class structures that allow "auto" allocation and explicit memory layout for interfacing with system functions. Structs have automatic boxing into object that allows them to be used polymorphically as well. These seem to be used to represent intrinsics (ints, floats, etc.)

    Scoped pinning of GC'ed objects to be used with external APIs.

    Checked enums

    Properties as first class elements

    Events as first class elements

    Attributes associated with class members

    Conditional compilation (the preprocessor seems used only for this function based on #defines and nothing else)

    Looks pretty good to me as languages go.

  3. Re:C# by Phroggy · · Score: 2
    There are only seven sharps in the key signature; either you miscounted or you're including the octave (and in either case, you're wrong). Plus, since it's Microsoft, it would probably be c#-minor anyway, which only has four sharps, which isn't bad at all, unless.... Wait, I bet you're a wind player, aren't you? Bah!

    --

    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  4. Re:First Mistake: Dumbass name by Phroggy · · Score: 2
    From Webster's:

    Main Entry: enharmonic
    Pronunciation: "en-(")här-'mä-nik
    Function: adjective
    Etymology: French enharmonique, from Middle French, of a scale employing quarter tones, from Greek enarmonios, from en in + harmonia harmony, scale
    Date: 1794
    : of, relating to, or being notes that are written differently (as A flat and G sharp) but sound the same in the tempered scale
    - enharmonically /-ni-k(&-)lE/ adverb

    --

    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  5. Re:C What? by Phroggy · · Score: 2
    Well, I haven't yet had time to read the C# info -- since it's nicely enclosed in a Windows executable, making it useless for we Mac folks.

    StuffIt Expander is your friend.

    --

    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  6. Unsafe Java - Microsoft innovates again! by smartin · · Score: 2

    This kills me, it looks like M$ has basically started with a copy of Java, changed a bunch of keywords (eg. using vs import) and added a bunch of hacks and corruption to allow developers to write buggy code, just like they are used to doing with C++ on win32.

    This thing is going to go the way of Bob.

    --
    The difference between Canada and the USA is that in Canada healthcare is a right and gun ownership is a privilege.
  7. My tuppence by Malc · · Score: 2

    "I believe they have made some mistakes that Java thankfully avoids"

    What, they fixed the string class?!

    At least they've fixed the stupid Java "feature" where int, bool[ean], etc are now derived from Object.

    So, everything is COM. Does that mean when I new an object it calls CoCreateInstance()? - the first time for most components will see a huge pause and thrashing hard drive as multiple DLLs are loaded?

    I'm so glad they kept goto and labels.

    Better control over locking than in Java - I hate the way they do synchronised methods. I much prefer the control of placing mutex locks and unlocks where I want them - I can get it more fine grained, and it's much more obvious what I'm doing (and more consistent with what experienced programmers are used to seeing).

    More (cluttering modifiers and data members): Class members can include constants, fields, methods, properties, indexers, events, operators, constructors, destructors, and nested type declarations and public, protected, internal, protected internal, private

    They kept operator overloading :(

    I couldn't find mention of a preprocessor.

    No easy mechanism for doing inout parameters.

    Not much talk of class libraries - where's the string tokenizer?

    I guess they didn't want to try and simplify things like the Java designers. Microsoft has always had more emphasis on implementation than design: look at COM vs CORBA.

    1. Re:My tuppence by scrytch · · Score: 2

      Better control over locking than in Java - I hate the way they do synchronised methods. I much prefer the control of placing mutex locks and unlocks where I want them - I can get it more fine grained, and it's much more obvious what I'm doing (and more consistent with what experienced programmers are used to seeing).

      You can do exactly this by creating a Mutex object (you can even pass it around on the stack and create it anonymously) and then using a synchronized block. I suggest getting a copy of Java Threads, by ORA.

      And comparing COM v. CORBA is the most mismatched comparison I've ever seen. Try DCOM, which is just as much a monstrosity.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
  8. Don't forget their -1th iteration.. Multi* by jonabbey · · Score: 2

    People forget that in the early eighties, back when Microsoft developed software for dozens of different platforms and operating systems, Microsoft did all of their application software on top of a VM-like infrastructure.

    Remember Multiplan, Multiwrite, Multifile, etc.? They were written in something resembling p-code, and they had them on Apple II, Apple III, CP/M, TRS-80, C64, Atari, and oh yes, the IBM PC. They did pretty well for Microsoft until Lotus 1-2-3 came along and stomped everything due to its being written in extremely optimized Intel assembler.

    Everything old is new again.

  9. Re:Hello, Word in C# by caolan · · Score: 2
    Hell what do you need word for, I ran it through wvHtml to get this

    C.

    --
    I sometimes write stuff
  10. MS and offensive patents by acb · · Score: 2

    Microsoft have used patents offensively. They patented the ASF media file format, and used said patent to remove support from an open-source video editing utility a while ago. The details escape me, but it was mentioned on the Net.

    And then there's the Halloween document, advocating the use of patents as a defense against open source. And their tricks with non-disclosure agreements in self-extracting documents (i.e. the Kerberos spec) to lock out open-source developers are right in the spirit of such things.

    Microsoft's business model depends on controlling crucial parts of the platform; that's why they dominate not only the OS market but the word processor/spreadsheet market, the Windows C compiler market and the web browser market. If control of C# is important to them, they will do everything in their power to maintain it.

  11. Non-disclosure? by acb · · Score: 2

    Does the EXE file contain a click-through nondisclosure agreement of the sort the Kerberos spec included? Perhaps it's to keep C# proprietary and prevent those pesky penguinheads from hacking up a cross-platform implementation.

  12. "using System" is better than "#include " by Tumbleweed · · Score: 2

    > I'd like for them to explain how "using System;"
    > is better than "#include ".

    Simple - it's easier to type. :)

    Isn't that the ultimate measure of a language's true worth and ability?

  13. Re:Not Hardly. by Bruce+Perens · · Score: 2
    It only made it to GCC after Stepstone made it clear that it wasn't interested in helping NeXT extend the language. So, NeXT did an end-run around Stepstone. That was much too late to help Objective-C succeed as a language.

    Bruce

  14. Re:pointers by Keith+Russell · · Score: 2

    C# forces you to encapsulate any pointer-manipulative code in a function explicitly declared with the unsafe keyword. I'm not sure about exactly how it works (damn firewall cached 27K of the lang. ref., then died), but I certainly hope that unsafe functions must be, or are implicitly, private. From there, it's just a matter of the compiler and/or runtime enforcing safety, just like Java.

    Every day we're standing in a wind tunnel
    Facing down the future coming fast
    - Rush

    --
    This sig intentionally left blank.
  15. Re:Eliminates costly programming errors ... by Keith+Russell · · Score: 2

    The docs appear to be rather vague on this point. According to the "Variables and Parameters" section of the Introduction doc, the following code will not work, because x has no value:

    int x;
    int y = 42;
    int z = x + y;

    This is the desired behaviour, for you, me, and everybody. The statement that variables are automatically initialized directly contradicts this.

    Maybe the "environment" will initialize at run-time, for languages that expect something other than garbage, while the C# language will enforce the assignment-before-use rule upon compilation.

    Every day we're standing in a wind tunnel
    Facing down the future coming fast
    - Rush

    --
    This sig intentionally left blank.
  16. The Visual Basic Guy's view by Keith+Russell · · Score: 2
    The good:
    • Better intrinsic types: C# has unsigned types, 64-bit integers, and a decimal type that doesn't appear to be a glorified Variant.
    • Everything is an object: 'nuff said.
    • Un/Boxing: Next best thing to parameterized types, I guess.
    • unsafe: Pointers in VB are as close as one can come to a nervous breakdown in code.
    • Single-block property functions: Much better than separate blocks for Property Let and Property Get.
    • Indexers: A nice break from VB's rigid object.method() syntax.
    • interface: VB's use of Class Modules to do the same thing is a hideous kludge. An explicit interface declaration has been sorely needed in VB for some time.
    • Inheritance: Sure, it's only single inheritance, but you can inherit and implement at the same time, so it's a little more flexible.
    • Versioning: VB's other nervous breakdown generator.
    • Reflection: A huge hole in VB.
    The bad:
    • Oddball .WriteLine syntax: What's wrong with %s? Will {0} be formatable?
    • 3.ToString(): I kid you not. Since literals are instances of objects, you can call methods on them. How illegible will code end up being with this in the hands of bad coders?
    • unsafe: How bad will Microsoft botch the implementation of this?
    • Event handlers: A bit of culture shock compared to VB's simple event syntax. Looks like it should be more powerful in the long run.
    • struct: Looks like worthless syntax sugar. They even admit they're less-than-optimal.
    • Same damn "cast" syntax for interfaces: Dim bar As CBar: Dim foo As IFoo: Set foo = bar. What's wrong with (IFoo)bar?
    • No parameterized types or templates.
    • No threads (apparently).
    • Visual Basic 7: Enough new features are coming in VB7 to make much of this academic.
    If Microsoft allows C# to be used interchangebly with VB behind forms, this might just be compelling enough to succeed. Of course, if Microsoft fscks up the "standard" to their advantage, it's doomed to fail. My, what interesting times we live in.

    Every day we're standing in a wind tunnel
    Facing down the future coming fast
    - Rush
    --
    This sig intentionally left blank.
  17. Re:biggfest mistake by Sesse · · Score: 2

    I disagree -- part of what makes Java cool, is the absolute cleanness (yes, I think it's clean, other people might not). The quite uncluttered syntax makes it very easy to write syntactically correct code (C++ can sometimes be a PAIN here), and the inherent OO capabilities in the API encourages the programmer to use OO him-/herself, with all the benefits that means.

    But of course, what programming language(s) you like, is (like many other things) a very personal matter, and I won't try to force Java on anybody, since it's definitely got its disadvantages too. I don't even program it anymore, mostly because I'm just getting _too_ used to plain C now, and simply because C is the norm on Linux/Unix platforms nowadays.

    /* Steinar */

    --
    (This comment is of course GPLed.)
  18. Re:They said it's not a Java copy, anyone believe by acroyear · · Score: 2
    It's platform neutral. C# has been sent to the ECMA too - so where's the vendor lock-in?

    huh?

    Lock-in 1: Every object is a COM object. To get that "feature" of the language, you have to use it on a platform that supports COM. Right now, there are 2 : Windows and Mac. And the Mac only has it because MS built COM for it in order to keep vendor lock-in with Office and I.E..

    Lock-in 2: Who else is gonna build a C# compiler? Why would they?

    Borland? They've got Delphi as their OO alternative. IBM? Oracle? None of the big names have any reason to get in bed with Microsoft anymore. Name one company that stands anything to gain by building a competing C# compiler with Microsoft?

    MS is trying the "standards body" merely to have some form of official support for the form of the language so 3rd party vendors might feel some incentive to build libraries...but they don't need to since COM support is built in -- existing COM objects already provide a vast set of libraries.

    If there isn't an alternative, then standards-bodies be damned, its a "de facto standard" and we have vendor lock-in.

    --
    "But remember, most lynch mobs aren't this nice." (H.Simpson)
    -- Joe
  19. Re:They said it's not a Java copy, anyone believe by acroyear · · Score: 2

    So far, I've seen no arguments that C# advances the state of the art.

    More importantly, I've seen no arguments that C# exists to solve programmers' or customers' problems that can't be solved easily in another language. Languages don't really survive because of "state of the art". They survive because they answer a programmers need that is difficult (or impossible) in an existing language.

    For really kick ass fast (but mostly portable) structured code: ANSI C.

    For really kick ass fast Object-Oriented or Generic-Programming (mostly portable, but watch out for the non-standard libraries you use) code that also allows you C-level access to legacy and O/S libraries: ISO C++.

    For moderately fast Object-Oriented code that runs unchanged on a number of platforms, with powerful libraries supporting web access, database access, and graphical user interfaces, and a whole lot more, provided a binary interpretor exists on the target platform: Java.

    For pure OO: Smalltalk.

    For mostly-pure OO with a decent design-by-contract model: Eiffel.

    For stuff working really quickly in text or web processing: Perl.

    For programming in a "safe" environment where the compiler will pretty much catch 95% of your errors for you (even things that wouldn't even snag a warning in all-warnings-on C++): Ada.

    For getting stuff working really quickly in the Windows environment: Visual Basic.

    What's missing that another language needs to fill? If you find something, go invent a language or language library to do it. Until then (HINT Microsloth) leave us programmers to using tools that get the job done.

    --
    "But remember, most lynch mobs aren't this nice." (H.Simpson)
    -- Joe
  20. Re:They said it's not a Java copy, anyone believe by acroyear · · Score: 2
    Taking the metaphor slightly more seriously than possibly intended:

    "Just gimme the damn plant, I'll roast the beans myself, thank you very much!"

    When I have to read someone elses code (and I do constantly, for purposes of debugging, integration, and future maintainance 'cause that programmer's no longer with the department or company), I need to be able to see what the hell's going on. In order for this to work, the language can not be vague in its definition of what's going on.

    C++ allowing overloading of the () operator was already crossing the line as far as I was concerned (though the STL justified it beyond my wildest expectations and I now adore it when used in that manner -- see "Renumerations on C++" by Koenig & Moo.

    That summary description of C# basically gave me a list of things that might be nice, but when put into practice can lead to code that is unclear as to what's going on "behind the scenes". Does a "set" method do more than just "set" the field to the given value? There (taking Java as an example), I need to look up the set method. If the C# convenience was used, I'd have to look up to see if there was even a set method in the first place...THEN (if i found it anywhere in the possibly rediculously large hierarchy), I'd have to examine it to see what it does.

    But just looking at it on the surface, I wouldn't know it even was calling a function.

    At least with operator overloading of [], I'd know by the variable type that I had an object implemented by a class, and not an array, and would know that a function was being called.

    Syntactical sugar is unnecessary. To see the effects when a language gets overloaded with it, check out Perl. I've looked at it for 10 years, and I STILL can't make sense out of 3/4ths of the programs out there written in it.

    Do that to a C based language? No, thank you.

    I'd rather just get the job done.

    --
    "But remember, most lynch mobs aren't this nice." (H.Simpson)
    -- Joe
  21. Re:Syntactical Sugar ... Riiiight by acroyear · · Score: 2
    And my argument is that unless designed right and all the developers agree on how the "syntax sweeteners" are to be used, "quick coding and limited debugging" can become maintainance nightmare.

    It all depends on how long you expect your code to still be used. If you expect the people who take it over to eventually ditch the whole thing and rewrite it (something happening more often than not, these days...), then fine, use what you want.

    If you expect your stuff to continue to be used and debugged, especially by others, then be choose how you use your sugars wisely. AND DOCUMENT.

    Me personally, I found few of those sweeteners to be anything that would really get me to write more efficient, more readable, or more robust code. Quite the opposite, in fact.

    --
    "But remember, most lynch mobs aren't this nice." (H.Simpson)
    -- Joe
  22. MS Language design?!? by LinuxGeek · · Score: 2

    After suffering through the old MS Dos C & QuickC implementations, business basic, quickbasic and MFC 1.0 quirks and bugs, I shudder to think what they will produce as an entire language that they control and extend. To get C# accepted, all they have to do is incorporate it into windows and write a bit of the UI and network services with the new language and voila! Instant substandard standard. They will do with programming tools what they have been doing with office applications.

    And how long will non-MS platforms have to wait for an implementation after it gets popular in the 'VisualBasic is a real tool" community? Probably a long, long time.

    --

    Kindness is the language which the deaf can hear and the blind can see. - Mark Twain
  23. Re:As usual, the signal to noise ratio is pretty l by SimonK · · Score: 2

    The post above has some interesting points, but the list of new features does not match what I read in the lnaguage reference:

    - Pass by reference is not explicit. Its the way all instances of classes are passed. Structs and other value types are passed by value. This the main difference between struct and class.

    - It seems to initialise variables to default values, like Java.

    - Primitive types (and other value types) are kind-of-objects. They are included in the class heierarchy and can be assigned to variables of type object, but this is done using a 'boxing' conversion, which changes the representation, and is not invisible to the developer (as it is in Smalltalk). I don't know whether they have their own class hierarchy - which would make the feature more useful.

  24. Re:ok, Good & Bad "features" by SimonK · · Score: 2

    I'm not exactly sure how it works, but MS seem to have added two new statements (over Java) to allow the use of pointers. Methods can be declared unsafe, which propogates through the program, and declares that they may contain code that has pointer errors.

    You can also declare pointers within a fixed block. The syntax and semantics for this are not properly defined anywhere, but it seems that it causes the objects pointed to to be fixed in memory so they cannot be moved by the GC. Quite what happens if you move the pointer to another object, I don't know. The simple and stupid implementation would be to have all objects referenced from a fixed block frozen regardless.

  25. Re:ok, Good & Bad "features" by SimonK · · Score: 2

    ILOVEYOU is run automatically just by selectinh the message if you have a particular set of outlook settings - something to do with the . Otherwise it requires the user to run it.

  26. Re:Impressions from a Java Programmer by SimonK · · Score: 2

    I'm not convinced about making properties and "indexers" part of language, especially the latter since iterators seem more elegant to me than bare integer indices. The main problem in general is the same as that with operator overloading - you cannot tell by reading the source for the client application whether you're calling user code or getting the default behaviour. Bad programmers may introduce complexity by creating indexers etc with side effects. Foreach is a nice idea, but relies on the indexers. All in all this stuff seems to make the language complex for dubious benefit.

    The same can be said for user defined value types and box and unbox. I approve of putting the value types into the type hierarchy, but I don't much like the way they've done it. The boxing and unboxing conversions are visible to the developer, whereas in (say) smalltalk integers are implicity always also objects, with no conversion required. The C# system does not allow you to subclass the value types to introduce new numeric representations, and presumably you can't do things like this:

    numeric x = 3;
    numeric y = 3.0;
    numeric z = x * y;

    Where numeric is the common superclass of int and float (in C# there appears to be no such thing, but there could be, and such a system would be better). The important point being that the value types are still not fully objects, they're just easily converted into objects - the only improvement over Java is syntactic (though for most people that may be enough).

    In general C# is Java with some gratuitous changes, some of which pull features which are merely conventions in Java into the language, and some of which are additions from VB and C++. Presumably the point is to prevent VB and C++ developers from going over to Java due to its improved developer productivity (which some Windows only people have been doing), by providing a similar language which is more familar to these developers - thus keeping them on the Windows platform. I'm not actually sure C# is simple enough to get the development time gains that Java gets, but its only the perception that really matters.

  27. Re:The collective speaks by SimonK · · Score: 2

    I agree. The overall quality of the comments here has been appalling. Many posters seem to be jumping in quick to get Karma without bothering to read the article, let along the (grossly incomplete, actually) language reference.

    Part of the problem no doubt is that many /. readers are morons, but part of the problem also is the moderation system - moderators generally only seem to read the first few posts, and usually concentrate on newer articles since those are the ones people read. Maybe the moderation system should be modified to only allow moderation on stories more than X hours old ?

  28. machine code vs byte code by JoeBuck · · Score: 2

    Java can be compiled to machine code as well as to byte code as well, and several existing Java compilers already do so.

    There's a lot of overhead for COM, and Microsoft isn't that stupid. You must be wrong about asserting that every object is a COM object. Perhaps only every object can be a COM object?

    Also, without forward declarations, how are recursive data structures defined? (e.g. binary trees?)

  29. Re:Wha...? by chialea · · Score: 2

    the key of C-major has neither sharps nor flats. think the white keys on a piano. and of course, once you start getting into interesting keys, you get all sorts of things...

    the key of C# indeed has the same notes as the key of Db, and they key of Db is much more popular, but they are not the same thing. go listen to a piece in F# and one in Gb... a lot of it has to do with mood, and which keys you can/should modulate into. of course this only matters if you're following the rules, but that's what music theory class is for, after all!

    also the rule [KEY] sharp == [KEY+1] flat is not necessarily true. take a look at a piano keyboard. notice that there are no black keys between some of the white keys. for example, B#=C, and E#=F (likewise Cb=B and Fb=E -- as a wind player, I see these a lot more often)

    you might want to try music theory sometime. very interesting stuff, I think. (but then again, I'm a music person :) )

    Lea

  30. Re:ok, Good & Bad "features" by scrytch · · Score: 2

    > When do I absolutely *HAVE* to use pointers?

    Device drivers. Malloc replacements. C interfaces. The knee-jerk factor on slashdot is unbearable on this topic, and was when I read the last article on this language. Do I have to read at threshold 5 whenever the word "Microsoft" is in an article now?

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
  31. Re:langauge reference for the masses by PD · · Score: 2

    Can you save it out as a word perfect file, or maybe rich text, or heaven forbid, an ASCII file? That doc seems to crash anything but a MS Word program.

  32. Re:They said it's not a Java copy, anyone believe by psaltes · · Score: 2

    When someone uses the phrase "syntactic sugar" they generally mean something along the lines of "unnecessary simplification that really makes things more confusing and isn't often used, probably most asked for by inexperienced vb database programmers who think 'ooh that's neat!' [mental image of the ferret from sluggy freelance]" (don't take that as a statement against db programmers by any means)

    ...in case you didn't notice i happen to agree pretty much with the above poster whom you appeared to disagree with. I think all of those features are pretty much completely unnecessary. There is a difference between syntactic sugar and something that makes the language easier and more useful to program in. Of course this is just my opinion, take it as you will.

  33. Re:Initialized variable != undeclared variable by FigWig · · Score: 2

    I'm not always clear about Java's automatic variable initialization since the compiler won't let me do anything without initializing all my variables. It gets annoying when I declare a variable in a particular place for scoping and conditionally initialize it later, but I guess
    String s = null;
    isn't such a big deal. Is the only place automatic initialization occur when you aren't initializing an instance variable in a constructor?

    My favorite C bug is when a novice depends on local variables being initialized to 0 (without explicitly doing so), and it works usually but doesn't on a recursive call. It kills them to see code that normally works break later with the exact same arguments.

    --
    Scuttlemonkey is a troll
  34. Re:Eliminates costly programming errors ... by rnturn · · Score: 2
    ``Just about all of us have spent hours debugging Perl code which did this to us, because we misspelled a variable name.''

    Not trying to be a smart aleck or anything but I have to ask: ``It took hours to debug a typo?'' What about

    #!/usr/bin/perl -w

    or

    use strict;

    I'd think those would be the first things to try when debugging Perl.



    --

    --
    CUR ALLOC 20195.....5804M
  35. Re:Eliminates costly programming errors ... by rnturn · · Score: 2
    ``...just try using perl -w on a file that is residing on a remote web server...''

    If you're referring to CGI scripts or something similar then I'd surely, whole-heartedly agree. Debugging Perl CGI scripts is a different animal altogether. I usually wind up having the script generate extra HTML output (if it's not causing outright server errors) or open a special file to write debug output to and it's a pain. But for general Perl scripts, say for daily sysadmin tasks, ``-w'' and its friends do just fine.



    --

    --
    CUR ALLOC 20195.....5804M
  36. Re:Eliminates costly programming errors ... by rnturn · · Score: 2
    ``$foo{bar} is just as valid as $foo{baar}.''

    Ouch! That would be nasty. I guess I'd be less likely to encounter those sort of errors since I tend to enclose literal strings in quotes, especially if I'm hard-coding an argument in a hash like in your example. Even if they're not required the quotes can save your behind and haven't been a problem... so far. Only a little extra typing.



    --

    --
    CUR ALLOC 20195.....5804M
  37. Re:quick analysis by jetson123 · · Score: 2

    I should have mentioned it: it's my own experience with J++ and COM that leads me to believe that this is not a good long-term approach.

  38. Re:quick analysis by jetson123 · · Score: 2
    Maybe you should take a closer look at C++? [...] "Connect to APIs" ? Don't know about you, but most of us don't have any problem with making a function call.

    C++ and C# look similar to a programmer, but they are rather different languages with different implementations. You can't, in general, make calls between them work automatically. Nor is C++ a substitute for a safe language with garbage collection. (Incidentally, I have been using C++ since the 80's, and I still do most of my programming in it.)

  39. Re:As usual, the signal to noise ratio is pretty l by jetson123 · · Score: 2

    As I understand it, primitive types like int aren't objects in C#, they are simply converted on demand. That's a subtle but important distinction. It can be a useful feature, but the implications aren't entirely clear to me. Java could implement it without changes to the VM.

  40. Re:ok, Good & Bad "features" by jetson123 · · Score: 2
    A number of languages combine GC, traced references/pointers, and untraced references/pointers. Among them, Modula-3.

    If you screw up the manual storage management, your program may crash. However, you don't have to use manual storage management or any other unsafe feature. In Modula-3, unsafe constructs can only be used in modules explicitly marked "unsafe". It's really no different from loading a C extension into the JVM, except that even "unsafe" Modula-3 modules are a lot safer than C.

    The Modula-3 definition of safe/unsafe modules and untraced pointers seems to work well in practice. The C# definition seems incomplete and unfinished...

  41. MS: sponsor open source GNU C# front-end by jetson123 · · Score: 2

    If Microsoft "gets it", they will sponsor an open source GNU C# compiler front-end. If the implementation is good, it has a chance of catching on. If they just do a C# compiler for Visual C++, I think it won't go anywhere.

    1. Re:MS: sponsor open source GNU C# front-end by jetson123 · · Score: 2

      Users are a spoiled bunch these days: plenty of free, high quality languages to choose from. Any company that wants to play in that space better provide something for free.

  42. Re:worse than both C++ and Java by jetson123 · · Score: 2

    "synchronized" promised to simplify multithreaded programming, but I think it hasn't worked out well in practice. Java programs end up locking much more than necessary, and despite that, many common locking operations are still a nuisance to implement in Java. C# has locks. While we can live with "synchronized", in hindsight, I think traditional locks would probably have been overall better even for Java.

  43. Re:quick analysis by jetson123 · · Score: 2
    Thanks.

    On the libraries, what I meant was simply that there are no comprehensive libraries for it yet. Based on their past statements, I believe that their strategy is to expose as much of Win32/COM+ as possible, because it seems easy, familiar to their programmers, and ties people to their platform. That's also what they wanted to do with Java.

    I also believe that that strategy is flawed: to me, beating Win32/COM+ into sufficient shape to work reliably and efficiently inside a safe, garbage collected language looks like a lot of work, and I think the end product would be of low quality.

    If, on the other hand, they start from scratch with libraries, they are in a much worse position than Java: not only are they way behind, they will also be completely non-standard compared to Java.

    Gates is right that it's all about APIs, and that will be their downfall: Windows is saddled with a lot of cumbersome legacy APIs. Sun OTOH invested in a brand new set of pretty well-designd, safe, OO APIs in Java, and their bet paid off: they are widely used and supported now. And that's why I think C# will have a very, very hard time even if they decide to push it.

  44. Re:ok, Good & Bad "features" by Zico · · Score: 2

    Uhhm, no. If you use Outlook, it is enough to open the message.

    That's completely incorrect. The user actually has to run it, just as if it were an .exe file. Merely previewing or opening the email does nothing but shows that the email has an attachment.

    Also, you can't just double click on a java class to run it (even on windows).

    Doesn't OS/2 execute class files natively? Not sure, but I thought it did. Anyway, I believe that you can put the classes in a jarball and have them run directly provided that you set up the manifest file to do this.

    Cheers,
    ZicoKnows@hotmail.com

  45. Re:ok, Good & Bad "features" by Roundeye · · Score: 2
    While it is not easy to write working GC in a pointer environment, it is possible. It also has been done repeatedly. In the face of adversarial code one has to essentially use "smart" pointers (very smart actually) such as can be constructed in C++ (this is obviously not a Java phenomenon). When one has control of the language, however, GC becomes even more straightforward (as you know where every pointer could potentially be created). Probably the reason M$ has punted here is that they've never been able to code a working memory management system to this date (I have yet to see a version of a M$ product which didn't leak memory, and the underlying OS is the worst culprit).

    --
    "Cause there's 40 different shades of black, so many fortresses and ways to attack, so why you complainin'?"
  46. Re:First Mistake: Dumbass name by Lumpish+Scholar · · Score: 2

    C# is the dumbest name that I've seen trundled out in this space so far.

    You never heard of the C+@ programming language? (I swear I'm not making this up.) --PSRC

    --
    Stupid job ads, weird spam, occasional insight at
  47. Re:What does it do that other lanuages don't? by magic · · Score: 2
    Well, it has accessors, which allow good separation of state and interfaces. (An accessor is a method that looks like a field).

    It allows casting without a type-check, something that Java disallows for language integrity but can be a pain when writing deserializers, memory management, etc.

    C# has a preprocessor, so you can use conditional compilation and macros again (yes, these can be abused, but they can also be used very effectively by a good programmer).

    Having multiple inheritance and dynamic arrays back from C++ is very nice as well.

    magic

  48. Re:Impressions from a Java Programmer by aphrael · · Score: 2

    I don't fully understand the Attribute support, after several readings. It seems as if you could provide your own modifiers and such, sort of a hybrid interface, but they don't seem to document it much either. How odd. Has anyone made sense of this yet?

    I haven't read the file yet --- waiting for it to print --- but I've been trying to get useful information from MS about attribute support for *more than a year*.

    VS7 is supposed to include the ability to declare COM objects in C++ with some syntactic sugar to allow you to define IDL attributes *in your C++ code*, thereby simplifying the process of creating COM objects. This was supposed to be part of 'COM+', but got pushed off into the next Visual Studio release.

    The general idea is that you could do something like:

    class foo [Apartment_threaded, Pooling: Yes] : public IBar ....

    and have the compiler automagically take the attributive information and generate behind-the-scenes code needed to ensure that the object behaves appropriately for those attributes, and is registered with those attribtues.

    For obvious reasons, i've been trying to find out what the *syntax* is going to be, as well as which attributes will be supported; it would be nice to be able to make our compiler support this stuff in projects brought over from VC7. Unfortunately, the information hasn't been out there in any meaningful way --- which means i'll be buying VC7 *the day it is released*, in order to find out what the situation is.

  49. Re:worse than both C++ and Java by jilles · · Score: 2

    You are right, I didn't bother to read all of it (200+ pages is a bit much for me). However, do note I posted a little correction (does not cover all of your comments). I think we all know Java MS interoperability is not really an option since MS stopped developing Java years ago.

    Of course MS claims that they will implement security. Also Outlook is the best and most secure email client in the world. Duh!

    I'm willing to agree that there is some nice syntactic sugar, but that does not outweigh the disadvantages of having gotos, a preprocessor (I was wrong about that, stupid bastards), the ability to make the program unsafe by disabling the garbage collector, the lack of an explicit security model (obviously not part of the language).

    This language will simultaneously offend Java developers (for lack of features) and C++ developers (for lack of features and freedom). It may appeal to VB developers (ignorance is bliss).

    --

    Jilles
  50. Re:They said it's not a Java copy, anyone believe by jilles · · Score: 2

    "Java doesn't let you use primitives (int, short, etc) as classes without wrapping them yourself (lots of overhead)."

    Then either C# does the wrapping transparently (same overhead) or built in types are all objects (unlikely). BTW. you don't have to wrap built in types to use them. You only have to do this when you want to use them as an object (e.g. in a Collection implementing class).

    "Java doesn't have a "foreach" statement"

    True, but that's just syntactic sugar. Besides, you have the Enumerator class for Collections.

    "Java doesn't have property-handlers (eg. write functions that are treated as member variables - eg:
    a.setName("MyName") would become: a.Name = "MyName" - but it would still go through a function."

    Again, syntactic sugar. Nice though.

    "Java doesn't have any versioning mechanism (other than the woefully inadequate @deprecated tag."

    I'm not sure the C# implementation helps much. Having two active versions of the same class active screams for trouble.

    "Java doesn't support indexers (methods on a class - say List, which allow you to take the object of type List, and use it like an array - eg:"

    More syntactic sugar. Adds some confusion and complexity to the language.

    "Need I continue?"

    Please continue, but not before you read my other comments on this article. In short my conclusions are that C# manages to be both worse than C++ and Java, not a small achievement. Don't be fooled by syntactic sugar and pay attention to the real features.

    --

    Jilles
  51. Syntactic sugar? by DragonHawk · · Score: 2

    Geez, your answer to practically everything is "That's just syntactic sugar; it doesn't really add anything".

    Hey, buddy, here's a news flash -- any above the level of raw machine code is syntactic sugar. After all, all you're doing is making things require more symbols then they really do.

    The point is, human beings like sugar, both syntactic and otherwise, and generally do better if they have some in their diet.

    --

    dragonhawk@iname.microsoft.com
    I do not like Microsoft. Remove them from my email address.
  52. Actualy by delmoi · · Score: 2

    A frend of mine, who's a really hardcore programmer, Loves C++, I mean he paid for the C++ and enjoys reading it.

    he read the spec, and he said it basicaly was java, with diffrent standard package names.

    --

    ReadThe ReflectionEngine, a cyberpunk style n
  53. you forgot something by delmoi · · Score: 2

    Really quick development of Server-side technology. You can make regular programs in Java, Applets are just gravy :)

    --

    ReadThe ReflectionEngine, a cyberpunk style n
  54. Syntactical Sugar ... Riiiight by IntelliTubbie · · Score: 2

    These high-level languages are just syntactical sugar! They can't do anything that I couldn't just write in binary!

    Although you may be able to do without this "syntactical 'wish list," syntax is a big factor in what Microsoft is aiming for: namely, giving programmers an easy-to-use language that allows quick coding and limited debugging, letting them write and update quality software with short development cycles.

    Whether they will actually deliver on that promise ...

    --

    Power corrupts. PowerPoint corrupts absolutely.

  55. Re:They said it's not a Java copy, anyone believe by The+Wookie · · Score: 2
    Does C++ let you define classes from a single file?


    C# Does. So does Java.


    Does C++ have garbage collection built in as part of the language?


    C# Does. So does Java.


    Does C++ have any built-in thread awareness?


    C# Does. So does Java.


    You're not really disproving anything with the "C# does" stuff. The point is that C# is a lot more similar to Java than it is to C++.


    It looks to me like they took some of the C++ features Java programmers miss the most (Enums, #include, operator overloading), made a few other improvements mixed it with Java and out popped C#.

  56. Re:They said it's not a Java copy, anyone believe by spectecjr · · Score: 2

    I don't think that there are *any* modern Java VMs that still use reference counting. Reference counting has two major problems

    Would you care to tell me how Java implements String pooling?

    I imagine you'll find that it keeps reference counts.

    As I said: "the overhead of reference-counted strings."

    NOT objects.

    Simon

    --
    Coming soon - pyrogyra
  57. Re:ok, Good & Bad "features" by spectecjr · · Score: 2

    Combining pointers/gc. Are they INSANE? One or the other! How does the gc know when a user-created pointer is out of scope? How does the user free a pointer? By using something like malloc() and free(), right? So who's managing what? Do I collect my own pointers, leave them alone, or trust the gc to ALWAYS pick them up? Remember, Java makes no guarantees about WHEN an object is gc'd or even on which gc pass. It might hang around for two or three runs before the memory is needed. So very bad, this. What's the point of a gc if you have pointers?

    Use the GC most of the time, and pointers only when you have to.

    Also, you might note that you have to mark the method that pointers are used in as "unsafe", which allows you to start messing with them.

    Si

    --
    Coming soon - pyrogyra
  58. Re:They said it's not a Java copy, anyone believe by spectecjr · · Score: 2

    You write: Java doesn't let you use primitives (int, short, etc) as classes without wrapping them yourself (lots of overhead).
    what about java.lang.Integer, java.lang.long, java.lang.Character ? And using wrappers is hardly "lots of overhead".


    java.lang.Integer is a wrapper that you have to use by doing:

    Integer iobject = new Integer(int i);

    It's then an object (or rather, an object with an int inside it).

    So yes, I was correct; you do have to do this yourself in Java.

    In C#, all you have to do is cast it - to type "object" or "Integer" - eg:

    Integer iobject = (Integer) i;

    Which is a lot less work if you have to do it over and over and over again - which you might if you're using collections a lot.

    Simon

    --
    Coming soon - pyrogyra
  59. Re:They said it's not a Java copy, anyone believe by spectecjr · · Score: 2

    If you want Object Oriented programming with raw C-like access to the O/S, use C++. That's what its there for (ask Bjarne. he says this every time the subject comes up).

    Well, given that Bjarne was asked to review the language, and gave it two thumbs up, I guess that's moot.

    Simon

    --
    Coming soon - pyrogyra
  60. Re:They said it's not a Java copy, anyone believe by spectecjr · · Score: 2

    This is incorrect. Java has int, long, float, double, char, byte as primitives. REAL primitives. Not just wrappers. Yes, you can use wrappers but you don't have to. In fact this is actually considered by some a FLAW in the design of Java because Java is not "pure" OO since it has these primitives. But saying Java has no primitives is just incorrect. The primitives are just fundamental types, not native types (Good Thing).

    I didn't claim that java didn't have primitives; just that when you have to use them in something which requires objects (ie. derived from Object), you need to wrap them using Integer, Float, Double, etc... which is something that is automatic in C#.

    Java may well have JNI for dropping to native code; but you have to write a separate DLL for that. C# doesn't require this; you just mark a method as "unsafe", and all of a sudden, you're programming to the metal.

    Simon

    --
    Coming soon - pyrogyra
  61. Re:Well, They Made the Same Mistake Java Made... by spectecjr · · Score: 2

    I'd like for them to explain how "using System;" is better than "#include ". This occurs right away on the first line of their "Hello World". I don't even want to think about what the rest of it would look like.

    What, you mean like this c++ code?:

    #include
    using namespace std;

    int main () {

    ... etc...

    Given that std should be unique to iostream (to avoid namespace collision), I don't see a problem with this.

    Simon

    --
    Coming soon - pyrogyra
  62. Re:They said it's not a Java copy, anyone believe by spectecjr · · Score: 2

    Each and every single one of these features (and most of them can be characterized as silly syntactic sugar) are overshadowed by the vendor lock-in and lack of platform neutrality.

    Huh? It's platform neutral. C# has been sent to the ECMA too - so where's the vendor lock-in?

    From what I've read, the biggest thing to learn from Java is that garbage collection is not necessarily horribly evil, and on-the-fly optimization of an easy to parse instruction set will eventually beat the pants off of processor specific optimization done at compile time.

    That latter lesson is extremely important, and I hope that compilers that compile C++ to Java bytecode or something similar come out soon. Of course, the Transmeta chip/software handles x86 on-the-fly, but I bet it would do even better with a more regular instruction set.

    Near as I can tell from the comments I've read, C# ignores this one big, interesting thing about Java completely. And, as far as escaping the garbage collector in a language designed for garbage collection, you've gotta be out of your gourd.


    Well, it lets you use garbage collection for most of your code, and then when you want to go down to the metal (eg. writing a device driver, interrupt handler, whatever), it lets you break out of the gc box and go for broke on the pointers.

    It also means that if you want to do excessive string manipulation, and you don't want the overhead of reference-counted strings, or if you just want to mess around with it using pointers, you can do so.

    It's the kind of thing that's especially handy where you have to interact with legacy code - and one thing Microsoft is all about is legacy support.

    Si

    --
    Coming soon - pyrogyra
  63. easily by / · · Score: 2

    The key of G-sharp has an F-double-sharp, giving it 8 sharps. You can have an arbitrary number of sharps when you account for double/triple/etc.-sharps.

    --
    "If one is really a superior person, the fact is likely to leak out without too much assistance" -- John Andrew Holmes
  64. Re:quick analysis by Chokolad · · Score: 2

    Generally really decent analisys. Only on thing to note - Microsoft did not published anything
    but the language reference itself. Are you sure
    that it does not have libraries for that beast ?
    I think we have to wait for some time before making any statements about lack of libraries and such stuff.

  65. Re:The reference and what it says by ajs · · Score: 2

    The only reference that I can find to goto in Java is this.

  66. Re:The reference and what it says by ajs · · Score: 2

    When was goto added to Java? When I went to Guy Steele's talk at MIT back 2 years ago, he said that Java didn't have a goto (to which he got a rousing cheer from the audience). Was this part of a later specification?

  67. Gnash (Gnu C#) by coyote-san · · Score: 2

    One reason for submitting the language to a standards body is to prevent others from producing their own, competing implementations.

    Granted, the standards route will eventually force them to open up the language to others, but that's years down the road. In contrast, if it were open today I'm there are plenty of language theorists who could name a handful of "obvious" improvements that would leave MS playing catch-up for years. (E.g., inner classes, something that both C++ and Java have found necessary.)

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
  68. Re:C# - an excellent tool by w3woody · · Score: 2

    I don't get you people. You complain about Windows being hard to program half the time, and the other half you complain about them making new languages that will make Windows development easier!

    Windows is hard to program because the model Microsoft used for the Windows API sucks really hard. Hiding the whole thing in a new language which sits on top of an object-oriented abstraction of a bad API model doesn't make things easier--it makes things more convoluted.

    Not to mention making it harder to port core functionality from one platform to another without having to rewrite the whole thing from scratch...

  69. Re:They said it's not a Java copy, anyone believe by Hard_Code · · Score: 2
    Java doesn't let you use primitives (int, short, etc) as classes without wrapping them yourself (lots of overhead).


    This is incorrect. Java has int, long, float, double, char, byte as primitives. REAL primitives. Not just wrappers. Yes, you can use wrappers but you don't have to. In fact this is actually considered by some a FLAW in the design of Java because Java is not "pure" OO since it has these primitives. But saying Java has no primitives is just incorrect. The primitives are just fundamental types, not native types (Good Thing).

    Java doesn't let you drop down to native code and turn off the garbage collector if you need to. Or use pointers if you want to talk to the underlying C-based OS.


    Also wrong. Java has JNI for dropping to native code. I believe there are also several garbage collection options for the VM. I believe you can turn it off.

    The rest of your points are indeed different from Java, but nothing spectacular or new. Object Pascal (Delphi) has had properties you describe since its inception. In fact, Delphi is a damn good product.
    --

    It's 10 PM. Do you know if you're un-American?
  70. Re:Hello, Word in C# by kaphka · · Score: 2
    FWIW, Visual Basic passes all arguments by reference by default, but you can override this by using the ByVal and ByRef qualifiers in function declarations. For some types anyway; I don't think VB will let you pass an array or an object by value.
    I don't think that's quite right (and the mere fact that it's disputed is an indication that it's evil.) I was under the impression that VB, like C# (and apparently Java also -- I was mistaken about that,) passes objects by value but passes "primitives" by reference. I believe String counts as a primitive, too. It also has other, more obscure ways of confusing the issue, like the AddressOf operator (which gives you a bare function pointer, even though there is no function pointer type to put it in.)

    Does anyone know if VB still supports ye right-antient BASICKE convention of parenthising (sp?) arguments in procedure calls to force them to be passed by value?
    I'm pretty sure that does work in VB. Actually, that makes a lot of sense... depending on how it compiles, that might even work in C++.
    --

    MSK

  71. Re:Hello, Word in C# by kaphka · · Score: 2
    Looks like a bastard child of C and Pascal. A Borland influence, maybe?
    Not really. It's hard to come to any conclusions about C# after reading the first page of the language reference... Having read some of the other pages, it seems to me that C# is java (as everyone expected,) with two differences:

    1) It allows you to break the memory model manually, i.e. turn off garbage collection. I don't think I like garbage collection, but if your language is going to be garbage-collected anyway, allowing exceptions is definitely a bad idea.

    2) It avoids "confusing" pointers and references, using the same technique that Visual Basic uses: it just hides the difference, so you never really know whether you're working with a reference or a copy. Having used VB quite a bit, I can tell you that this is really bad. That feature alone would be enough to keep me from going near C#.
    --

    MSK

  72. Re:C What? by TheTomcat · · Score: 2

    It's a standard self extracting zip file. I'm not as knowledgable about the mac as I'd like to be, but any unzipping tool will handle it nicely.

    I'd post a copy of it here, but.. well... we all know what happened last time someone did something like that. (-:

  73. FIXED LINK (see parent post) by imac.usr · · Score: 2
    OK, here is the absolute proper link: http://162.33.142.179/c.pdf. The other two will not work.

    Sorry for the confusion; first the misspelling and then a misconfiguration on the two machines I have access to (one was pointing to the other). Good thing I refresh.

    --
    I use Macs for work, Linux for education, and Windows for cardplaying.
  74. Re:What do the exe files do? Are they autozipped? by imac.usr · · Score: 2
    PDF version here for at least the next hour or so.

    Now, this is a 128Kbps DSL uplink, hosted on an eight-year-old Mac running Personal Web Sharing, so don't be surprised if availability is spotty at best.

    What the hell, always wanted to be slashdotted. :-]

    --
    I use Macs for work, Linux for education, and Windows for cardplaying.
  75. Re:Bottom line... free implementation? by be-fan · · Score: 2

    The problem is, they could care less if non-windows
    users can access it or not. The exe is the most
    convenient format to send it in, and has no
    drawbacks as far as they are concerned. Also,
    they've officially abandoned NT on Alpha, so I'm
    not surprised that they've done this. Marketing
    also plays a part in this. They ARE Microsoft, and
    even little plugs like this are not below them.

    --
    A deep unwavering belief is a sure sign you're missing something...
  76. Re:Bottom line... free implementation? by be-fan · · Score: 2

    The exe wrapped doc file was a self extracting .zip. Since there are more people without winzip than there are Linux users, and the fact that (statistically) everyone is running Windows, they chose to save it as a self extracting zip file.

    --
    A deep unwavering belief is a sure sign you're missing something...
  77. Re:C# by PurpleBob · · Score: 2

    That'd be the key of G# major. There's probably no way that many people are going to write music in it either, because (a) they could just stop tormenting the musician and write it in A flat, and (b) the key signature would have F## in it, and that's just icky.

    --
    No more e-mail address game - see my user info. Time for revenge.

    --
    Win dain a lotica, en vai tu ri silota
  78. Re:what's the purpose by kson34 · · Score: 2

    I have to admit that it is interesting to see what Anders Hejlsberg (The senior arcitect behind Delphi) has been doing since Microsoft hired him away from Borland (other than the less than successful WFC - which will probably be the API toolkit behind C#). Since C# is supposed to have a virtual machine, I wonder why Microsoft would submit it to standards bodies. Does this mean they are going open it up? Wouldn't this effectively create another Java and all the problems that Visual J++ seemed to have been created to for (mainly, making Java only run on windows machines)? Or perhaps they will open the language up, but keep the WFC closed...

  79. Re:F**k You, Taco by Fooknut · · Score: 2

    First off, that is HIS opinion. I'm sure you have opinions that sucks and/or are VERY stupid. Opinions are not up for debate, so shut the pie-hole. Second, he has some very valid points, these are things that you MIGHT know if you were a Java programmer (are you??) If you are, then why the rabid defense? Java is great, and it looks like C# is pretty slick too, especially compared to C++.

    Your comment seems to stem from a reallly bad day, or from a lack of maturity, or maybe just just a very high temper.

    But then again, your opinion that CmdrTaco sucks is your own...

    Fook

    --
    The price we pay for immortality... is death. Narnia The Great Fall
  80. There's more than that: by MostlyHarmless · · Score: 2

    There's C-hash, with a silent h, as in CASH, as another poster already pointed out.
    There's C-hash, as in what were they smoking and where can I get some?

    And Java wasn't that great either. The first thing I think of is a red-eyed coder staying up to 3:00 a.m. trying to figure the thing out, hot liquid Java (coffee) being the only thing keeping him awake.

    --
    Friends don't let friends misuse the subjunctive.
  81. Re:Eliminates costly programming errors ... by jonnythan · · Score: 2

    I don't know what you're smoking. Do this in your compiler:

    #include
    int main() {
    int a;
    cout a;
    return 0;
    }

    You will not get 0, I promise. I got -188293. Yes I just got out of CS1, and I learned that. The int a; line declares the memory address a uses, and as soon as we reference it in cout a;, it pulls whatever it finds in that memory address. C++ does not automagically set that memory address to 0.

  82. Re:ok, Good & Bad "features" by TummyX · · Score: 2

    so sue me ;P

  83. Re:What a minute... by quakeaddict · · Score: 2

    If portability is a design goal then so be it. However, at some point, when you want speed, you will have to forsake platform interoperability and go with a platform you like. At that point you should use a tool that will produce something optimized on the platform you chose.

    You cant blame MS for building stuff that runs great on their platform. Yu cant blame MS for not developing tools that help development on other platforms.

    I was at a J++ talk two years ago at Tech Ed and MS made it crystal clear to all of us there that they were ceding the cross platform developer tools to other companies (Inprise/Symantec).

    The ironic thing is that if they did build that tool I am sure many people in this forum would say they were acting in bad faith.

    Dammed if they do, dammed if they don't.

    --
    I'm still working on a clever footer.
  84. Re:As usual, the signal to noise ratio is pretty l by dingbat_hp · · Score: 2

    However, unlike Java, C# compiles to machine code, not byte code. Therefore C# programs do not take the performance hit that Java programs do.

    [...]

    • every object is a COM object

    Who can tell me what is wrong with this picture ?

  85. Re:ok, Good & Bad "features" by dingbat_hp · · Score: 2

    wanna bet that Microsoft deep-sixes J++ and discontinues its VM now that it has this, "suggesting" that new developers move to C#?

    I don't know how close C# is to "Project C00L", but towards the end of last year, when the "Selling off J++" story was planted, this is exactly the strategy M$oft were suggesting to their J++ / Windows-only developer community (Many of us don't _want_ to write anything other than a Windows .exe). If they couldn't play Java according to their own rules, they'd take their marbles and go home in a sulk. Not only that, but they'd smash up the board so that no-one else could play their game either.

    In my case it back-fired. I'm now writing Servlets with Sun tools, and I've never been happier to be rid of Redmond's spawn. I won't even be bothering to evaluate Cb.

  86. C# by Nopaca · · Score: 2
    Microsoft has announced the creation of a new programming language intended to keep MCSE's from hurting themselves with pointed things. The new language is to be called C#, pronounced "See? Sharp!"

    Said one Microsoft executive, "There's so much cut and paste programming going on with our tools, we were continuously having to admonish developers not to run with MScissors."

    Windows Me again I'm a masochist!

    1. Re:C# by sybert · · Score: 2

      > Relax; it'll never be more than a minor
      > language, so there'll be only 4 sharps.

      And the most famous piece written in the key of
      c# minor is the Moonlight Sonata (Beethoven).

      Moonlight is just reflected sunlight.
      Java comes to us directly from the SUN.

    2. Re:C# by Chris+Mattern · · Score: 5

      > My god! Do they know what the key signature for
      > that looks like?!? No WAY I'm playing in a key
      > with 8 sharps.

      Relax; it'll never be more than a minor
      language, so there'll be only 4 sharps.

      Chris Mattern

  87. Re:ok, Good & Bad "features" by Deadbolt · · Score: 2
    And how is this different from a C binary (exe) or a Java class (class). The both have full access to the OS don't they? Yes they do. I can write a java program to delete *.mp3 just as easily as I can write a COM object to do the same thing. Yeesh.

    It isn't, but it bugs me that we have one more method of passing un-inspectable trojans around. I guess it's not a criticism of C# in particular. Cheerfully withdrawn.

    --
    "Honey, it's not working out; I think we should make our relationship open-source."
  88. NOT insightful; NOT a +5! by Tom7 · · Score: 2

    As many people have pointed out, you've got this wrong. C# will be happy to give you an undeclared variable error at compile time. Moderators, check something out (like, the replies!) before modding something up this high!

    The problem you're describing is indeed a big shortcoming of highly dynamic scripting languages like Perl and Visual Basic (and even Lisp). Most modern designs have stronger static type systems which force the compiler to reject programs with dangling free variables, and C# is one of these languages.

  89. Re:They said it's not a Java copy, anyone believe by rnd() · · Score: 2
    It all depends on what you idealize in a language:

    'features' such as being able to access a list by indexes, and having special types of (property handler) methods that behave like variables are all (in my opinion) shortcuts around aspects of pure OOP that are sometimes a bit inconvenient.

    If you are an OOP purist like me, you don't necessarily want to be able to access a list by index, since the beauty of the list collection (as an OOP abstraction of reality) is that you don't need to think about indexes, you only need to think about adding and removing things.

    Of course, it is rarely worth a programmer's time to wax nostalgic about smalltalk, however one should not confuse a hack with a feature, even if it's a very useful hack.

    (personally, I'd rather have my ints all be objects no matter what)...

    --

    Amazing magic tricks

  90. Unknown format by Animats · · Score: 2

    How do you read the file? It's not an archive in any known format. There's a warranty disclaimer in the file's Verisign certificate, though.

  91. Good riddance to bytecodes by GCP · · Score: 2

    Not an Internet language because it doesn't compile into bytecodes? What kind of definition is that? How about changing that definition to "useful for Internet developers"?

    Sun has relentlessly pursued a policy that "the whole idea of Java" is to produce bytecode, as if that's really at the top of most Java users' agendas. Funny, but in every enterprise I've been involved with, the whole idea (on our -- the developers' -- side) was to have a quicker, easier, more reliable way to create good server-side apps. True, there is occasional use of Java on the client, but the majority of serious Java users use it as a server-side development language, where they couldn't care less about portable binaries, but the conveniences of the language itself are the attraction.

    What we want is a language that lets us quickly whip together a powerful, fast, and reliable server-side app, then compile it into a blindingly fast executable, optimized for whatever server we happen to use. Once every few years, when we change server platforms, we'd be willing to recompile. ;-)

    I would so much rather have a language that combined some of Java's (language) features, with an Eiffel/eXtremeProgramming-ish ability to *automatically* generate testing/assertion/designByContract debug scaffolding, based on explicit interface contracts expressed in the language, that could be turned on or off in a fine-grained way for a customized balance of speed and safety when compiling the production executable for deployment on the server. In other words, basically Eiffel, with some of the Internet-oriented features (and the marketshare!) of Java The Language.

    If some sort of bytecode system were designed for the express purpose of allowing additional runtime performance optimizations, then that would be fine. Such a system, unlike Java's, wouldn't carry any baggage necessary solely to make the binary portable, nor any security checking baggage of the the sort that is only relevant when running as untrusted code, nor anything else that would interfere with the mission of creating rock-solid, blindingly fast, easy-to-create, multithreaded, inherently distributed server-side internet applications. Such bytecode would be purely a performance technology.

    Now, it doesn't sound to me as though C# is anywhere near so innovative. I wouldn't expect it to be, given the source. I'm certainly not looking for another Windows-only language, but neither do I want another language that, like Java, is essentially designed to prevent me from using it to write great Windows apps.

    An inability to produce bytecode would hardly make a language less interesting to most real Internet application developers that I know.

    --
    "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
  92. Re:First Mistake: Dumbass name by gwalla · · Score: 2
    : of, relating to, or being notes that are written differently (as A flat and G sharp) but sound the same in the tempered scale

    Of course, when you're playing an instrument without distinct set pitches (like a trombone or fretless bass guitar, as opposed to a clarinet or guitar), you're not playing in the tempered scale. You're playing in a Pythagorean tuning, because that actually sounds better (you get cleaner 5ths).

    The tempered scale is just a kludge so you can play music in different keys on the same instrument when the pitches on that instrument can't be microtonally adjusted, like a piano--a piano's keys have distinct, set pitches (unless you're like John Cage and you stick crap in the strings). A tempered scale means that certain notes have been adjusted so that close ones like C# and Db are considered the same. Enharmonic is not equal, it's "close enough".


    ---
    Zardoz has spoken!
    --
    Oper on the Nightstar
  93. It's a fscking language/tool #*(&$(@$#@ by Otis_INF · · Score: 2
    Do you all kiss Kernighan & Ritchie's C book before you take breakfast? I did. years ago. Before I found out that a language to program in is just a tool to get things done.

    After a while I found out that it's better to find a language that fits the job you need it for than to struggle on with just 1 language you think is superior. It's not. At least not in all cases.

    So, concluding: This language will be handy in some circumstances, for example for writing COM objects and you don't want to memorize 100010012343242 C++ macro's and you don't want apartmentthreaded VB objects. In other circumstances other languages are more handy. Deal with it, it's reality. Just bashing this language to death is the most stupid thing to do. Even if it's a total 1:1 copy of java's syntax it's a heaven's gift. You know why? because World Leader Sun doesn't allow people to write COM objects in Java. That's why.

    For linux/unix oriented people this language isn't of much use I'm afraid. That's ok. in win32 land, perl is of no use. So what. Use the freaking tool you need to get your job done and move on to the next eager waitin' job to get finished. IMHO much more important than mumbling about a language you probably will never use.
    --

    --
    Never underestimate the relief of true separation of Religion and State.
  94. Well, They Made the Same Mistake Java Made... by istartedi · · Score: 2

    ...and invented another syntax. Like, just the other day I was saying, "what we really need is another syntax so that people will have to learn another language, so that entire codebases will have to be either ported or become obsolete. Yes that's just what I need."

    (yes, that was sarcasm)

    I'd like for them to explain how "using System;" is better than "#include <stdio.h>". This occurs right away on the first line of their "Hello World". I don't even want to think about what the rest of it would look like.

    I'll be treating C# just like Java--trying not to learn it, and working on projects to make C and C++ interpreters faster, more secure, and more functional for the web.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
    1. Re:Well, They Made the Same Mistake Java Made... by istartedi · · Score: 2

      The #include syntax can be, and *is* used to accomplish the same thing. Good programs only use #include for headers, and the oject code can be written in any language as long as it exports functions properly to the linker. I've seen this done quite often with assembly, and have heard of it being done to link C programs to Pascal objects also. Changing the syntax doesn't help.

      OTOH, if "using" will do on-the-fly translation of the other module into C#, that's actually kind of a neat feature.

      --
      For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  95. Re:Impressions from a Java Programmer by Furry+Ice · · Score: 2
    However, there does seem to be a lot of stuff left over from C/C++ days that is sort of questionable. Like the inclusion of structs and enums. The potential performance benefits of structs are intriguing, but losing much of the OOP nature of your code is not attractive. Enums seem to clutter the language needlessly.

    Enums are actually a nice addition. If there's one thing about Java that drives me nuts, its the fact that I have to keep track of lots of public static final int foo = x; statements. If the enum support were flexible enough to use more types than just int's, it would be very welcome, indeed. Imagine String constants as method arguments with compile-time checking to make sure that only valid constants are ever passed to the method. Useful, no?

  96. Make More Money - M$ by a_n_d_e_r_s · · Score: 2

    I admire MS - this is a good thing for Microsoft.
    It not hard to see what they are up too and was thinking:

    C# language requirements:

    - Must appeal to and convert Java programmers
    - Must appeal to and convert C++ programmers
    - Must appeal to and convert VB programmers.
    - Must force everyone to use our products.

    A new language means we can sell new books, new courses and certify everybody - so we can make more money. Windows 2000 has a hard time gaining market share so we need some other way to make more money.

    Solutions:
    - Copy Java - mix in some C++.
    - Make it more like C++ to lure them over.
    - Add some construct so it can be marketed as a
    better Java and a typesafe C++.
    - Add some syntactical sugar to make it more
    appealing to the programmers.
    - Tie it to our platform by adding total
    integration into our OS and thus makes it
    impossible to move programs to other OSes.
    We also can reuse that old code we have...
    - We dont have to invent something new we can just take what others and 'innovate' it - too corrupts the masses to our products.
    - Supply it to a standards body since people are complaining that Sun has not done that.
    Noone will dare to make a competing product anyway and if someone does - it must still run in our OS.

    It makes it very hard for Microsoft to lose.
    This is a much better Java killer than Active-X.

    Noone can say that Microsoft thinkers are not good at use their existing advantages to maximize profits.

    --
    Just saying it like it are.
  97. Re:C# is not ActiveX by daninja · · Score: 2
    My understanding is that Java was originally intended to be a cross-platform language, so that there would be a VM for every os and applications would be written for the VM. When that seemed impractical, Sun tried to reposition it as a language for embedded systems.
    Acutally, Java (Oak, back then) was originally developed to control set-top-boxes. Downloadability and safety/security were requirements from the start. Sun did not get the contract for the set-top-boxes, the web came into being, and it was not too hard to see the possibilities (applets and all that). The internet friendliness, portability (VM), and security were already there, so it didn't take much to move the target from set-top-devices to browsers. "Oak" couldn't be used as the official name of the language (I think it was already trademarked), and "Java" was an available and marketable term.

    Applets, while very "cool" in 1996, were problem prone and not very useful. Java on the client (outside a browser) never made it because Sun couldn't produce a good GUI framework, but Java on the server is a winning combination.

    I think it's a great language and I love programming in it, but I am more interested in applications that web stuff.
    We use Java for web stuff (what else can you do with it?).
  98. Re:They said it's not a Java copy, anyone believe by zettabyte · · Score: 2

    I don't want to get into a flame war on this, but in defense of Java:

    Java doesn't let you use primitives (int, short, etc) as classes without wrapping them yourself (lots of overhead).

    java.lang.Number and subclasses. Immutable, but classes. Changing them to be mutable (?), I don't see that as lots of overhead...

    Java doesn't let you drop down to native code and turn off the garbage collector if you need to. Or use pointers if you want to talk to the underlying C-based OS.

    JNI?

    Java doesn't have a "foreach" statement.

    That's what the Iterator interface is for.

    Java doesn't have property-handlers (eg. write functions that are treated as member variables - eg:

    a.setName("MyName") would become: a.Name = "MyName" - but it would still go through a function.

    These are great for encapsulation.

    This, I suppose, is preference... If I say a.Name = "X", maybe I'm trying to avoid the setName function, presuming Name is accessible. Personally, I don't think this is a help to making the code more readable.

    Java doesn't support indexers (methods on a class - say List, which allow you to take the object of type List, and use it like an array - eg:

    List l;

    l[index] = "asjdasid"

    Vector v = new Vector();

    v.setElementAt("asjdasid", 0);

    ???

    I suppose the point is, C# has different ways of accomplishing the same things Java can.

    The real question is: Does C# have enough new functionality to draw the masses to it? I'll wager time can answer that for us...

  99. They said it's not a Java copy, anyone believe it? by 51M02 · · Score: 2

    Any ressemblance with any know multi-platform independant language is completely not hazarduous.

    Just after looking at this document I just wonder why it's called C# and not Java# because it's seem just about the same except for the "runs only on Windows platform" thing.

    Disclaimer: "These opinions are my own, though for a small fee they be yours too"

    --
    --- Bouh !!! ---
  100. Re:worse than both C++ and Java by ceswiedler · · Score: 2

    just a little rebuttal:

    - There is an equivalent to "synchronized:" "locked"
    - Dynamic binding is only possible because of the Java VM, which isn't present with C# (thankfully, in my opinion)
    - Well, there is a preprocessor, but it's part of the compiler. Anyway, the standard #if set is there.

    I use and like java, but this looks like it might be better.

  101. Re:C What? by ocelotbob · · Score: 2

    It's a standard self extracting zip file. I'm not as knowledgable about the mac as I'd like to be, but any unzipping tool will handle it nicely. Although, shh, you're not supposed to know that.

    --

    Marxism is the opiate of dumbasses

  102. Don't Panic by Golias · · Score: 2
    Okay, so M$ has a new language, called C-hash, pronounced See-Sharp. I know the instict is to wonder how this contributes to their plans to take over the world, or put a "laser beam" on the moon, or whatever. I don't think there is a lot of reason to worry.

    Like Sun's Java and NeXT's (now Apple's) Objective C, this is just Yet Another Object Language, offered to programming shops who are dealing with the fact that nobody seems to know how to program in "Good Old C" anymore.

    Choice of object languages is a religious issue, and the best language for you to be productive is usually the one you know best.

    I suppose this is good news for people working under PHB's that like to proclaim "this is a Microsoft shop!" because now they have an alternative to VB for writing their apps.

    The rest of us can safely ignore C# forever.

    --

    Information wants to be anthropomorphized.

  103. More Grammar Nazi's Please! by saider · · Score: 2

    I think we should have a full time grammar checker person employed by slashdot that would humiliate people who post such "egregious lapses of grammar" that make reading some post's on this site so hard for I to read. Perhaps he/she could team up with a full time spell cheker to make sure that we all use the wright speling. It wood make reading posts from people who are outside the US much more entertaining.


    --


    Remember, You are unique...just like everyone else.
  104. Hooray! by Reality+Master+101 · · Score: 2

    They have an "unsigned" type. That was one of my pet peeves with Java. :)


    --

    --
    Sometimes it's best to just let stupid people be stupid.
  105. Re:Sounds like another worthless M$ language to me by dagoalieman · · Score: 2

    Consider how many "innovations" m$ has released, intending to replace something else. Disreguarding operating systems, that is. How many of those innovations actually made the replacement? And how many have actually strenthened what they were supposed to replace??

    'nuff said..

    --
    We don't need no Net Explorer We don't need no Thought control
  106. What does it do that other lanuages don't? by Tyrannosaurus · · Score: 2

    I haven't read the PDF, but what can this language possibly do that Java, et al, doesn't? Do you think this could just possibly be MS circumventing the legal hassles they ran into by 'embracing & extending' Java? I believe this was pointed out to be one of the ways around patent violation: create a new methodology that produces the same result...

    --

    ---
    Gort! Klatu Barata Nikto!
    1. Re:What does it do that other lanuages don't? by JAPH+Doggy · · Score: 3

      Here's how I see it coming together:
      • There will be a "simple" runtime on the client side that acts as the VM for C# and knows how to talk HTTP and SOAP
      • The runtime will hit a (malformed) URL and download all the C# objects that act as the GUI interface language
      • All C# Objects will be cached on the client side alla HTML caching in browsers
      • The versioning is used to make sure that object version dependencies are adheared to for any given application
      • The C# application will use SOAP to talk to some server somewhere to do its data access and any real crunching that it may need to do
      • Microsoft will do everything they can to lock in customers to their way of doing things (especially using their servers)
      Now... I don't see why we can't do something similar with XML-RPC & Perl or Python (as well as mod_perl or Zope on the server side) using Gtk+.

      In fact... I think we should!

      --

      --

      --
      A PC without windows is like chocolate cake with no mustard.

  107. Eliminates costly programming errors ... by Anonymous Coward · · Score: 3

    ... by having variables in C# automatically initialized by the environment? Since WHEN has this been a good feature to have? I'd rather have a specific error come up, with the opportunity to fix this problem rather than having the program try to correct it, leaving me wondering why I've got bogus values all over the place.

    Just about all of us have spent hours debugging Perl code which did this to us, because we misspelled a variable name. Automatic variable initialization does not a productive language make.

    This is NOT flamebait. It's been my experience that this is a very bad thing.

    1. Re:Eliminates costly programming errors ... by tzanger · · Score: 3

      Every, and I do mean every Perl script I write start out like this:

      #!/usr/bin/perl -wT
      use strict;

      Saves a lot of frustration and trouble. Same reason why almost every C program I write is compiled with warnings turned up to the max.

  108. Re:what's the purpose by phil+reed · · Score: 3

    And, M$ has submitted this language to the "standards bodies". Looks like they are trying to really poke Sun in the eye with a sharp stick.


    ...phil

    --

    ...phil
    "For a list of the ways which technology has failed to improve our quality of life, press 3."
  109. Latest News! by jd · · Score: 3
    When asked to comment on Slashdot's discussion of C#, the head of the Microsoft legal department released this announcement:

    "Exterminate! Exterminate! We are the supreme beings in the Galaxy! We are the masters of Earth! We are the masters of Earth!"

    The marketing division, however, had an alternate view of events: "All hail Caesar! Vini, Vidi, Visa! All bow before the Emperor!"

    When asked for his input, Tux banged the table angrily with a flipper. "I will not be filed, stamped, briefed, debriefed or numbered! I am a Free Penguin!"

    EMS could not be reached for comment, on account of his phone being patented.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  110. Looks pretty decent to me... by MenTaLguY · · Score: 3

    Hopefully we'll get some secondary implementations quickly, so it's harder for Microsoft to it as a rug to yank out from under non-microsoft implementations.

    I wish the original poster had mentioned what issues he saw with the language, though. I only gave it a cursory look, it'd be helpful to see a real analysis.

    Oh, and I strongly suspect, that whatever Microsoft does, the name of the language WILL end up being pronounced "CASH". :P

    --

    DNA just wants to be free...
  111. Re:They said it's not a Java copy, anyone believe by scrytch · · Score: 3

    > So what? syntactical sugar, nothing more.
    [repeated for each point]

    All languages are nothing more than syntactic sugar on top of turing machines. Did you have an actual point, or were you just scoring knee-jerk anti-Microsoft points? I give it three out of five Slashdots.

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
  112. Re:C What? by Phexro · · Score: 3
    perhaps the real motivation is a desire to avoid further litigation from modifying java by creating their own knock-off.

    and i'm sure they will hype the same things as their broken java: works better & faster on windows platforms, portabilty between windows platforms, blah blah blah.

    though offtopic, does anyone else notice how every msft product cycle is touted as faster, yet the minimum requirements keep going up and up? shouldn't this be considered some sort of false advertising, or is there a legal loophole they are exploiting?

    --

  113. Re:Hello, Word in C# by Black+Parrot · · Score: 3

    > The canonical "Hello, world" program can be written as follows:

    using System;
    class Hello
    {
    static void Main() {
    Console.WriteLine("Hello, world");
    }
    }


    For Microsoft languages the cannonical question is, how many Kbytes (Mbytes? Gbytes?) is the resulting executable?

    --

    --
    Sheesh, evil *and* a jerk. -- Jade
  114. Re:worse than both C++ and Java by jilles · · Score: 3

    More bad news:
    - It does have a preprocessor, eww!
    - It has goto's, I feel really sad now!
    - It has a delegate construct. This is actually cool. However, I can't help wondering about typechecking and security here.
    - Support for versioning. Usefull I suppose.

    Excuses for inaccuracies but I cannot do more than briefly glance at 200+ pages of specification. I think this post and the previous one capture most of the shortcomings of the language.

    --

    Jilles
  115. The reference and what it says by ajs · · Score: 3
    I've read through some of the reference (I'm honestly curious if those who didn't use winzip to read it had to agree to some silly click-wrap) and here's some high points:
    • The reference basically ignores Java while making lots of comparisons to C and C++. Interesting, since the language obviously derives a lot of its structure from Java moreso than C and C++.
    • Coctothorpe will have Perl/Java/Python-like library access.
    • Unlike Java, Coctothorpe will have a goto (which I consider neutral, since I've had to use gotos at times). The sickening thing is that unlike Perl, Coctothorpe will not allow labeled breaks, and instead recommends using goto for breaking out of nested loops!
    • It will have C-style #ifdef/#endif
    • The word "Microsoft" appears only 10 times in the body of the text.
    Hope this helps!
  116. I don't get it by babbage · · Score: 3
    Maybe I'm just not with the program, but I don't see why this language is such big news around here. (But then I don't really care for Java either so what do I know? ;) I've got a whole bunch of questions that I haven't seen addressed yet.
    • "Microsoft has its own unique programming model with Visual Basic. But it's not designed to be a scaleable, multi-user system like Java"

      How, exactly, is a multi-user language different from a single-user language? That seems to me to be a feature of the programs you write, and not of the language you write them in. That's like saying my pencil is multilingual capable, isn't it?

    • "Java, a technology developed [....] as the language programmers can use to write software once and have it run across all types of computing systems"

      sed 's%#!c:\progra~1\perl%#!/usr/bin/perl#' <*.pl >*.pl

      ...and hey presto, your scripts have been ported from Windows to *nix. I can't say I've ever been too impressed by that goal :)

    • "It provides operating system independence (which Java provides), but it also provides language independence, which Java can't provide."

      Okay, here's the one that really confuses me. How can a language be language agnostic? I can see where the compiler or virtual machine or whatever can be (e.g. JPython running on the JVM), but that's not the same thing. This sounds to me more like "a feature we developed in parallel with C# allows...", and that suggests to me that any platforms that support this are going to need a native interpreter of some kind, like the JVM. If this interpreter can accept, say, Visual Basic code -- an interesting possibility -- then this could backfire by allowing M$ apps written in VB to run on any platform that has the interpreter. Thus, taking it to the conclusion, Wine may become irrelevant and Office may get recompiled & ported to Linux etc very, very soon -- much sooner than I was expecting. I want to hear more about this particular statement.

    • "It's a platform-agnostic method of building these rapidly distributed applications."

      <voice sounds-like="Mr Rogers">Can you say Trojan Horse? Can you say DDOS? I knew you could!</voice>

    • "Goodhew added that C# allows "developers (to) access any hardware and software." C# provides "complete access to (the) underlying platform."

      How do they rationalize saying that it offers better security than Java in one breath, and this crap in the next? I was under the impression that you tend to get better security by abstracting the platform specific stuff -- but again, I don't pretend to be an expert and these people are obviously smarter than I am...

    • "Last year, unconfirmed reports circulated that Microsoft was building a new language called "Cool" that would be similar to Java but free of technological or licensing obligations to Sun."

      ...but not free of technological and licensing obligations to M$. How exactly is an improvement of affairs in the average consumer's life? Isn't this one of those "out of the frying pan, into the fire" deals?

    I dunno guys, I just don't see it. I don't see why this is a good idea, and I sort of think we should pay it no mind. It doesn't seem to offer anything we don't already have in, say, Perl, Python, and Java, it's not really offering any interesting new functionality (except maybe that cross platform language agnostic malarkey), and it's Yet Another Embrace & Extend maneuver from our favorite predatory monopolists. I'd be interested to hear a good defence of this language, but this article wasn't it.



  117. MS is going to strike out again by putzin · · Score: 3

    When is Microsoft going to stop being reactionary and predatory and start providing meaningful solutions to problems. C# isn't going to solve any new problems. Java, PERL, et. al. are already doing this. Another case of Microsft missing the boat and doing something bass-ackwards.

    --
    Bah
  118. Re:First Mistake: Dumbass name by DrEldarion · · Score: 3

    We've already gone over this. It's pronounced C-hash, but the first h is silent. That's the REAL reason for this software. *cough CASH cough*

    -- Dr. Eldarion --

  119. Microsoft releases microtonal language! by YU+Nicks+NE+Way · · Score: 3

    All these people who confuse C-sharp with D-flat. My god, aren't any of you real musicians? The two notes are completely different! You need a good microtonal scale to distinguish them in an equally tempered world (48 steps/octave works particularly well), but they are different.

    So, of course Microsoft released a Microtonal language. Is anybody really surprised?

  120. Native COM support IN the language by Otis_INF · · Score: 3
    That's the main reason. VB has it, but it's suffering from its ease of use because it lacks some options C++ brings to the table (free threading, re-usage of object by multiple threads of multiple processes etc). C++ will do, but you need an extreme amount of macro's to get decent COM support in your program. If you know them, it's easy. if you don't it's hell on earth. Native COM support in a language with C++ speed and VB ease of use is the dream of every COM developer. That language was already there: Java by MS (J++ 6.0). Sun killed it with a lawsuite. So MS needed another language to fill that gap. That's now released: C#.

    A must have for unix developers? Only for people using COM objects on Win32 servers perhaps. The rest of the Unix world can move on, walk by, and get on with their lives. It's not necessary to work with EVERY language! Visual Studio contains: Foxpro, VBscript, Jscript, VB, VC++ and Java. Now a new language is added: C#. Big deal. Programming in Perl is not a common thing on win32 platforms, more VBscript is used. So what. Code the program->get the job done->next issue.

    So, if you think of COM as in 'a root domain', forget this language :) you won't touch it. If you work with COM on a daily basis: it's for you. And you will be happy it's finally there. There is no need for mudthrowing. That is only a hint of not understanding what it's all about.
    --

    --
    Never underestimate the relief of true separation of Religion and State.
  121. pointers by Frymaster · · Score: 3
    from the c# intro:

    Allowing restricted use of native pointers.

    I admit that I haven't read the full documentation (hey, life is short and the only MS product I use is Age of Empires) but wasn't one of Java's major security features the elimination of pointer use/direct memory access? I'd be (marginally) interested to see how they will restrict this enough to avoid giving the mafiaboys of the world another hook while still making pointer use useful....

  122. You've got it ALL wrong by Halo- · · Score: 3

    I think the term "syntax error" is appropriate here.
    You all buy into the statement:
    "C#" == "C Sharp"

    Whereas I'm much more convinced:
    "C#" == "C Hash"

    where "Sharp" == "Smart, intuitive, and/or clever"
    and "Hash" == "Intelligence dulling drug"

    You make the call!

  123. First Mistake: Dumbass name by hirschma · · Score: 3

    C# is the dumbest name that I've seen trundled out in this space so far. I like that fact that harmonically, it is equal to D-flat :) Say what you want, but Java works as a name and got people really interested before they even knew what it was.

  124. c# by Anonymous Coward · · Score: 4

    C hash

    See C hash run

    run c hash CRASH

    C# $%^&

  125. How is MS Visual Studio like a banana peel? by Frank+Sullivan · · Score: 4

    Because if you don't C sharp, you'll B flat. :P

    --

    --
    Hand me that airplane glue and I'll tell you another story.
  126. There is no C# standard library... by MenTaLguY · · Score: 4

    ...it apparently just relies on the same standard class libraries as VB and friends. ugh.

    --

    DNA just wants to be free...
  127. Re:They said it's not a Java copy, anyone believe by acroyear · · Score: 4
    Lets take this one at a time...

    Java doesn't let you use primitives (int, short, etc) as classes without wrapping them yourself (lots of overhead). ... C# does.

    So what? syntactical sugar, nothing more.

    Java doesn't let you drop down to native code and turn off the garbage collector if you need to. Or use pointers if you want to talk to the underlying C-based OS. ... C# does.

    Translation : Java doesn't allow you to break its programming model and create very intentionally unstable code. C# does.

    If you want Object Oriented programming with raw C-like access to the O/S, use C++. That's what its there for (ask Bjarne. he says this every time the subject comes up).

    Java doesn't have a "foreach" statement. ... C# does.

    Syntactical sugar. Easily done by adding a foreach functional object (see C++ STL), using the collections classes. Yes, I'd rather see real generic programming (no casts) in Java like it is in C++, but until that's there, make do.

    Java doesn't have property-handlers (eg. write functions that are treated as member variables - eg: a.setName("MyName") would become: a.Name = "MyName" - but it would still go through a function. These are great for encapsulation. C# has it - Java doesn't.

    Syntactical sugar. I'd rather the code explicitly tell me that a function is or isn't being called. When i can't instantly look at a line of code and go "that's not calling a function" (which in C#'s case, i can't), then i won't trust the code.

    Java doesn't have any versioning mechanism (other than the woefully inadequate @deprecated tag). ... C# does.

    So C# now forces you to keep all of your mistakes around in every single file, just like other MS products like the Office file formats? No thank you. Roughly translated, C# mandates Code Bloat automatically for you.

    Java doesn't support indexers (methods on a class - say List, which allow you to take the object of type List, and use it like an array - eg: List l; l[index] = "asjdasid" C#, however, does.

    Syntactial sugar. In C++, that's operator overloading. I didn't realize "l.get(index)" was so fucking hard to type or read.

    The Big Three (Ritchie, Stroustrup, Gosling) each said in the C++/Java Report interview that there was certainly room for more languages, possibly derived from the C family, provided it truly fulfills a programmer's needs.

    But C# doesn't answer programmers' needs. Its a syntactical "wish list" that I can do without. Using these examples, I can write a C# subset preprocessor to translate into C++ in a day (note : i've not read the spec, only this checklist).

    But I don't need it.

    --
    "But remember, most lynch mobs aren't this nice." (H.Simpson)
    -- Joe
  128. Here's my version!! by ch-chuck · · Score: 4

    On the first day, Bill and Paul created BASIC, and MITS users rejoiced and made many illegal copies.

    On the second day Bill created Micro-soft, such that when MITS tanks and Pertec buys it thinking they'd get BASIC, they didn't (nyah, nyah nyah!!)

    On the third day Bill purchased QDOS and sold it to IBM - the IBM compatible crowd granted Msft a DOS monopoly and it did fill the coffers to a great overflowing.

    On the fourth day Bill release Windows3, a grotesque abomination, yet being tied to the DOS monopoly it quickly ascended to 90% market share.

    On the fifth day Bill unleashed a horde, Windows 95 to punish the Win3 desktop users and bind and chain them to a GUI standard, and a monsterous NT to abolish Novell, the faster file server in the
    land, and to cause grevious crashing and blue screens of terror in the server room.

    On the Sixth day, Bill embraced the Internet,
    which at first arose and suprised the great Msft and threatened to make it obsolete, yet Bill fought back with the vigor of the damned and with the most agressive and grevious of bundlings tied IE to Windows, which was tied to the ancient DOS monopoly, thus fooling even the wise as to the Internet's true origins.

    On the Seventh day, waxing vastly bolder still, Bill calls forth all demons at his command to punish the MITS software pirates and the people of Earth who are like them, enslaving humanity with strange proprietary languages, capturing even the guardians of hades, confusing their minds and drawing them into labyrinths of law and insanity.

    And thus it is that the people of Earth were smitten and chained to their workstations of everlasting pain and damnation, yet suffer it greatly for it is by their own seeming choice.
    And the great demon cackled with glee.

    --
    try { do() || do_not(); } catch (JediException err) { yoda(err); }
  129. worse than both C++ and Java by jilles · · Score: 4

    Wow, they've done the impossible. I just took a brief glance at the introduction to C#.

    Here are some impressions:

    - Similar syntax to Java with some annoying, non functional differences (e.g. Uses instead of import)
    - No synchronized keyword or equivalent. This makes the language not very suitable for serverside development.
    - No dynamic binding (at least I didn't see it mentioned). This is a key advantage of Java over C++ and allows for run time loading of new classes that may not even have existed at compile time.
    - Non functional syntactic sugar. At least I don't see the advantage of having structs or enums when you can have inner classes or something similar.
    - No inner classes. Another usefull feature of Java.
    - No security model. Yet another feature that they forgot to implement. I guess you are stuck with whatever ActiveX does for you.
    - No templates. Java developers have been screaming for this feature and several third party variants of Java exist providing this highly usefull feature. It is lacking in C#.
    - Single inheritance. Glad to see that they adopted this limitation.
    - Transparent use of COM objects. I suppose that is usefull but what about CORBA or JavaBeans?
    - destructors, C++ syntax but Java semantics (i.e. finalize).
    - No preprocessor. Apart from memory management, the preprocessor is probably the largest source of maintenance headaches so Yay!

    Compelling reasons not to use C#:
    - you gain little or nothing if moving from VB
    - you loose a lot if moving from either Java or C++
    - All C# objects are com components, so they are usable from outside C#. Why bother using it then?
    - Vendor lock in. Do I need to explain this?
    - Immaturity of language. If Java is a good example of how fast language adoption goes. It will take several years for C# get mature.
    - It does not address the needs of Java users, C++ users or VB users.
    - It does not contain anything you can't find in another language.

    I sincerely hope this will die quickly. I know that MS can do better. I'm waiting for news on their intentional programming project for instance. This looks like it was implemented by their marketing department.

    --

    Jilles
  130. Re:They said it's not a Java copy, anyone believe by spectecjr · · Score: 4

    Just after looking at this document I just wonder why it's called C# and not Java# because it's seem just about the same except for the "runs only on Windows platform" thing.

    Java doesn't let you use primitives (int, short, etc) as classes without wrapping them yourself (lots of overhead).

    C# does.

    Java doesn't let you drop down to native code and turn off the garbage collector if you need to. Or use pointers if you want to talk to the underlying C-based OS.

    C# does.

    Java doesn't have a "foreach" statement.

    C# does.

    Java doesn't have property-handlers (eg. write functions that are treated as member variables - eg:

    a.setName("MyName") would become: a.Name = "MyName" - but it would still go through a function.

    These are great for encapsulation. C# has it - Java doesn't.

    Java doesn't have any versioning mechanism (other than the woefully inadequate @deprecated tag.

    C# does.

    Java doesn't support indexers (methods on a class - say List, which allow you to take the object of type List, and use it like an array - eg:

    List l;
    l[index] = "asjdasid"

    C#, however, does.

    Need I continue?

    Simon

    --
    Coming soon - pyrogyra
  131. Re:As usual, the signal to noise ratio is pretty l by nellardo · · Score: 4
    Basically, C# is an attempt to combine the features of Java and C++.

    Combining C++ and Java does not strike me as an especially laudable goal. Mix up two Algol-family languages? Ugh.

    As for the rest of the stuff, it actually isn't so new at all. Self, developed at Stanford and Sun, did all of these starting in the late eighties.

    • Garbage collection - check. It was one of the first systems to use generational GC for high performance.
    • explicit pass by reference - everything is a reference in Self - if you want "pass by value" you make a copy of it (which is what the default way of invoking a method does).
    • initializing variables - since you make new objects in Self by copying ones you already have, everything is necessarily initialized.
    • Well, okay, not everything in Self is a COM object, but is pervasive use of COM necessarily a good thing? Interface negotiation is a major pain in the tuchas.
    • Even primitive types are objects in Self. And oh, you can change them, too. Don't like the way "if" statements work? Write your own, and replace the defaults, if you want.
    • As for forward declarations, well, things are so dynamic in Self, declarations are pretty pointless.

    Sounds like a monstrously slow language, doesn't it? It's not. Self is the language that pioneered JIT compilation, and ten years ago ran benchmarks at 50% the speed of optimized C while maintaining full debuggability, GC, arbitrary precision ints, checking for stack overflow and a whole host of other goodies.

    As for Java taking performance hits for bytecodes, keep in mind that JIT compilation can often produce better code than static compilation. JIT compilers can do all sorts of things that would fuddle offline compilers, like unrolling loops all the way to be perfectly flat. Takes memory - so what? We're throwing it out after a thousand iterations. Spend your time optimizing the code that actually is being used by observation in the field, rather than slogging through profiler output on test data.

    As always, look before you say something is new - someone may have done it before.

    --
    -----
    Klactovedestene!
  132. What a minute... by purefizz · · Score: 4

    Hey, you know I bet Sun is just shaking in their boots... yeah right. The biggest problem Microsoft has is defining any of these kind of standards right now it the same problem they had with Visual J++ and Visual C++. They are so Windows-centric that they forget about the importance of portability. Like MFC, and half the other shit they make which ends up stangling a developer to a particular platform. There's a reason Java will remain popular, and that's Sun's devotion to portability and stability.

    kicking some CAD is a good thing

  133. Platform by Dungeon+Dweller · · Score: 4

    "enables developers to quickly build a wide range of applications for the new Microsoft .NET platform"

    Ahh, so that's what it's for.
    It's sorta like, Visual C++ lets you make apps for Windows.

    This lets you develop for .NET.

    .NET, I certainly have mixed emotions about. As I do with this language... Most aren't positive, but at least the concepts seem to have their hearts in the right place.

    .NET almost seems like it is preparing for Linux to become more dominant, as it mentions "built-in support to turn any component into a Web service that can be invoked over the Internet-from any application running on any platform." "Which could have been said built-in support to turn any component into a Web service," were it not trying to leverage the image a certain way...

    Just a few thoughts.

    --
    Eh...
  134. Initialized variable != undeclared variable by IdoR · · Score: 4
    Variables you don't have to initialize aren't the same as variables you don't have to declare. Think Java or Visual Basic with "Option Explicit" - you have to declare your variables, but you don't have to initialize them (give them an initial value).

    Yes, it can hide bugs. But on the other hand, it hides bugs reproducibly - i.e. if your program unwittingly depends on a variable being initialized, it's bad code, but at least it's code that's guaranteed to work. It can't fail in some bizarre situation as with uninitialized variables.

    I still prefer the Java approach of having the compiler make sure there are no uninitialized locals (though sometimes it can bite back when you outsmart the compiler and it can't recognize a valid initializing situation). But note that global variables are guaranteed initialized - because Java can't make sure they're always initialized (that would entail a costly program-wide analysis), so it too sacrificies bug unmasking for guaranteed identical and correct exceution by initializing them all itself.

  135. C What? by blueg3 · · Score: 4

    Well, I haven't yet had time to read the C# info -- since it's nicely enclosed in a Windows executable, making it useless for we Mac folks. However, it seems to me that Microsoft is doing a good job of trying to alienate developers as much as possible. I still have no desire to pick up what seems to be a platform-specific version of Java, when I have the platform-independent Java -- which, I might add, seems to be gaining firmer ground.

    On that note, though (no pun indended)... What is to become of Java now that Microsoft has its own version? Certainly other operating systems will continue to support it, particularly Solaris and Mac OS X, but will Java support be dropped from later versions of Windows and how badly will this hurt the language?

  136. C# looks ok but... by XneznJuber · · Score: 4
    buzz has it around microsoft that the project may be going nowhere. even tho the whitepapers are just out, there are some people on the inside who say that it may not even make it into the next developer studio, with objective C taking it's place.

    Why objective C? The mac team at microsoft has been developing office, ie, etc for OSX for some time, and the higherups like the speed at which they are coming along. Obj C also has more tools for compiling cross platform, and MS is looking to take a lot of the same application apis and develop them on both NtT(2000) and OSX. Also, it looks like they are having some serious performance issues getting the C# compiler to spit out code that is clean on anything but a solid intel instrcution set. the optimizion sucks on alphas and ppcs, and there are even some strange little bugs that pop up when an app compiled on an pentium runs on an athlon and vice versa. This language has a long way to go, and given the alternatives, it looks like it make become like activeX. still there, but sucking balls and not doing anything useful.

  137. quick analysis by jetson123 · · Score: 5
    Here are my first impressions from looking at the document (I may have overlooked/misinterpreted a lot...). I use Java as the baseline for comparison:
    • garbage collection (like Java)
    • no multiple inheritance
    • no genericity/templates
    • IEEE compliance required (kind of like Java)
    • "delegates" (non-MS folks call them "bound methods")
    • by-value structures
    • "foreach" syntax
    • automatic boxing/unboxing (e.g., conversion between "int" and "java.lang.Integer")
    • true multidimensional arrays
    • multiple classes per source file
    • checked/unchecked statements for arithmetic
    • overloading of operator[]
    • get/set methods (methods that look like instance variables)
    • C-like conditional compilation but no macro substitution
    • "decimal" type
    • "finalizers" are (confusingly) called "destructors"
    • users can define "class attributes" (superfluous and unnecessarily complex; use static variables instead)
    • little support for reflection
    • no libraries
    • some support for call-by-reference (would have much rather had tuples/multiple return values)
    • apparent intent to support of untraced pointers minimally
    • unclear how it will connect to C/C++ APIs; this is clearly in their interest (Win32 APIs), but not well defined in their document
    • no mention of Java that I could see (certainly not in the references); coincidence?

    On the whole, Microsoft seems to have taken Java, added many of the things people were asking for, and called it C#. Barring any big blunders, it's not a bad language. It's "give the customer what they want", but whether that is prudent language design is another question.

    But, then, Java is evolving. And that's the crucial point: it's fairly easy to write a language description. It's much more difficult to implement it, work out the gotchas and bugs in it over years of practical use, and actually deliver a high performance, robust implementation with as many features as they stuffed into C#. Java may yet end up incorporating many of those features before C# even sees the light of day (if ever).

    What should Java take to heart from this list? My favorites are: by-value structures, foreach syntax, automatic boxed/unboxed conversions, true multidimensional arrays, multiple classes per source files, checked/unchecked arithmetic, get/set methods, and conditional compilation. I think Java also ought to get a generic tuple type. All of those could be implemented without any changes to the JVM (by-value structures would require a new class attribute to actually make a difference in terms of performance). In fact, there are a number of extended Java compilers that do just that.

    So, C# is a reasonable idea, but when it comes down to it, it's just like many other Microsoft "me too" announcements. Microsoft just can't seem to let anybody else define or lead an effort. But I don't think they'll be able to take over the world with this one. Java is pretty good, it's quite mature, and it's adding new features at a reasonable pace. Java will get most of C#'s features sooner or later, without changes to its VM. And Java has a big edge over C# when it comes to libraries. Even if Microsoft ever figures out technically how to hook up the Win32 API to C# (and doing that well is tricky), I doubt the result will be anywhere near as comfortable, complete, and safe as the Java APIs.

  138. Hello, Word in C# by JabberWokky · · Score: 5
    From the document (for review purposes only, as EVERYbody has Word, right?):

    Hello, world

    The canonical "Hello, world" program can be written as follows:

    using System;
    class Hello
    {
    static void Main() {
    Console.WriteLine("Hello, world");
    }
    }

    The source code for a C# program is typically stored in one or more text files with a file extension of .cs, as in hello.cs. Using the command-line compiler provided with Visual Studio, such a program can be compiled with the command line directive

    csc hello.cs

    which produces an executable program named hello.exe. The output of the program is:

    Hello, world

    Close examination of this program is illuminating:

    o The using System; directive references a namespace called System that is provided by the .NET class library. This namespace contains the Console class referred to in the Main method. Namespaces provide a hierarchical means of organizing the elements of a class library. A "using" directive enables unqualified use of the types that are members of the namespace. The "Hello, world" program uses Console.WriteLine as a shorthand for System.Console.WriteLine.

    o The Main method is a member of the class Hello. It has the static modifier, and so it is a method on the class Hello rather than on instances of this class.

    o The main entry point for a program - the method that is called to begin execution - is always a static method named Main.

    o The "Hello, world" output is produced through the use of a class library. The language does not itself provide a class library. Instead, it uses a common class library that is also used by languages such as Visual Basic and Visual C++.

    For C and C++ developers, it is interesting to note a few things that do not appear in the "Hello, world" program.

    o The program does not use a global method for Main. Methods and variables are not supported at the global level; such elements are always contained within type declarations (e.g., class and struct declarations).

    o The program does not use either "::" or "->" operators. The "::" is not an operator at all, and the "->" operator is used in only a small fraction of programs. The separator "." is used in compound names such as Console.WriteLine.

    o The program does not contain forward declarations. Forward declarations are never needed, as declaration order is not significant.

    o The program does not use #include to import program text. Dependencies among programs are handled symbolically rather than textually. This system eliminates barriers between programs written in different languages. For example, the Console class could be written in another language.

    [---]

    Looks like a bastard child of C and Pascal. A Borland influence, maybe?

    --
    Evan

    --
    "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
  139. Impressions from a Java Programmer by EvlG · · Score: 5

    I just read through the language reference, here's my impressions of C#.

    Being able to assign the get/set accessors for properties is a real plus. I always liked that about Delphi, and wished Java had a better way of doing that. The indexers are also neat. Nothing really revolutionary, but very useful.

    Having primitives "boxed" and "unboxed" in objects as needed is also neat. Save loads and loads of that Hashtable.put("number 1", Integer.parseInt(1)) type code that is just a pain in the ass, without sacrificing the performance of making everything an object all the time. I like that.

    I also like the foreach statement, as it does make the language a little more expressive (though nowhere near as expressive as Perl.) I like coding in Java all day, but the code is just so bland.

    However, there does seem to be a lot of stuff left over from C/C++ days that is sort of questionable. Like the inclusion of structs and enums. The potential performance benefits of structs are intriguing, but losing much of the OOP nature of your code is not attractive. Enums seem to clutter the language needlessly.

    Delegates are interesting, but it seems as if most of the functionality provided by them could also have been accomplished with use of interfaces. Curious however.

    I really dislike the whole notion of the unsafe code blocks, and getting around the garbage colelctor when you want to. Why not use hook in a native interface like JNI to allow that sort of code? Even more, since all oject are COM objects, and since you can pull in outside COM objects so easily, that would seem to be a good fit.

    The proliferation of modifiers and qualifiers for methos and classes and variables is quite confusing, but then I expected that, since MS has a heritage of that sort of thing in the Win32 API. Particularly odd is the "internal" modifier. I read it is meant to say "used by this project only." Huh? What happened to inheritance and the like?

    In the same vein, I don't fully understand the Attribute support, after several readings. It seems as if you could provide your own modifiers and such, sort of a hybrid interface, but they don't seem to document it much either. How odd. Has anyone made sense of this yet?

    The preprocessor can be useful sometimes, I agree, but in many cases it just clutters up the code. I'm somewhat disappointed to see this included. I felt Java's lack of preprocessor was a good step forward.

    All in all, it's an interesting language that ties together existing principles and cleans up some of the aspects in the process. But as expected, it's nothing new, and since it is trying desperately to hold on to the legions of Win32 C++ programmers, many concessions were made to old-school thinking at the expense of robustness and security.

    Anyone else have comments?

  140. Not a web language! Or worse... by Montressor · · Score: 5

    Well, at first glance this doesn't look like an internet language. It compiles into .exe files, and not into bytecodes or anything along those lines.
    Of course, this should mean that this is not an internet language, and is just another tool for desktop programs or Windows LANs.
    However, knowing MS, this is probably intended to compete with Java despite native compilation. I can even see how that might succeed, in the still-Windows-dominated Internet user environment. This, of course, allows all sorts of brutally bad secuirty holes (native code? hello? anyone home?)
    Overall, the language seems to be a cheap replica of Java with some of the statements renamed and a different class set.

  141. C# is not ActiveX by First+Person · · Score: 5

    Your chronology is incorrect. Active X, the successor to OLE (Object Linking and Embedding), was announced several years before Java. The original purpose was to extend VBXs (Visual Basic Extensions) to other tools. OLE 2.0 was later merged with it. Eventually,ActiveX became "just a marketing term for a collection of technologies" according to Microsoft.

    Java was designed for embedded systems (I believe). When the internet came along, it was only an internal project at Sun. Quite a few changes later, the Internet language we think of today was developed.

    Given that Java was only half implemented, turning it into an 'internet' technology was easy. ActiveX was designed with entirely different assumptions in mind and couldn't make the leap. Don't assume that C# will follow the same path!

    --
    Given one hour to live, the student replied: "I'd spend it with professor FP who can make an hour seem like a lifetime."
  142. As usual, the signal to noise ratio is pretty low by ericfitz · · Score: 5
    I actually read the intro doc this morning.

    Basically, C# is an attempt to combine the features of Java and C++. C# is fully object-oriented (there are no function definitions except as methods) language with many features to make complex programming easier and faster (a la Java).

    However, unlike Java, C# compiles to machine code, not byte code. Therefore C# programs do not take the performance hit that Java programs do.

    Some interesting features:

    automatic garbage collection (can be overridden with the "unsafe" keyword)

    explicit pass-by-reference

    variables must be initialized before use

    every object is a COM object

    even primitive types (int, etc.) are objects and methods can be applied to them

    no forward declarations

    So, it actually IS something new, and (IMO), actually pretty interesting. Now what we really need is GC#, and we may get it, since it was submitted to a standards body.

  143. I've broken the code! by MostlyHarmless · · Score: 5

    Thank you for all of your great work in selecting those quotes. You've picked just the right ones that by taking the first word of each, I can decipher their true strategy:

    "Embraces emerging Web programming standards"

    "Extensive interoperability" (Read: "Extends interoperability"

    "Eliminates costly programming errors"

    Read the first word of every line... Embrace, Extend, Eliminate! Devious, huh?

    --
    Friends don't let friends misuse the subjunctive.
  144. Wacky stuff by Chairboy · · Score: 5
    Here are some of my favorite excerpts:

    "Eliminates costly programming errors"
    What's this, has Microsoft legislated good programming? Like the old saying goes, 'When a programming language is created that allows programmers to program in simple english, it will be discovered that programmers can not speak english'.

    "Embraces emerging Web programming standards"
    Originally 'Creates^H^H^H^H^H^H^HInnovates^H^H^H^H^H^H^H^H^HE mbraces emerging web programming standards'

    "Extensive interoperability"
    Everything is a COM object, so EVERYTHING can now be used by malicious ActiveX critters to cause new and improved and more effective destruction!

    Read it for what it is, a Microsoft.NET vehicle.

  145. The collective speaks by Temporal · · Score: 5

    You think I mean the Microsoft collective, don't you? No, I mean the Slashdot/Open Source collective. It seems that most of the people on Slashdot act as one combine collective intelligence, with just as much predudice and non-intelligence as a single person.

    As one would expect, almost all of the high-scoring posts here are extremely negative, because the collective holds the opinion that Microsoft can not possibly create something good. Though some of these posts are correct, many are completely wrong. One score 5 post said nothing except that C# allowed implicit variable defining, and that this was bad. C# does not allow any such thing.

    Anyone who is looking for an honest opinion of C# should not look here.

    BTW, I am not a Microsoft supporter. I use Linux. I am not saying that C# is necessarily good, but it is no where near as bad as everyone here seems to think.

    Go ahead, mod me down. I have karma to spare.

    ------

  146. ok, Good & Bad "features" by Deadbolt · · Score: 5

    the following is from a reasonably serious Java developer's point of view:

    Obviously this is a Java ripoff. That does not make it bad; in fact, if a language copies the good ideas in Java, that makes the new language good. In my *really* quick glance through the white papers, the best thing they've added are the new things that C# interfaces can define, like events and variables. Java interfaces don't have assertions, and sometimes those are really nice to have.

    Bad things:

    • Combining pointers/gc. Are they INSANE? One or the other! How does the gc know when a user-created pointer is out of scope? How does the user free a pointer? By using something like malloc() and free(), right? So who's managing what? Do I collect my own pointers, leave them alone, or trust the gc to ALWAYS pick them up? Remember, Java makes no guarantees about WHEN an object is gc'd or even on which gc pass. It might hang around for two or three runs before the memory is needed. So very bad, this. What's the point of a gc if you have pointers?
    • Everything is a COM object. Oh good, another language to spread viruses with! Just compile your C# program making heavy use of native calls (ANOTHER idiotic idea) and pointers, pass it around as a COM, and boom! No language designer is this stupid. It HAS to be malice on the part of MS.
    • You can of course forget about running this on Mac or Un*x. If it's in Visual Studio, they're not gonna give a damn about where else it runs as long as they own 95% of the systems it CAN run on.

    Speaking of Java itself, wanna bet that Microsoft deep-sixes J++ and discontinues its VM now that it has this, "suggesting" that new developers move to C#?

    <spit> Lousy bastards. Would love to have those interfaces in Java, though. :)

    --
    "Honey, it's not working out; I think we should make our relationship open-source."
  147. don't rule it out quite yet by earache · · Score: 5
    The main man behind C# is the original architect behind Borland's Delphi.

    Here's an article from the other architect of delphi on the guy.

    He was also the guy behind the WFC for java that started the lawsuit rolling between microsoft and sun.

  148. C# by Fugly · · Score: 5

    My god! Do they know what the key signature for that looks like?!? No WAY I'm playing in a key with 8 sharps.

  149. I play piano... by AntiPasto · · Score: 5
    or ummm... so I tell the ladies... but if I'm not mistaken, going from C to C# is the jaws theme ain't it? Ya know... when something's creeping towards the naked lady in the water? ;)

    ----

  150. This is great! by SuperBigGulp · · Score: 5

    I can write in a language that doesn't really exist for a platform (.net) we may never see. Fortunately, I can use a vapor-protocol (SOAP) to communicate between these non-existent apps. I hope that MS will come up with some even-more-proprietary extensions so I can hook it all up to my Cairo-based BizTalk server.

    --
    Someday a Slashdot ID of 177180 will mean something.
  151. Re:Sounds like another worthless M$ language to me by java_sucks · · Score: 5

    Innovations aside, here's what scares me the most:

    Variables in C# are automatically initialized by the environment.

    Uh...does this mean they have a little paper clip drop down and say "Looks like you forgot to initialize your variable...don't worry..I'll assign it to ..uh...27"