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?"
I am not a history buff, but afaik anyone can...and always could...go buy the book "Object Oriented Programming: A Evolutionary Approach" in which Brad Cox defines the language.....
I have never read it, but Cox is comonly sighted as ObjC's inventor and that being the book were he published his idea for a new language.
So, what is so 'closed' about that?
You seem to have that kind of relationship with the truth where you would pass each other at a party, nod and say "Hello", and then quickly scurry away because you couldn't remember each other's name. 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".
You then write: Java doesn't have a "foreach" statement.
Foreach was intentionally left out of Java. I can understand that you might not be able to grasp why (it seems that you have your share of mental deficirncies), but do you honestly think all of the designers of Java had never programmed in C or any language with foreach ?
You also write: a doesn't support indexers (methods on a class - say List, which allow you to take the object of type List, and use.
Again this is intentional on the part of Java designers. Strong typing is a good thing. In some ways, Java would be a better language if it went even further. C# isn't as strongly typed as Java because it was more influenced by C.
I had the PDF of the Java Langauge Reference emailed to me after it was posted to a mailing list.Then MS had to "exe" the darn thing. Well what can I say it is after all MS. Some interesting parts of the spec:
1. They have the concept of structs. Similar to classes with no inheritance and passed by copy.
2. They have added GOTO.
3. They support blocks of unsafe code. You put the keyword modifier unsafe to a method or block and can do pointer manipulations.
4. They support a preprocessor. Only simple boolean #defines, #, no macros.
5. Methods are non virtual by default, it seems, there is a virtual keyword to change their behavior.
6. They support defining the [] operator, indexers they call them.
7. The language has built in notion of eventhandlers, delegates, and properties (seems target to GUI building, could be used else where).
8. And more. If anyone could make the PDF available somehow... it would be nice, but I can't.
Snoop Baron
Can I just say a third arm would be very cool! Two for the kbd, one for the mouse. I would tear it up in Quake!
- taxi - "My friends and I hailed a couple of taxii at the airport and got a lift to the hotel"
- Burundi - "The African nation of Eritrea recently changed its name to Burundi, so now there are two Burundii in Africa"
- tie - "Revamped dress code standards at work forced me to pick up a couple of new pin-striped tii at The Gap"
- Gemini - "My girlfriend and I were both born in early June
.. hoo, boy, you won't believe the shenanigans when you put two Geminii together"
- Milli Vanilli - "I read on Aint-It-Cool-News that both Backstreet Boys and N'Sync actually lip sync their music! Criminy, that's all we need
.. another couple of Millii Vanillii"
I'm sure there are many, many more.Wouldn't the other's do as well?
Other's what? Other's language? Who is the "other" you're referring to here? Since you are using an apostrophe you are obviously using the word "other" in a possessive sense, yet nowhere do you delineate who you are speaking of. Obviously you did not mean "wouldn't the others do just as well", because Slashdot readers are impervious to such egregious lapses of grammar.
This Grammar-Nazi flame has been brought to you by CRIPPLED CHILDREN'S FUND
Because it's something I've found I rarely need to use.
As for your other points, could you elaborate on why you think C++'s solutions are not good? Are you saying that C++ DOESN'T have generics or strong type checking? I think that all depends on your point of view.
I will probably agree with you. I don't consider C++ a panacea, but I do think it's much less limiting than Java, which imposes far more constraints than C++. I don't think Java offers the tools I need for a large-scale OO project. I have not worked on such a project using Java, but I suspect that many of the small things I dislike about the language would become more pronounced with the size of the project.
No. Templates in C++ offer way more power than inheritance does. First of all, they're type safe, as TummyX pointed out. Secondly, they provide compile-time polymorphism, whereas inheritance only provides runtime polymorphism. Thirdly, C++ has features like specialization and function templates, which can be quite useful. The real power of templates in C++ is seen when you combine them with the other features of the language like operator overloading, but even still, Java would be a better language with C++-like function and class templates I think.
In Java, the extent of the "generic programming" that you can do is writing container classes for Object's. This is nothing special, and really no different from being able to write containers for void*'s in C or C++. You still have to use casts all over the place, which is one thing I find disgusting about Java. I've only ever needed to use a cast in a real C++ program (that excludes CS assignments, and other crappy code that I mostly just hack together) about once in a blue moon, like when using the double dispatch pattern, or some other exotic design pattern.
It is so much better to be able to pass, say, a comparison function as a template argument, and have it be type safe and allows you to pass in anything that operator() can be applied to. But in Java, you would have to define an interface that declares a comparison functions - and if there's no standard comparison function, multiple pieces of code may all define their own interfaces - and implement it. Then the objects to be compared have to be cast to Object, passed to the function, and cast back to their original types. Not only can this be unsafe, but it's extremely tedious, and not even what I would consider a reusable design. The fact that Java doesn't provide a compile-time code reuse mechanism like templates is one of the reasons I really dislike it as a language.
I can appreciate the logic behind a language that's simpler and cleaner than C++, but if you're going to eliminate features like templates and operator overloading, you should provide some other way to allow programmers to achieve the same level of reusability, and I don't think Java does that. If I wanted a more simple and pure OO language than C++, I'd choose Smalltalk long before I'd choose Java. Back to the topic at hand though, I find C# to be a lot like Object Pascal/Delphi as well as Java. Maybe it's just the syntactic sugar like properties that's making me think that (but you can see Anders Hejlsberg's influence right away in that feature). I think, like Java, it will be a decent language for someone to use as their first OO language - I first learned Object Pascal myself - and for programmers who are likely to get bogged down by the complexity of C++ or want the features like type safety that Smalltalk lacks. But like Java, I don't really consider it a multi-purpose OO language, or at least not a very complete one because of the lack of features for facilitating code reuse.
Well, you could also use CGI::Debug, which will solve most problems you'll encounter. Or, if you can't install it for some reason, put this at the top of your file:
This will cause all warnings emitted (ie., what -w turns on) to be injected into STDOUT as HTML comments. This will not help if you get warnings before you print the HTTP header, but it works for most runtime stuff.
Look how well _it_ did.
- A.P.
--
"One World, one Web, one Program" - Microsoft promotional ad
"Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
I guess they decided that having their own language libraries and extensions wasn't good enough and they had to have their own entire language. Based off of the bad parts of existing languages of course...
.exes under linux anyway. Well, I suppose I could use wine or vmware, but that would indicate that I actually *care* about MS's attempts to subvert programming languages...
Not that I care of course, as I can't run
I particularily enjoy the part about how it eliminates programming errors though... that sort of relates to one of my favorite quotes from Larry Christensen:
"Perl wasn't designed to stop you from doing stupid things because that would prevent you from doing clever things".
I will admit, though, brass choirs kick ass, and this is one of the reasons why. Although Canadian Brass's rendition of "Flight of the Tuba Bee" is impressive for entirely different reasons....
My how we've strayed off-topic. Good thing the moderators don't usually get this deep into a thread.
--
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
Where do these extra sharps and flats keep coming from? Db-major has five flats, not six.
Just like Microsoft, though, to embrace and extend the four-tire standard and ship a car with six tires, none of which work properly.
--
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
Can't AppleWorks or WordPerfect read it? Of course there's always Office '98...
--
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
I know C++ is pronounced "See, Plus, Plus", but do we pronounce C# "See Numbersign"?
Or worse..."See Hash". I think this would be the proper pronounciation for us...
ttyl
Farrell
CAN-CON 2019 - Ottawa's only book oriented Science Fiction Convention! October 18-20, Sheraton Hotel, Ottawa, Canada h
Posted by 11223:
Corel put up WordPerfect for Mac as a free download on their web site. AbiWord also reads the intro to C# document, but coredumps on the reference (at least on my system).
Posted by 11223:
I haven't seen anything on this in their docs, but having every object be a COM object doesn't have to be high overhead - instead, you can use a tuned COM server such that objects get turned into COM objects the first time they're asked for.
The other reason code is usually not compiled like this is the dynamic nature of java - you cannot always be guaranteed that the classes a program uses are being allocated statically (i.e. that they aren't passing the class name as a string to the class loader to start them).
I personally have made many simple factories which return random objects supporting a certain interface, which were created solely by a name lookup in a hash table.
For instances like this, you really hurt trying to use a binary code compiler. Under some circumstances you can gather up all the code and say 'ok, you *will* be using all of this, so compile it.', in others you simply do not know what the classes you are executing are until runtime. For this reason a native binary compiler can never be fully java compliant, unless it also runs java code as well.
Dude, that isn't Pure Java!
you don't hard-code DOS file paths, sheesh
unzip clangref.exe
catdoc clangref.doc | less
The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...
A variable must be definitely assigned before its value can be obtained. The example
...
class Test
{
static void Main() {
int a;
int b = 1;
int c = a + b;
}
}
is invalid because it attempts to use the variable a before it is assigned a value
-- Too lazy to get a lower UID.
I think this is slightly different. Just because initialization of the variable is automatic, doesn't mean it is declared automatically like in Perl/VeeBee.
This is simply saying that when you declare
i will be filled autmatically with a known value.This doesn't mean that I can then say
without first declaring undeclaredVar.Nice feature, it should solve a few simple proofreading errors, but no reason to go swapping languages.
Actually, you're right.
C# == type foo.tpw | p2c
(or, for the prompt-impaired people out there, C# looks like a Borland Turbo Pascal for Windows program run through a Pascal-to-C translator...)
Gosh. The worst of Delphi, Visual C++, and Java.
What will they innovate next, guys?
---
pb Reply or e-mail; don't vaguely moderate.
pb Reply or e-mail; don't vaguely moderate.
Some of us feel that we can at least trust Sun a _little_ bit. I think the majority here will agree with my opinion of Microsoft however - I wouldn't trust Bill Gates & Co. any further than I could throw them. Knowing their past exploits in the world of computer software, we're just waiting to see Microsoft's next move.
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
At least with Perl, you have the '-w' switch, so you can check for stuff like that. Does C# have the same - why, I think not...
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
Oh really? I used 'unzip' and ApplixWare, and I can read it just fine. Not that I really care about it that much, but it _does_ work...
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
<sarc>Wow! Talk about innovation! Maybe they can have an innovative way of turning it off, too.. something like IMPLICIT NONE </sarc>
Great. A ripped-off Java with features that they even knew were bad ideas in FORTRAN 77. Truly, MicroSoft, you are a forward-thinking innovator.
>Remember ActiveX? That was supposed to kill Java too.
>Look how well _it_ did.
Oh come on. ActiveX is a nice script kiddie hacking tool....
>Looks this may be a windows only tool, sad to say. I should have
>guessed that MS would do something like this. Creating a language
>standard then patenting it, I think that would put a crimp in any
>competition in the compiler market..
Of course this may be a windows only tool. Who's going to waste their time trying port this Microsoft-insprired crap to a non-Windows plaform? The inherent virus risk to other platforms alone makes porting not worth the hassle.
>"enables developers to quickly build a wide range of applications for .NET platform"
>the new Microsoft
>Ahh, so that's what it's for.
>It's sorta like, Visual C++ lets you make apps for Windows.
Yep. The Script Kiddies and Wannbe Crackers are going to have a field day with this stuff.
Can't you just see the apps floating around on M$.NET asking for subscription info and other goodies?
>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.
You'll be singing a diffrent song when the Script Kiddies nail you and your servers with a virus created with C#.....
They now have their own language and drop that Visual Basic crap from their applications.
Windows needs system-wide standard scripting language, and needs replacement for WordBasic, AccessBasic and other crap like this. If it's C#, be it C#, at least hopefully it will have understandable syntax and usable libraries.
-- Si hoc legere scis nimium eruditionis habes.
In Microsoft's JVM, every Java object is a COM object that automatically implements at least IUnknown and IDispatch, and can automatically implement several other interfaces... and they had one of the faster implementations until IBM came out with their JDK..
-Stu
no, not really. I can't back that up.
-------------
Really, I think a whole BUTTLOAD of Mac lovers out there (myself included) would just LOVE to see any supporting documentation that MS is working on Obj C. Even if it's from MacOSRumors.
If it ain't broke, fix it 'til it is!
These are my friends, See how they glisten. See this one shine, how he smiles in the light.
"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. "
I would suggest a language that makes multi-threading one of it's selling points should ship with mutexes, semaphores and events as part of its class library. I don't know how you would nicely guarantee an unlock occurs without resorting to try/finally... which I guess is the strong point of the synchronised method modifier.
And comparing COM v. CORBA is the most mismatched comparison I've ever seen. Try DCOM, which is just as much a monstrosity.
COM, DCOM, the same thing really. DCOM is the same as COM, except you have to start worrying about marshingly the damn interface pointers of all things, and other similar crap.
You mean:
- jon
Ganymede, a GPL'ed metadirectory for UNIX
Heheheheh.
Oh, wait, were you serious?
Microsoft has developed a way to write code that addresses the platform in a more direct fashion than Java supports. Bully for them, but Java has those portable characteristics by design, and many of us who program in Java chose it for those reasons.
I haven't read the pdf docs yet, but C# sounds like something very nice for Windows programmers, and something that might allow them to develop for Windows 2k and Windows CE conveniently, and maybe even something that companies with financial relationships with Microsoft will incorporate into their embedded products, but it doesn't sound like something that will chase Java from the market place.
Now, it may put pressure on Sun to rethink their objection to "standardization", but in fact Sun has already done quite a bit to open up their platform. C and C++ needed standardization because their were many, many incompatible implementations and there were features that people felt needed to be added into those languages in a way that would be supported by all the compiler vendors. Java is already standardized due to Sun's investment in the Java Language Specification and through their strict quality control and test suite.
Hm, bit of a digression. Anyway it will be interesting to see how C# does, and whether it really does get use on, say, Linux.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
Actually, VMS had a quite decent X11 implementation on it, and all our Vaxstations had graphical logins. It had nothing decent like the Windows Explorer, Finder, Workplace Shell or Gnome/KDE, but then neither did any UNIX other than NeXT until recently.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
The reason that you can't do a=a+i in Java is that Integers (and Shorts, Longs, Doubles, etc.) were defined to be immutable to provide thread safety.
Remember, Java passes objects by reference, not by value. Having Integer be immutable guarantees that if once you pass an Integer to a method call, that method won't have to worry about the Integer having its value changed in midstream. Otherwise, you could wrap a call to a method that does some kind of sandbox operation in a new Thread() and then possibly change the parameter after the method had verified that the Integer was in an acceptable range.
In general, Java trades not only portability but also and especially security for performance.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
Do you have a reference to Mr. Stroustrup's commendation?
- jon
Ganymede, a GPL'ed metadirectory for UNIX
Java's applet support was one of the strongest reasons why we wrote Ganymede in Java. I have dozens of users running the Ganymede client applet every day, no problem whatsoever.
Of course, the trick is that those users are required to have the Java 1.2/1.3 plug-in installed on their Windows system so that they can use a full featured applet with Swing and RMI and the rest, or they have to run the applet from a UNIX command line.
In Java, you can actually make a single program that can be run as an application without the sandbox limits, or as an applet with. In Java 1.2/1.3, you can even set sandbox limits on applications or loosen them on applets, with the right configuration set-up and digital signatures.
Java applets make perfectly fine clients for Java servers.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
Yeah.. Sun was extremely ambitious in their plans for Swing, and it just isn't all there yet, performance-wise. They are planning on making major improvements to the rendering pipeline for Java2d in Java 1.4 (oh, excuse me, Java 2 Standard Edition Version 1.4 ).
- jon
Ganymede, a GPL'ed metadirectory for UNIX
Poorly written Java programs end up locking more than necessary, yes. But 'synchronized' is simply Java syntax for Tony Hoare's monitor synchronization primitive, and it is super easy to build whatever sort of lock or semaphore structure you want out of monitors.
The fact that you can put synchronized on any method of any class is nice because you can easily ensure that a given object is thread safe, but when you've got a large system you really do need to use semaphores and the like to avoid getting into nested monitor deadlike and all of that.
If you're interested in multithreaded programming in Java, run do not walk to your local book seller and pick up Doug Lea's Concurrent Programming in Java
.- jon
Ganymede, a GPL'ed metadirectory for UNIX
Well, from reading over the C# docs, I have to say that C# is simply not equivalent to Java. It looks like Microsoft has done some good work on it, but the language is less revolutionary than Java was, and seems less refined in terms of language definition, portability, and security.
It's nice that they have included threading and garbage collection in the language, but this feels a lot more like a Delphi class language than a Java class language/environment. Maybe Microsoft will flesh out a lot more details than they have so far, but right now it just seems like a nice little language that will be more comfortable to program in than C.
It does seem that C# will be a much better systems programming language than Java, of course, and Microsoft deserves praise for that.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
I made a mistake in my response.. while what I said was perfectly true as far as it went, a=a+i would result in a new Integer object being assigned to a, so that wouldn't break thread safety. Integer's immutability would rule out something like "a++;" if it didn't have the same reassignment semantics of "a=a+i".
The fact that you couldn't truly treat an Integer like an int for unary operators is a good argument from trying to treat it like an int for binary operators, but the fact is that James Gosling ruled out operator overloading as a simplification for the programmer's sake, to make code easier to read and less ambiguous. That's the same reason why Java doesn't do the implicit type conversions for objects that C++ can do. You can argue that the simplification hurt more than it helped, but Java programming really does benefit from Java being a simpler, more easy to understand language than C++, and I don't fault Gosling for leaving well enough alone as far as operator overloading.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
And the funky Javascript bugs?
I wasn't real happy about dropping NS, but (a) I'm not mgmt, and (b) it is indeed a PITA.
I don't believe we're pressuring our customers. As far as I know, they're already all using IE anyway and there is no pressure to support NS. When we dropped NS, we worried about losing sales, but I don't think it's happened yet. (But I'm not on the sales/support side.)
Portability, shmortability. The startup I work for is developing an ASP kinda thingy using JSPs (with Javascrpt :( ) and Java servlets running on Allaire JRun/IIS and targetting only IE (because NS is just too damn buggy). We supported NS until recently. Our mgmt pays lip service to portability and adherence to standards, but the truth is, we'll probably never leave MS-Windows. I suspect the same is true of any other shop that has started development on Windows. I don't think many places actually move their software to a different architecture, they just leave the legacy stuff where it is, develop new functionality on new platforms and use something like CORBA or XML to bridge back to the old stuff, unmoved. I think MS knows this dynamic, so their primary goal is to force or strongly influence decision makers onto the Windows platform, where they'll stay, once planted. Putting extensions into their servers that work w/hooks in the browser is the way to do this.
I agree w/your other points that Sun's standardization is ok (for the time being) and that discussion of Sun's standardization is a digression from the topic at hand. :)
John.
Well, I don't know much, but....
We know by now that the quality of the mousetrap is irrelevant. MS will put the C# VM in IE while leaving the JVM (increasingly back-rev) an "optional" component. As soon as the C# engine is available on millions of desktops, mgmt will begin saying "Why don't we develop for C#? After all, everybody has it now." Seasoned Java developers will grit their teeth and resist, but it will be futile.
Meanwhile, Al Gore, having run a totally lackluster campaign (and having split the vote w/Nader) will lose to Dubya in a landslide. Dubya's DOJ will promptly drop the lawsuit against MS as "without merit". MS knows this now, that's why they're making no contingency plans for a breakup.
So, there we'll be: C# on the One True Browser, Java fighting valiantly (presumably more valiantly than OS/2) but losing nonetheless. Then, of course, MS will be free to extend their browser monopoly onto the server, finally dislodging the Linux/Apache combo that's been irritating them for so long.
How to resist? In no particular order:
Duh. All of this being blindingly obvious, of course. None of it having anything to do w/the merits of C# over Java.
Actually, come to think of it, I'd prefer Haskell to become popular.
John.
under this scheme, i'm basically in theory writing my code in c# on a linux machine to run on windows. but i won't be able to test my code on the box that i coded it on. it's like unnecessary cross-compiling. it's stupid. until i see virtual machine specifications for as many platforms that java has them on (there won't be), i'm not going to lose sleep.
--
J Perry Fecteau, 5-time Mr. Internet
Ejercisio Perfecto: from Geek to GOD in WEEKS!
--
And Justice for None
a.setName("MyName") would become: a.Name = "MyName" - but it would still go through a function.
ummm.... ever heard of a bean?
--
J Perry Fecteau, 5-time Mr. Internet
Ejercisio Perfecto: from Geek to GOD in WEEKS!
--
And Justice for None
MS loves VMs. Pobably would love a universal VM for all languages, on all platforms. Might even make CE gizmos useful as clients in COM-based multi-tier apps. Or will the Common Runtime do the equivalent through JIT?
One of nice things about Java, is that it does not try to exist without classes. Yes automatic unboxing and boxing of primitives gives the appearance of a very minimal set of classes, but it will be intersting to see where this boundary actually ends up for C#.
I wrote parts of this stuff
Skimmed the manual, no mention of class-library specifics in the manual. Which begs the question: does the language attempt to be useful without a class library? Or is it, in all practical respects, dependent on a class library. And will that class library be very WFC like, plus some Java-oid base classes? Inquiring minds want to know!
I wrote parts of this stuff
However it seems there are cleaner methods of doing this. One simple one is to require an initialization value. I.e "int i" is an illegal statement, but "int i = 0" is legal.
Another alternative is to have compilation fail. Every C compiler I know of has the ability to warn about the use of an uninitialized variable.
The plural of "Nazi" is "Nazis," not "Nazi's."
I don't make the rules. I just make fun of them.
Why is the documentation in EXE files? That's the stupidest thing I've seen all day.
Software sucks. Open Source sucks less.
Not only normal macros, but hygienic macros!
1) How do you know that how C# does it doesn't impose more overhead than doing the wrapping in Java?
2) Grr. Messy. Java feels a bit 'sterile' sometimes to program in, but that's one thing that makes it so nice. You can always figure out what should happen, except where ambiguity is explicitly specified (as in garbage collection policy).
3) Granted, this would be nice. However, this is better (more OOishly, IMHO) handled with Iterators/Enumerations/whatever.
4) This might be handy, but would create some potentially serious ambiguity. You can't tell just by looking at code what is happening, which is bad. Granted, it could be seen as a type of information (or, in this case, functionality) encapsulation, however, there's no way to write something that isn't ambiguous whereas in Java if you write that you _know_ nothing weird is going on.
5) I didn't take a look at the doc yet, but if this is useful, then it would be nice. Could be added easily to other languages though.
6) Again, this creates syntax ambiguity. It will look nicer, but will make it more difficult to understand what is going on. What about an array of 'indexer enabled' (or whatever the term would be)? THAT would be messy.
Now, all I'm saying here is that I'd rather use Java than C#.
Nowadays, COM's overhead is swallowed up by the OS anyway, so it's not as killer as it looks. And I certainly hope that MS optimizes internal or private classes out of COM and into the runtime.
And declarations are resolved symbolically.
Every day we're standing in a wind tunnel
Facing down the future coming fast - Rush
This sig intentionally left blank.
Actually, the fixed(var){} function locks the memory away from GC. unsafe defines the security of the method interface. If I'm reading the example right.
Every day we're standing in a wind tunnel
Facing down the future coming fast - Rush
This sig intentionally left blank.
Uhhm, no. If you use Outlook, it is enough to open the message.
Also, you can't just double click on a java class to run it (even on windows). You need to save it to a directory, and then type in the command with the right classpath and the class name.
___
___
If you think big enough, you'll never have to do it.
But don't forget that the main guy behind the original NT architecture was Dave Cutler, a VAX guy. According to the original spec, NT was supposed to be a solid system with no GUI in the kernel, no "DirectX" crap in the kernel, no IIS in the kernel. It was also supposed to be microkernel-based with enough hardware abstraction to make porting easy. etc.
Look where NT is now. Bloated, buggy, unstable, insecure, and as of Windoze 2000 it runs on only 1 platform - x86. So much for the spec. You just can't make a good product when markedroids are involved in the design.
___
___
If you think big enough, you'll never have to do it.
First of all IIS does run in the kernel (at least part of it). Second, users didn't have any say over what to put in the kernel or not. Perhaps the reliability hit is acceptable for a workstation, but please explain me why would you want to run GUI in the kernel on a *server*? Or, even better, why would you want to run GUI at all?
As for no one wants a ported version of Windows 2000, that's only part of the story. NT 4 used to run on MIPS, Alpha and PowerPC. SGI ported it to MIPS, Digital ported it to Alpha, and I don't remember who ported it to PowerPC. But anyway, Microsoft had no intention of porting it. Digital (now Compaq) was the last company to say "we will no longer port your OS to our hardware for you" and Microsoft immediately killed all future plans for NT on Alpha, and made it out as though it was Compaq's fault.
___
___
If you think big enough, you'll never have to do it.
You are either a troll or are really that ignorant. Java applets do not have full access to the OS. In fact they do not have access to the file system period. You can read/write files only if you compile the Java code as an application, but than you can't run it in a browser. Oh, and since you have no pointers at all, you never have direct access to memory either.
___
___
If you think big enough, you'll never have to do it.
I was under impression that Java doesn't need templates because every object is automatically derived from the Object class. So to implement a generic container class, all you need to do is implement it for Object. Correct me if I'm wrong.
___
___
If you think big enough, you'll never have to do it.
That's what I was wondering too. My jaw fell off when I first saw this "feature" on the list of changes. Why did Linux devevlopers feel compelled to copy Microsoft by trading reliability for a little speed increase? The only consolation is that you can un-compile khttpd, so that you don't have a web server sitting in your kernel. Can't do it with IIS though, so NT boxes are always stuck with a web server in the kernel.
___
___
If you think big enough, you'll never have to do it.
And what's the point of that? You cannot run this code as an applet, so you cannot embed it in an email and send it to people. You can with VBscript, ActiveX, and from the looks of things C-hash as well.
.class. But then you need to explicitely run it yourself using the JVM. So you cannot write the Melissa/ILOVEYOU-style worms in Java.
This code above will work *only* if you compile it to a
___
___
If you think big enough, you'll never have to do it.
Isn't it a tad ironic? Here we have a language that's supposed to make it possible to write stuff that can be run anywhere, and you can't even read the spec on a non-Windows platform. (Well, of course you can if you hack around, but an .exe is pretty clueless.)
This doesn't help hash access.
$foo{bar} is just as valid as $foo{baar}. Also,
once we spent months chasing down a
$foo{query} which was supposed to be a $foo{$query} (no, we don't actually use foo in
variable names)
Engineering and the Ultimate
If you don't have WinZip, download it. What type of Windows developer are you if you can't decompress the most common Windows archives? EXE's should be avoided if possible - viruses, won't run on NT for Alpha, etc.
Wait a minute! The spec doc is an .exe file. I'm not opening any @^#%$ Microsoft .exe file.
Besides, I don't run Windows.
Transcript show: self sigs atRandom.
The missing fourth paragraph:
Sweeteners exist to support secondary goals of the language, or exist merely as afterthoughts for "programmer convenience" when using the meat and potatoes of the primary goals. Operator overloading in C++ supported a secondary goal of C++ -- allow objects to be syntactically utilized as if they were primitives. Inner classes in Java allow Objects to have support implementation pieces kept secure, or to have proxies serve as adapters to other subsystems; these could be done with external classes (and had been for the first generation of the language), therefore the addition was a sugar (more a gravy, actually, I'd say).
"But remember, most lynch mobs aren't this nice." (H.Simpson)
-- Joe
Productivity in "version 1" is nothing when maintainance costs (time taken to figure out what the fuck is going on with code you didn't write) outweigh initial version costs by a factor of 5 or more (Brooks talks numbers this high, so don't think i'm exagerating).
Perl and its sugar work best when the person/group who's writing the code are the only ones who touch it. Beyond that, you start hitting limits on how much of the sugars someone is willing to learn, and one group's essentials are another groups "avoid this at all costs".
Happens in C++ as well (especially since not all compilers are ISO compliant yet and each is missing different features), but Perl's syntax evolution has exagerated the effect.
"But remember, most lynch mobs aren't this nice." (H.Simpson)
-- Joe
Again, you miss the point. There's language features that are the primary goal of the language, and then there's language features that exist for "convenience" or to address secondary goals. "Class", "Private", "Public" directly support an implementation of Object-Oriented programming (and the encapsulation needed to be OO); these aren't sugars, they are essential to the language to get the primary goal (OO) achieved. Garbage collection is a primary goal of java.
The "+" operator on Strings is a convenience and therefore a sugar. It is in no way necessary to the primary goal of Java as an OO language.
"But remember, most lynch mobs aren't this nice." (H.Simpson)
-- Joe
From a compliler writer's point of view, C is incredibly simple. It was designed to be that way.
From a syntax point of view, Java is one of the simplest languages out there. The libraries on the other hand (because of the quantity and age) make things more difficult. Java also adds the complexity of multiple means of deployment (applet, servlet, jsp, bean that can be run from anywhere, EJB, now WebStart) is another factor that makes java complex...but again, that's a library and runtime factor, not a language factor.
Java has flexibility, and with flexibility comes complexity.
C# has some usage. It actually (given "everything is a COM object" may be better used not for writing applications, but for writing components with better speed and robustness over VB components, but can still be utilized in any COM system built in VC++ or VB.
"But remember, most lynch mobs aren't this nice." (H.Simpson)
-- Joe
Higher level languages exist because they allow something to be expressed in a way that is more readable and efficient than a lower level language, and this leads to more robust code.
When implementing said "something", with said language, you are generally worried about the meat and potatoes of the language -- what was it designed to make easier for me. The syntax of the language to implement the primary goal of the language becomes the "main course". C++ was designed to make OO easier for those who needed C compatability with legacy code. The syntax necessary for this raised the bar on what was "sugar" vs. "meat and potatoes". "class" is a main course in C++, not a sweetener. "private" and "public" are main course words in C++ and Java (security is part of encapsulation, a necessary feature of OO design).
Some sugars are strictly of the "hey, i can do this in fewer keystrokes in my language". Java has "+" defined for Strings. Perl has so many of these its almost impossible to read.
The property-handlers (and that isn't even good OO) and the use of [] seem to fit this category. (I reiterate -- when did "l.get(index)" become so hard to type?)
"Foreach" exists in C++ as part of STL. That it was left out of Java's collections was a MAJOR oversight, severely limiting the API for use in "Generic programming" without additional support from the programming (e.g., building a "foreach"). I really wish ObjectSpace continued to support JGL they way they claimed they would. It may have been larger, but like the C++ STL it modeled, it was VERY effective.
In any instance, it is (or would be) part of the library. But is "foreach" in C# part of the language or part of the library? If its part of the library, good; shows C# having better support for generic programming than Java. If its part of the language, then WHY? What good is it for the compiler to be responsible for something that is implemented in 2 lines of code within the language itself?
Primitives as classes -- well, how sugary that is depends on the programming model they expected them to be used in. That definitely seems to be there strictly to be a "well, this isn't java" feature, rather than having a practical purpose in mind. When the language is used more heavily, we'll see if it evolves into something useful.
Java had its reasons for pass-by-read-only-reference wrappers. Mostly these had to do with thread safety. I also find them to be useful in data integrity.
"But remember, most lynch mobs aren't this nice." (H.Simpson)
-- Joe
You'll still be able to get JVMs from third parties that will run under Windows. Unless "Windows ain't done 'til Java won't run"...
Just junk food for thought...
The KEY of C has no sharps or flats. This is different than the note C# though.
Too bad nobody remembers C* (see star). It was a great parallelized C extension for the Connection Machine. You just declare an array specially, and all the operations on it become parallelized across all the processing nodes! Sure beats MPI for ease of use.
Start Running Better Polls
this is probably intended to compete with Java despite native compilation.
Java already has that, if you want it... it's called gcc-java.
Microsoft innovates again? Naaah! MS probably have people who sincerely believe that if it's not EXE it won't run. Not so much "hello? hello?" as "hello? i love you.VBS" (-:
Got time? Spend some of it coding or testing
Eliminates costly programming errors
Probably supposed to say "Demonstrates costly programming errors".
Embraces emerging Web programming standards
Maybe they were distracted by Python. "Engulfs emerging Web programming standards" sounds more likely.
Extensive interoperability
With this one, they left out a word (in particular, "Destroys" at the front of the sentence). Or prehaps they meant "Expensive interoperability"?
Got time? Spend some of it coding or testing
Either install the crypto-zip extensions or install WinZip into WINE. Now, pull the .DOC out of the .EXE (self-extracting .ZIP), feed it to mswordview and stick it in your webserver.
...and think while you're doing that: this might also be possible with C# one day...
.DOC so that if the required binary wasn't present (-: maybe you ran it from a System/390 :-) then C# would compile one for you. Just In Tangle technology.
While you're there, why not feed a copy to MSWord and try the versioning options? You might find out a bit about the evolution of the spec. (-:
What does surprise me is that you can't compile C# straight out of an encrypted MSWord document. The Microsoft Way would then have you execute the
And one day someone will publish a cracker for the encryption, making it Microsoft's contribution to the Open Source movement...
Got time? Spend some of it coding or testing
On the 7th day, Bill was arrested.
"Microsoft has performed an illegal operation, and will be terminated." (-:
Got time? Spend some of it coding or testing
They add gotos for no reason.
No reason, my ass. Goto is there for the VB programmers.
Got time? Spend some of it coding or testing
...and then what? open the .doc file in emacs? I don't think he wanted a HTML or PDF because he didn't know how to open the zip/exe, but because he couldn't view the .doc file.
And, knowing Microsoft, they will fight that tooth and nail. They've already started with their silly .exe wrapped .doc file. I'm sure it had an egregiously bad clickthru license requiring Richard Stallman to go fuck himself, but I didn't really notice because I just used Linux unzip to extract the .doc file (which I then converted to html with mswordview.)
Looks like another transparent 'embrace, extend, and extinguish' attempt, with the victim this time being Java. Sure, it's not an answer to Java. Un-huh. Meanwhile I'll go back to my hacking under my freely-redistributable Java environment.
"C# is a modern, object-oriented language that enables programmers to quickly and easily build solutions for the Microsoft .NET platform."</I>
Hey!!!
Wait!!!! This sound so un-sharp to me...
We already have "SHARP" languajes...this will confuse people, so let's rename it...C^$ (C-Bloat)
So this C Bloat is just a new member in the large family of <B>bloated oriented</B> languajes brougth to us by microsoft.
Excellent replacement for C/C++ for writing high-level stuff. Not a replacement for Java IMO.
Good:
- override keyword
- changes to switch statement
- lots of stuff from Java
Unknown/Missing:
- "throws" keyword? It would be nice.
I hope there's a GCC frontent soon.
We heard this lameass CASH joke the first thousand times the first time this language was announced. Can we please give it a rest?
I've finally had it: until slashdot gets article moderation, I am not coming back.
bah. i guess either netscape doesn't render , or slashdot strips it out. The first paragraph was a cite.
I've finally had it: until slashdot gets article moderation, I am not coming back.
try using an inner class like the following to express enums. Works just fine
public class Student {
static public final class Car {
private Car() {}
static public final Olds = new Car();
static public final Chevy = new Car();
static public final Ford = new Car();
}
private Car car;
public Car getCar() { return car; }
public void setCar(Car c) { car = c; }
}
(You would want to add an id and over ride equals and hashCode if you are using serialization.)
Joe
Joe Batt Solid Design
- Delphi has had accessors (a.k.a. "REAL properties") since forever (i.e, as long as it has existed -- Delphi 1 went on sale in early 1995), and
- C-Crash was developed by Anders Hejlsberg, the erstwhile Chief Architect of Delphi and the most prominent of the developers Microsoft poached off Borland back in 1997 (or possibly -98?),
I'd say it's no big wonder that C-Hashhish has them too.Christian R. Conrad
MY opinions, not my employer's - Hedengren, Finland.
Christian R. Conrad
mail me at iki.fi ; same user ID as here
Yes, it's a shame he let himself be seduced by filthy lucre... Oh well, can't really hold it against the guy; he probably didn't get really rich in all his years with Borland, and then Micro$$$$oft probably gave him more at a stroke than he'd managed to put aside for those 15? 20? years.
But are you sure calling him "the last competent architect of Delphi at Borland" isn't overdoing it a bit?
The guys there now (e. g, Chuck Jadzewski and Danny Thorpe) seem to be pretty sharp too.
Christian R. Conrad
MY opinions, not my employer's - Hedengren, Finland.
Christian R. Conrad
mail me at iki.fi ; same user ID as here
> I'll leave it at there is probably a type of development group out there for
> whom C# would be a good language to use.
Interesting post, and I think you are almost definitely right, but I know that I'm certainly not in this group, and probably not anyone I know is either. It just seems to me that a lot of the stuff that has been highlighted as being new and innovative things in C# really don't hold up in comparison to more major language features that would have a strong effect on the code that results; anonymous closures, objects, strong typing, templates (ugh); things that make a particular language really what it is. These things they are adding just seem to me for the most part to be frills. But, as you say, perhaps in certain types of programming [that I don't really do], some of them may greatly improve the readability and maybe even quality of code (reduce the severity of bad code, as you describe it). I suppose, though, that I'm not qualified to comment much on things I don't do, am I
On a related note I have to wonder how different really nice code written in C# would be from similar really nice code written in c++ or java. My uninformed instinct says that it will be pretty close to the java for people who like java better, and pretty close to the c++ for people who like c++ better, and pretty close to the java for people who learn to program in c# (shudder). Of course, without a working compiler, and if the rumors of lack of internal support are true, we may never know.
...you think to write C# front-end to GCC? Aa.. probably not.. Need those half assed MS libraries to go.. why clone them?
<^>_<(ô ô)>_<^>
Um, Java has a standards body: Sun and the JCP. There is nothing inherent in an "official" standards body which makes it any better an arbitrator than a given company, as long as the process remains open to all interested parties. Want proof? Witness the success of "unofficial" standards like TCP/IP and SMTP over the "official" communications standards from ITU-T (formerly CCITT) and ISO, such as X.400/MOTIS.
But it has goto! All things pale in significance to this modern language construct.
Bite the hand.
Ahem.
<rant>
Common Lisp, interestingly enough can do all these things too. It's really amazing how all the C programmers get so excited over stuff that's been done before, and better too, just because
it (looks)
{
like->this;
}
</rant>
It is interesting to note that "Java" is mentioned 0 times in the C# documentation....
wog
int[,,] a3; // 3-dimensional array of int
is valid syntax, which should remove a few headaches. Nevertheless, I was overall expecting something a little more...more.
A lot of things that are good about the Java platform helped it take off, and lot of things that are bad about the platform keep it circling at low altitude. What really allowed Java to take off as a language, in addition to the platform, was the library and how it is keeping up with recent ideas about 'design patterns'. Java's symbiosis with design patterns, and the fact that Java GUI programming is some of the easiest there is, have been a great asset. What really remains to be seen is how C#'s libraries are accepted by the developer community, because these days it's often the standard libraries that really matter.
It's a shame that C# will be so embroiled in politics from the get-go that we'll never get to see how good (or bad) it actually is. Microsoft has some smart people, and I think the world has a niche for a simplified, compiled, reasonably-performing, garbage-collecting Java/C++. But C# is the child of a tyrant--it can never succeed or fail on its own merits.
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.
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.
Need a Python, C++, Unix, Linux develop
Several object oriented C versions appeared in the mid-1980s. At the time many people preferred ObjectiveC because it looked more like SmallTalk. NeXT (now Apple) used it as the base language. However, college hackers preferred C++ because it was free (or almost free depending on your ATT UNIX license). That was one of the main reasons it became more popular.
This appears to be a poor bastardization of Python except new programmers will have to learn the syntax of C. I primarily develop under C++ but I'm also a fan of Java and Python when appropriate. C# doesn't bring anything new or interesting to the table. I was honestly surprised not to find some new meaningful language construct in its design. Guess there are none left or perhaps a more useful language really wasn't M$oft's actual goal in its creation...
Natively executable code is an implementation issue, not a language issue. I have a feeling, however, since *every* object in C# is a COM object, the overhead might make native execution of C# slower than psuedo-code execution of Python. Obviously, however, there's nothing about Python that prohibits a native compiler implementation, its just not easily justified for its work space. Ditto for an "internet language" such as C# which is why Java and Python don't bother.
The lock statement and other threading/synchronization capabilities of the language are too simplex and inflexible for serious development of multi-threaded cooperative internet applications.
Python has all these abilities and many choices of POSIX or non-POSIX models to chose from at will thanx to the many freely available source libraries out there for it. C#'s native implementation will inhibit, if not prohibit, the development of such advanced features as external libraries because code will be written to the internal model. This is why C++ doesn't specify such things and proclaims them to be specifically out of scope. C#'s scope seems to simply be anything that Microsoft wants you to write under Windows. A very poor language selection for any serious architecture.
Look at electric fence.. it is essentially the same thing. What EF does (IIRC) is mmap the memory regions that the prog is not allowed to access. When your pointer tripps over that area, your program will hit a page fault generated by the MMU.
That's one way to do it atleast...
pan
I said no... but I missed and it came out yes.
The real question is what is the size of executable in memory ( compared to Java memory-eater)
Where the hell is any information regarding IIS being part of the kernel ? .. forgot exact term ) but this is quite generic and can used by any other software.
IIS guys reqested to implement specific functionality that would help IIS run faster (related to threads
BTW. latest Linux kernel does include httpd deamon... so even if MS did put parts of IIS in the kernel why the hell Linus and others do the same if it is such a ugly feature ?
Yes, I did use it and Swing is still a joke. ...
Sorry but for now it won't do
Creativity isn't in their DNA -- all they know how to do is "embrace and extend." Look at it from their point of view: They've managed industry domination without doing new things, so why should they start now?
-jon
Skimmed the intro, Skimmed the reference. It doesn't really offer anything significant compared to Java, with one exception, versioning. You can have the same class declared twice in the same area but differentiated by version, thus allowing upgrades to be "easier" without breaking old code (because its still there). In concept it seems neat, but I see that being more of a headache than its worth.
Sure, WinZip for HP-UX, I use it every day. It's the standard, don't you know.... Although I do seem to have unzip installed.
Your right to not believe: Americans United for Separation of Church and
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.
I don't think that there are *any* modern Java VMs that still use reference counting. Reference counting has two major problems:
And I'll bring out the badly beaten and bruised horse one more time for those fools who don't read things the first time: If you have to interact with the OS or 'legacy' code, you have JNI - the Java Native Interface - that lets you do that. JNI is nice, you get to use all the native functions you want *and* you can use all the Java classes.
I don't think that they "forgot" about portability, they have, and will intentionally ignore portability. It is not an issue for them. They live in a completely microsoft dominate world, there is no other, beside a few dying quails (Mac, UNIX).
Is it right or wrong?
It's ignorance, with a dash of arogance, and a little aggressive business manouvers.
all for nothing, mind you, in this day of interoperability.
The basic sleazeware produced in a drunken fury by a bunch of UCBerkeley grad students was still the core of BIND. --PV
The reference manual is a 277-page Word document that's been bottled up as a self-extracting archive. I suppose HTML or PDF would be too much to ask for, but why don't they just distribute this as a plain .zip file? I assume that anyone capable of understanding a Microsoft language reference manual also has access to WinZip...
--
send all spam to theotherwhitemeat@ropine.com
Could someone with a windows/DOS computer please extract the PDF out of that self-extracting EXE-file? I would like to read their chit (The article referenced consisted of 100% pure marketing speak) to judge it, but I only have access to computers running Linux.
--The knowledge that you are an idiot, is what distinguishes you from one.
--The knowledge that you are an idiot, is what distinguishes you from one.
This might not be the answer you're looking for, but if you're dealing with programs big enough for it to be a pain to track hashes, you should probably make your hashes into objects and privatize all the variables, so the hash/package/object is only usable through its methods, which will clean up your code and assist Perl's debugging dramatically.
This is all said with a grain of salt because I find OOPerl to be something of a pain in the ass, probably just because my brain isn't large enough.
--
Make mine methylphenidate.
Looks alot like ADA to me. Military applications are often required to use ada because of the strong type checking. Alot of people dont like ADA because they are more comfortable with C syntax. It looks like they are trying to make an "ADA" with "C" syntax.
MCSE: Micro$oft Certified Sound Engineer?
;o)
-- Word of the day: Percussive maintenance is the fine art of whacking the crap out of an electronic device to get it wo
Which is also different from the key of C#
"You know, Hobbes, some days even my lucky rocketship underpants don't help" -- Calvin
Well, I think Eiffel has it right, and there's a different way of looking at it. It's a good feature to know that all variables have default values. So references start as NULL/Nil, booleans start as false, etc. It saves you from having to initialize things yourself, and if the value's well-defined, it's a good thing
I can't really see why the improvements they suggest
justify a new language. Garbage collection,
automatic initialization and inbuilt support for
COM are features that could easily be added to
C/C++ (and have been). Perhaps the real intention
is to replace VB (a nice idea IMHO but really
suffering from poor design and the a tendency
to add new languages element willy-nilly) with C#.
>(Of course, who in their right minds would code an OS, for example, in C++?)
/.-ers are never reluctant to do that), but it was the state of g++ in the early 90's that kept c++ from being used in the kernel. The compiler was simply immature from a c++ standpoint at that time. The GNU compiler has come a long way, and the kernel is still stressing its C usage.
Well, uh, Linus wanted to. Also some enterprising lads at Bell Labs. I'm sure there are others.
Correct me if I'm wrong (and I know that
Well, apparently, you only have to fool the majority of people for a little while.
I'm too lazy to read 400+ posts to see if anyone else has noticed this.
In several languages that we're all familiar with, everything after a '#' is a comment. So this language can safely be ignored..
"The cost of freedom is eternal vigilance." -Thomas Jefferson
This is a microsoft language and API, right?
I give HR departments five minutes to post just that :-)
Keeping track of two different ways of dealing with integers is silly. I should be able to do something like the following in Java but I can't:
;)
Integer a;
for (int i = 0; i < loopBound; i++)
{
a = a + i;
}
OK -- that's just plain silly. Why'd you declare a as an Integer object? Just use the primitive int. There aren't two ways of keeping track of an integer value: int is a primitive, Integer is an object. Why have an Integer object, you ask? You'd be amazed the things you can do by having one of your classes inherit from something as simple as Integer.... OOP really is useful.
What happens when I need access some system pointer?
Well, assuming you're worth your grain of salt as a C programmer, you write a Java Native Interface method. I wonder how many people in this thread have actually written a Java program longer than a few hundred lines. I doubt the originator has... at least not a good one
No reason to flame, I'm just pointing stuff out....
--Mid
Doesn't matter. Lisp is a Funtional language, where C#, or whatever, is an object oriented language. Their method of approaching problems is completely different.
- Free tabletop fantasy gaming! Grey Lotus
More Djkstra brainwashing in action....
DrLunch.com The site that tells you what's for lunch!
Everyone will (and has already) compared this language to Java. This is fine. However, it is clear that C# (Coctothorpe) is C++ with some significant changes to make it look as much like Java as possible while retaining pretty much everything in COM-flavored C/C++. Think about it -- you could build front-end parser that would take C# and translate it quite easily to C++, throw in automatic reference-counting implemented ala COM, translate the library calls to calls into the appropriate ActiveX/COM components and you're good to go.
What is clear to me from looking pretty closely at the reference doc is that it has everything C/C++ has (operator overloading, pointers) but doesn't much from Java except some syntactic ideas and mutexes. But it's meant to be compiled to native code and rely on native libraries.
It doesn't really look much like a new programming language, just decorated C++ for COM.
Excellent! A few very simple bits of sed or Perl and I can turn must C# programs into Java. :-)
Try making your first VBScript line:
Option Explicit
That will solve your typo problem.
Do not taunt Happy Fun Ball
Microsoft doesn't have to support java on Windows. Sun is doing a very decent job of that. I wouldn't be worried about windows support either -- as far as I know they are making those releases available sooner than ones even for Solaris.
-S
Wouldn't the better pronounciation for "C#" be "C splat" (which rhymes nicely with "C flat") or "C roadkill"? Considering that this -- this vile monstrosity came from Microsoft, both "splat" and "roadkill" would seem more appropriate than "sharp".
FreeBSD has a JVM. as for the rest, HPUX, BeOS, AIX? Well... who gives a fuck? Java for BeOS would be nice, but not really critical. It isn't a very massive persentage of people out there running Be
ReadThe ReflectionEngine, a cyberpunk style n
Yuk. What a gross way to code. The best part of Java is that it doesn't allow those disgustapated techniques.
As opposed to extending like 20 interfaces? MI kicks ass. and every array in java is dynamic.
ReadThe ReflectionEngine, a cyberpunk style n
Did you just pass CS100 or equivalent?
My CS101 class was just talking about how to you check your email and the history of the univecity and shit. Not that that matters at all...
We don't know how bad things are in North Korea, but here are some pictures of hungy children -- CNN
ReadThe ReflectionEngine, a cyberpunk style n
It may be windows only, but not beacuse of that. That right there is a standard thing on Lic Agreements, it just says that you don't own any of MS's IP just beacuse you read the document.
ReadThe ReflectionEngine, a cyberpunk style n
post 666!
..adffoingaasdf... I think the 'lameness filter' is just making these posts more inane
I AM LEET.
ReadThe ReflectionEngine, a cyberpunk style n
Nice Microsoft = Evil Empire reference,
:P
Shouldn't that be Microsoft == Evil Empire? I mean, if you want to use code in sentances instaid of grammar, you should make sure your code is right
ReadThe ReflectionEngine, a cyberpunk style n
Perhaps I've been spoiled by VHLLs (Haskell, Python, Java, etc.), but I don't understand your last question.
Why do you need forward declarations to define recursive data structures?
Just define an object (call it a Node, if you want), that has two properties, left and right. Each of these properties is a (reference to a) node.
It looks like C# fixes several of these (enums, properties, events, operator overloading), but leaves out some of the best features that Java includes:
What else is good about C#:
Ever try to migrate an installed base from 1.1 to 1.2? Yeah, it's not DLL hell, but it's not as simple as just sending out a new .jar file.
Now use it in a sentance. :) If this is an inner class in class foo, then in order to use it as a parameter to a method, I need to do: aFoo.bar(foo.Animal.PIG); Which seems like a mouthful, particularly since enums have been around at least since Pascal, and they solve the problem very neatly. Just because you can make the Animal.PIG dance, doesn't mean it's art.
No no no no... the plural of Nazi is really Nazies... or Nazises? Hoo boy. Should be a poll topic - "my favorite word to pluralize by putting 'ii' on the end."
huh? OOP = encapsulated data. How do you encapsulate date? with accessor/mutator functions (at the most basic level, at least). How does a struct ENCAPSULATE data? It doesn't. How does a struct support inheritance? It can't. How does a struct support polymorphism? Again, it doesn't. I don't think it's very funny; struct's break the OOP model. The whole POINT of OOP is code reusability and stability by data abstraction and encapsulation. Structs simply don't accomplish this. To call EvlG a "Java programmer who never took the time to learn C++" is what I find amusing, course you don't know him, so I guess your mistake is forgivable. A c++ struct is certainly NOT a class, by any stretch of the imagination. P
bullshit. Virtual function tables, anyone?
Hmmm. The only mistake I could spot that Java didn't make is the lack of exception specification (throws clause) on methods. This is the same idiotic mistake that Microsoft continues to make with Visual C++ which supports the syntax, but ignores it.
They have certainly borrowed one of Java's big mistakes - no const qualifications for reference parameters or methods.
Apart from these problems, I actually kinda like the language. I also like the fact that MS is prepared to open it up to an independent standards process. The shine came off Java for a lot of people when Sun decided to retain propietal control of the language (I don't believe in the Java Community Process anymore than I believe in fairys at the bottom of my garden).
John Carney
That was Occam ...
the genius writes code that even an idiot can understand,
while the idiot writes code only a genius can understand.
nerds transcripts
says it all, doesn't it?
Of course you are right. I have been spending too much time playing in Java.
Sure, but the tree is the easy case. What happens when you have two structure types (structA and structB), such that structA contains a structB and structB contains a structA.
Microsoft isn't that stupid
/.
Now *that* is something I never thought I would read on
One word for you: Bob. If you still think MS can't be stupid, I have an OS to sell you...
The Signal/Noise ratio can be improved in two ways. Remaining silent is the OTHER way.
"We're Doomed!"
=:-)
---
Play Six Pack Man. I
As I recall it, Ada makes certain "semantic errors" syntactic errors. DoD sponsored Ada to provide a programming language that does not break when compiled on a different hardware platform. Consequently, most would-be programs are not sufficiently rigorous to compile.
Microsoft's C# might have syntax superficially resembling Ada's, but being Microsoft, the core reliability should be rather worse than C.
Which rather puts paid to that idea... although I'm sure someone will just ignore that and post the document fairly soon.
-- Help Digitise the Public Domain at DP.
yes - amusing that, isn't it?
hey ho.
-- Help Digitise the Public Domain at DP.
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.
Well, that's not true. The ActiveState port of Perl to Win32 is damn useful - I used it just a couple of days ago to reparse a whole bunch of HTML pages. It'll run as a scripting language under IIS or even embedded like VBScript. And it's just Perl as we know and [love|hate] it.
Having said that, whilst your main point (choose the language that fits) is valid, we inevitably will stick with languages with which we're familiar and more productive for many jobs, because learning a new language is annoying for the day or so it takes before you begin to get up to speed in it.
ben_ the technologist and platform agnostic
Ok, sure it does "Hello World".
But, can you make a "Nervous Text" applet?
At the risk of my site being slashdotted, I am posting the C# Language reference as a zipped Word file.
http://comclubint.hypermart.net/clangref.zip
I have also posted it as a rtf file:
http://comclubint.hypermart.net/clangref.rtf
--Quentin
To email me, look at the address. You can figure it out.
Looks this may be a windows only tool, sad to say. I should have guessed that MS would do something like this. Creating a language standard then patenting it, I think that would put a crimp in any competition in the compiler market..
MS tend to use patents defensively; ie. if you use their technology, you promise you won't use any patents you hold against them.
At least, that's what I saw last time I looked into anything like that.
Si
Coming soon - pyrogyra
the difference is: one of the languages actually exists.
Actually, the difference is:
One of these languages has been passed to an official standards organization for standardization and ratification; the other has not.
The one that has not, by the way, begins with "J".
Si
Coming soon - pyrogyra
...and you were saying about portablity?
Er, no actually> I don't believe I mentioned portability once.
Si
Coming soon - pyrogyra
Another difference: One of these languages, not the one ending in '#'. has multiplatform open-source implementations available. See http://kaffe.org.
But still no open-standard. What a shame.
Give MS time; they only released the spec today. Java's had 5 years. And still isn't an open standard.
Si
Coming soon - pyrogyra
OK, there are a lot of people here that don't like Microsoft (myself included), but I am overjoyed to see at least a few posts here from people who have read the C# language references posted.
I can happily say that C# seems like a nice language. It has a lot of the syntactic underpinnings from Java and C++, but with all the "bend the language to suit our needs" flavor of Delphi. I am sure that Anders Hielberg (Delphi architect) had some influence on this language.
Here's a few points:
1. Property declerations are nice and easy, and are an improvement over Delphi's and VC++ #pragma mechanisms.
2. I actually laughed out loud at the elegance of adding event handlers. +=, -=, very Java bean like, without the "addSuchAndSuchListener" gorp you see all over Java code. Of course, it is very Delphi like using the delegate closures, and is beautifully typesafe and compact. Kudos.
3. The attribute stuff is neato. I like shortcuts, and I hate post-compilers. Another step forward.
Overall, at first blush it seems like a lot of good things were taken from Delphi, Java and C++ (my favorites in that order). I can recommend that when an open-source-compiles-to-java-bytecode-version appears that people check it out.
Seriously, though, one major criticism I have with C#'s competition (and let's not kid ourselves, kiddies, it's Java), is that the Java language is not changing to suit demand. Sure, Sun puts out new versions as fast as they can, and they do a good job of adjusting to developers screaming (AWT.....NOOOOOOO), but they are not changing the language to help out.
Notice that I am not saying that they should be changing the bytecode...you can do just about everything cool about C# in Java bytecode, and yet Sun, and sure Microsoft, won't.
It's funny, I was just thinking that if Sun had just announced a brand new syntax for a bunch of stuff in Java, the whole world would love it!
But, because it's from evil Microsoft, it can't have anything good.
A shame to be among such sheep (oooh, the irony).
Delphi?
Though I have to admit I never programmed much COM with Delphi while I was doing windows programming. But it is touted as a feature.
Most of the Java GUI tools are written in Java these days (JBuilder, Visual Age, Forte) and it is handy for cross platform configuration tools eg the Apache configuration utility Vision.
You can use it for anything that does not require blinding speed or low level manipulation. If you assume Linux is going to be massive it is handy to be able to develop for the huge existing Win32 base and be able to run directly on the OS of the GNU generation.
Java doesn't let you use primitives (int, short, etc) as classes without wrapping them yourself (lots of overhead).
:P
Java has built in object wrappers for those primitives, and many of the function need are static function so you don't have to instantiate an object and incur that 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.
Correct! One of the great things about java.. PLATFORM INDEPENDANCE
Java doesn't have a "foreach" statement.
Haven't looked into it. I haven't found the lack of a "foreach" to be an issue
Java doesn't have property-handlers (eg. write functions that are treated as member variables
So java is consistant, so methods are always treated as methods and variables are always treated as varibles. I don't really see how that is a bad thing. Please enlighten me.
Java doesn't have any versioning mechanism (other than the woefully inadequate @deprecated tag.
Never done/worried about versioning... No comment
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"
I'm not really sure how this would be a needed thing. Whether I access it as l.foo, l->foo or l[foo] it all does the same...
Need I continue?
Yes
Yes, this is off topic, but I couldn't help myself. "My other car is a cdr" is the best sig I've seen in ages! Thankfully I took that term of Scheme so I could get this joke.
Ahh, Scheme...
The Happy Blues Man
The Happy Blues Man
I accept on blind faith that Cincinatti exists.
(btw, the executable is just a self extracting zip file with a word document in it)
All C# is, is a blatant rip off of Java, with some features added (some nice, some dangerous).
They add "unsafe" operations. These operations do not use the built in memory management. Memory leaks anyone?
They add gotos for no reason.
Some of there base classes (stack was an example) use properties rather than methods. They add the idea of property code that includes functions for get/set. I think this makes the code harder to read as you must chase down these imbeded operators.
They put in the idea of structs (what were they thinking, this should NOT be in new OO languages).
The spec includes Pre-processing statements (#defines, #ifndef, etc). Why???
Bottom line it looks like they took a fairly well designed language (java), and added all kinds of nasties/complexities for programers to deal with. Most of these are throwbacks of things that didn't work well in c/c++.
No idea why.
Do you have any evidence _at all_ to back that statement up?
Looks like Microsoft is building a language that fits much better with MFC than C++. No more building elaborate wrappers around COM objects. Everything is garbage collected, so there's no confusion as to what you have to clean up and what's destroyed automatically by the framework. Creating controls could be as easy as it is in Java or VB.
Sounds like being an MS developer just got way closer to being tolerable, unless you're afraid to learn a new language...
Hands in my pocket
...
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.
Not really. It is one of the main reasons the class library is such a mess (all those tests for primitives).
...
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.
No, its a better model. Why should you care how the class is implementing its features?
Agreed with the rest though.
Tom
Page 11 of the Introduction to C# has the following example:
"A reference parameter is declared with a ref modifier. The example
using System;
class Test {
static void Swap(ref int a, ref int b) {
int t = a;
a = b;
b = a;
}
static void Main() {
int x = 1;
int y = 2;
Console.WriteLine("pre: x = {0}, y = {1}", x, y);
Swap(ref x, ref y);
Console.WriteLine("post: x = {0}, y = {1}", x, y);
}
}
shows a Swap method that has two reference parameters. The output of the program is:
pre: x = 1, y = 2
post: x = 2, y = 1"
Sadly not. Since t isn't used again in the Swap function, this program is actually going to spew out:
pre: x = 1, y = 2
post: x = 2, y = 2
unless they've done something really odd in the compiler!
It looks like we could be looking at another sucessful "innovation" here.
Which of course would be the fault of the language? Gimme a break
Tell me this. You have an OS with a fairly decent OO RPC framework (COM). Thousands of components have been created using it. You develop a new language. Do you :
a) Not use COM, because some idiot might make a virus (which of course couldn't happen with stuff like C or C++, or even UNIX. (Think about it. A naive sysadmin installs an unknown RPM)
b) Use COM, and immediately give access to many components to users of your new language?
So what? syntactical sugar, nothing more.
Keeping track of two different ways of dealing with integers is silly. I should be able to do something like the following in Java but I can't:
Integer a;
for (int i = 0; i < loopBound; i++)
{
a = a + i;
}
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).
A language should provide the programmer with the tools to write stable code, not restrict him so that he can't do simple things if he needs to. A good language should make the good stuff easy, and the hard stuff available. What happens when I need access some system pointer? The language determines that I really don't need it!?!
Java doesn't have a "foreach" statement.
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.
Why make do if C# already has it? Java doesn't seem to jumping on the bandwagon.
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.
Well, it is. There's nothing wrong with syntactical sugar if it makes my code more readable. Operator overloading can be overused I agree, but it certainly fits very well in some situations. Since lists are very similar to Arrays, why not use the same syntax?
Mad Software: Rantings on Developing So
Of course the great thing about enumerations is that you have a defined set of values which the compiler knows about. Consequently when used in switch statements the compiler can alert you to missing cases. (useful in instances where you don't want to define sets of objects and use dynamic dispatch on them).
Wait, I bet you're a wind player, aren't you? Bah!
As any wind player would know, this is the same as Db which has 6 flats. And I'm sure this language will drive like a car with 6 flats too.
Look at the properties of the document in Word ...
Well, that explains it.
So, my first two questions are:
1. Are there scripting elements we can hack?
2. Is this so tied to the OS that it will never be multi-OS?
Will in Seattle
Umm, how about some waves with Bill G playing a strad? C'mon, there must be tons of people from EMP twiddling their thumbs now that the not-so-long lines at the Space Needle have gotten really short.
Just crank it into Adobe and push it out!
Other ideas?
Will in Seattle
This is incredibly funny!!! ROFLMAO! Thank you for pointing this out. ------------------------------ It's like, I guess it depends on what the definition of "is" is.
----- Cop: "Do you have any ID?" Me: "'Bout whut?"
I do have to say... I think that accessing primitive types as objects is definately an improvement over Java. If the the memory management in the implementations is better than the memory management in most JVMs, then Sun will really have some catching up to do. Only think I dislike is that we will be back to COMs multiple-inheritance hell.
Now accepting sig suggestions.
Similarly, I like to have Exceptions and Interfaces become nested classes in Foo when only Foo cares about them. Rather pretty I think.
(Reality reasserts itself sooner or later.)
The new "get" and "set" methods on member variables was the most novel to me and looked very attractive for a few minutes. It seemed superior to naming conventions like "setX(X)" and "X getX()" for methods in beans. But... what if you decide to eliminate X as a member and calculate X's value from other members, or delegate to another class? How do you change the implementation of a "get" attached to a variable X? This style discourages refactoring. Anyway, get and set methods are usually a sign of poor encapsulation. Why encourage making every variable public?
Delegates are a greater "innovation," but have been well dissected since they appeared in J++. Anonymous inner classes accomplish the same task just as concisely and are more easily upgraded to full classes. Delegates are a language feature unto themselves, but inner classes are just classes. The COM legacy seems to make it impossible for MS to live without function pointers. (That's their definition of "language independence": i.e. all languages should understand arrays of function pointers.) Eventually the simplest function seems to need some state, and then, surprise, you wish you had a class instead of a function pointer.
I must congratulate MS on finally surrendering macros and the preprocessor. Yay! This is real progress.
An experienced Java programmer could probably learn this language in the same amount of time that it takes to learn J++. The hardest change would be the capitalization scheme. So far, I can't see a single feature that would make me more productive.
(Reality reasserts itself sooner or later.)
What happened to Java's inner classes in C#? I suppose they made Delegates seem redundant. Unfortunately , Delegates (i.e. function pointers) cannot be so easily upgraded to a full class with state. Inner classes come in three handy flavors: anonymous, static, and non-static. The anonymous kind are perfect for callbacks and listeners, the main use of Delegates. The static kind are perfect for scoping public Exceptions and Interfaces with the one outer class that uses them. The non-static kind are great for hiding the private implementation of interfaces exported by the outer class. All this and more, without having to introduce the idea of function pointers. Unfortunately, to Microsoft "language independence" means "has the same compiled representation of an array of function pointers," i.e. C++ vtables, i.e. COM.
(Reality reasserts itself sooner or later.)
public final static class Animal {
public final static Animal
PIG = new Animal(),
COW = new Animal(),
HORSE = new Animal();
private Animal () {}
}
(Reality reasserts itself sooner or later.)
It's not hard to distribute a JRE with your product. That's what the JRE is for, and you don't need special permission. Just consider the JRE a part of your application. Or write a slightly fancier installer that looks for a new enough JRE first. Or use a Java to native code compiler. Is this harder than checking that the system has up-to-date DLL's, and trying to update them safely? I'd say the JRE is way easier.
(Reality reasserts itself sooner or later.)
Of course, bytecodes also give you some hope of safety, but MS probably don't care much about that, and if they do they'd rather provide it via signatures, as they can then control the signatures.
C++ only provides nested classes. (equivalent to static inner classes in Java) Of course it's quite simple to construct a inner class from this... Btw, Java does the same; The so called inner classes are just classes containing a pointer to the parent class and since Java lacks a notation of friends the parent classe contains some "hiddden" public methods to grant access to private/protected entries. (Not very nice if you ask me, you could call this methods from a hand-crafted class that is not a inner class)
It's certainly true that people here assume the worst from Microsoft. But can you blame them? Most things Microsoft makes are woefully inelegant, however useful they might be. And because Microsoft is so focused on crushing competitors (as opposed to being focused exclusively on making good products), it's only wise to ask yourself, "What does Microsoft hope to crush with this?"
That said, it'd be nice if people were a little less biased in their evaluations. The only way we'll beat Microsoft is by carefully watching them and stealing all their best tricks.
IHMO, goto only has one use in serious code: for "compilers" of other languages (e.g. Eiffel) that transform their code into C++, it's often easiest to use goto. But avoid goto like the plague in handcrafted code :).
Then I will forgive them for Visual Basic.
I've been coding in Obj-C for ten years, and it's sweet.
-jcr
The only title of honor that a tyrant can grant is "Enemy of the State."
Obj-C is in GCC, and there's a GNU runtime.
Go look at GNUStep.org, and then tell us if you still think Obj-C is closed.
-jcr
The only title of honor that a tyrant can grant is "Enemy of the State."
The poster said that C# makes mistakes that Java thankfully avoids. What are those, exactly?
Glancing at the C# data sheet, it seems that the C# language is indeed very similar to Java, with a few niceties (syntatic sugar, mostly) added:
enums -- handy
structs by value -- OK, whatever. Might enable slight performance enhancements.
foreach -- handy, but just syntatic sugar
event types - kind of nifty, maybe
delegates - interesting concept, similar to function objets in the STL? This could be really powerful.
properties -- syntatic sugar, but nice
Perhaps the nicest thing about C# is that all types, including native types, conceptually inherit from Object. You don't need those annoying native type wrappers that Java has. Still not a big deal, though.
The most controversial feature of the language will probablly be the "unsafe" code feature, which lets you bypass the garbage collector and do some pointer type stuff. Was this one of the "mistakes" the poster refered to?
I'll probablly never use C# -- I code for Linux at home, C++ and Java on 'Nix and NT at work. Still, I like the idea of competition with Java. Java is a proprietary language controlled by one company, so to avoid to much concentration of power, an alternative would be nice. Of course, an open-source Java/C# equivalent would be even better.
Stephen Molitor steve_molitor@yahoo.com
"3.ToString(): I kid you not. Since literals are instances of objects, you can call methods on them."
Actually, why not? Seems logical and orthoganol to me.
"No threads (apparently)."
They mention a "Lock" thingie, for mutexes, so presumably that's for threads.
Stephen Molitor steve_molitor@yahoo.com
seems like a really well done april fool's joke
-sig-
Please show us any information you have to back up your claim. It's interesting, but I believe it is completely off-base. Obj. C will be good for Cocoa in Mac OS X, but they are developing Office 2001 for Carbon. Where did you get this information, and why should we believe it?
It's only when we've lost everything, that we are free to do anything...
Isn't that Gates' Law?
-- 2 + 2 = 5, for very large values of 2
I think many of us recall MS submitting ActiveX / COM to the standards bodies, fscking around for years and then withdrawing it, its just an MS BS / PR tactic, they have ZERO intention of making COM or C# or anything else a standard with control outside of MS, but as we have seen them pull this shit before we know its worthless, sorry MS we're wise to you, now go tell Bill we aren't stupid and we'd really like MS to stick with open industry standards, if you don't you'l just continue to lose ground to your competitors.
Any sufficiently advanced man is indistinguishable from God
Sorry to burst your bubble, but CORBA was the first major component archetecture, ActiveX was supposed to be components for the Web, but it was Windows only (I think somone did attempt porting to some Unix flavours but AFAIR it all fell through), Java Beans is Java components, Enterprise Beans interoperate with CORBA via IIOP IIRC, now theres SOAP coming along which should be simpler than CORBA and cross platform, the search for the Holy Grail continues...
Any sufficiently advanced man is indistinguishable from God
Variables are initialised to the universal number, 42.
Any sufficiently advanced man is indistinguishable from God
Most of those points are things that bog standard C++ has.
<P>
<I>On the whole, Microsoft seems to have taken Java, added many of the things people were asking for, and called it C#. </I>
<P>
Maybe you should take a closer look at C++ ?
<P>
<I>unclear how it will connect to C/C++ APIs; this is clearly in their interest (Win32 APIs), but not well defined in their document </I>
<P>"Connect to APIs" ? Don't know about you, but most of us don't have any problem with making a function call. Win32 APIs are not "C/C++" APIs - a function is a function, no matter what language. In fact, multiple languages exist that use the Windows API. The same goes on Unix.
<P>
<I>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>
<P>These are all avaliable in C++, with the possible exception of two terms I'm not familiar with (foreach syntax, and checked/unchecked arithmetic).
<P>
<I>Even if Microsoft ever figures out technically how to hook up the Win32 API to C# </I>
<P>I am sure they can allow their users to make function calls. Don't forget that every Windows component is an object, and C# will expose all objects identically as COM objects -- this is probably where you will find your API.
Ah crap, clicked the wrong button. Try this:
<P>
Nearly all of those points are things that bog standard C++ has.
<P>
<I>On the whole, Microsoft seems to have taken Java, added many of the things people were asking for, and called it C#. </I>
<P>
Maybe you should take a closer look at C++ ?
<P>
<I>unclear how it will connect to C/C++ APIs; this is clearly in their interest (Win32 APIs), but not well defined in their document </I>
<P>"Connect to APIs" ? Don't know about you, but most of us don't have any problem with making a function call. Win32 APIs are not "C/C++" APIs - a function is a function, no matter what language. In fact, multiple languages exist that use the Windows API. The same goes on Unix.
<P>
<I>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>
<P>These are all avaliable in C++, with the possible exception of two terms I'm not familiar with (foreach syntax, and checked/unchecked arithmetic).
<P>
<I>Even if Microsoft ever figures out technically how to hook up the Win32 API to C# </I>
<P>I am sure they can allow their users to make function calls. Don't forget that every Windows component is an object, and C# will expose all objects identically as COM objects -- this is probably where you will find your API.
Grr, slashdot keeps rejecting the post when HTML-formatted. Typical bugs in lame code. Oh well, you will have to stick with that.
Right, I'm going to start programming in a proprietary language that only runs on one platform.
Who's asleep at the wheel?
This post encoded with ROT26. If you can read it, you've violated the DMCA. Handcuffs please, sergeant.
There's no NDA (or any other license) displayed when you run the EXE. Just the copyright statement in the text of the document.
James
Yeah, tons of overhead there. Umm, heard of JNI? Of course bear in mind that with Java there is more than one underlying OS. Iterator e = list.listIterator();
while (e.hasNext()) {
}
Oh no, one extra line. The horror. That's ok, I'd really prefer to have some idea of when methods are being called and when they aren't. Ok, you get a point there. Somehow I don't see hordes of programmers switching languages because of versioning issues. Object foo = list.get(index);
Three extra characters, and it's made clear that it's a method invocation rather than an array access. Or if you really want an array, call toArray(). If that's the best C# has to offer, don't bother.
How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
Another difference: One of these languages, not the one ending in '#'. has multiplatform open-source implementations available. See http://kaffe.org.
How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
Quote from here:
With C#, every object is automatically a COM object. Developers no longer have to explicitly implement IUnknown and other COM interfaces. Instead, those features are built in. Similarly, C# programs can natively use existing COM objects, no matter what language was used to author them.
The compiler handles all the references needed for recursion.
> make reading some post's
Yes, I can see you need more Grammar "Nazi's".
Haha, yeah. Ada is a good language with strict complilers. Maybe it was ahead of its time, or something, otherwise it might have been more popular.
"...we are moving toward a Web-centric stage and our dear PC will be one of
EverCode
What's the purpose in having a language like this? Wouldn't the other's do just as well?
We're here to give you an OS, not a religion.
Uh, was this before or after they did that show in the seventies?
What? Oh, Sanford and Sun?
Nevermind...
DO NOT LEAVE IT IS NOT REAL
Simpsons Redux - when homer needed a name for his singing group he wanted one that was funny at first but quickly lost its appeal and ended up not being funny at all. they chose the B#'s (b-sharps) DOH!
Go read some bible: nubible.com
Also, given the fact that it is over 260 pages, it probably wouldn't be a very good idea :)
Anders became the chief architect of the Windows Foundations Classes, the application framework for Visual J++.
So while M$ avoids all mention of Java in its C# docs, they do have one of their big Java guys playing a key role in its development. Interesting.
P.S. Apparently, if you make something of interest to a large enough group of people, someone will set up a web page tribute to you. Anders' tribute page is here.
I have read through the intro doc and glanced at the reference doc. It seems that MS did give some careful design to this language. The syntax for multi-dimensional arrays is fairly cool. The fact that it comes with no class libraries of its own is rather interesting.
I have a few objections, however.
First, why make everything an object? I can understand making the primitive types objects, but I can see no reason to make literals objects as well. I would think that would introduce huge amounts of overhead.
Second, it seems wat too dangerous to have both GC and pointers. I personally prefer C++ pver Java, but have experience with both Java and the LISP family. I think that GC is a Good Idea, but if you are going to have it then direct memory addressing via pointers should not be allowed. IMHO, pointers and GC go together like oil and water.
Third, the "get" and "set" methods are too similar to the try/catch pair. This will only be cause for confusion.
Fourth, Two words "creeping featuritis." I see no need for five different accessability types. I think that public/private/protected are quite enough. The "internal" and "protected internal" accessability specifiers look to be almost totally redundant. I also see no real need for properties. The function of a property could be just as easily handled with a field within the class. There doesn't really seem to be a clear distinction between the two. Most of these new features, while nice are not of clear benefit.
Fifth, While the language has a nice syntax, ala Java, and has a couple of really nifty features, multi-dimensional arrays and indexers, it does not seem to offer anything to make it worthy of a switch. It is a cross between C++ and Java. It could be useful in places where those languages are often used, but even with its simplicity retraining and remplementation still costs money. It offers really tight integration with MS Windows platforms. Great, however, with the Anti-Trust problems and the admitted trend towards Web-based applications why should I consider yet another platform specific programming language? What does C# have to offer me?
C# is at least an interesting thought experiment on the part of MS. It is obviously still a beta spec. however. The designers went a little overboard when deciding what new features to add. It is also tied too closely to one platform for comfort. The designers seem to forget that MS does not the own the Web, or Web standards. Replace COM/DCOM with CORBA, or allow the use of both, and suddenly C# becomes much more viable. This is obviously meant to be a competitor to Java. I give them alot of credit for making it play nicely with VB and Visual C++, but it needs to play nicely with the rest of the Web, i.e. UNIX and MacOS, then it might actually be competitive.
In short. Trim the fat and make it more ubiquitious then it might be a winner.
If it looks like a duck, and quacks like a duck, it must be a duck.
As Frank Zappa once said..."Don't pee on the electric fence or you will hit a page fault generated by the MMU".
TheGeek
TheGeek
http://www.geekrights.org
Kill the monkey
Try learning "Cross Harp" harmonica and see where it gets ye.
TheGeek
TheGeek
http://www.geekrights.org
Kill the monkey
Automatic variable initialization is not automatic variable declaration. Automatic variable initialization is when you declare an int and it gets initialized to "0", a pointer gets initialized to "null", a string to "" and so forth.
Paul
Dude.
Can someone post an HTML or PDF version?
Thanks Dude.
> What operating systems does quake run on?
;-)
You also forgot BeOS
Since this was rated up to 4 (informative) I think I'll have to post this and correct the original posters misunderstanding. My impression from reading the document was not that you didn't have to explictly declare variables, you do. It's just that they are automatically set to 0 or null when the program starts. This fixes something that can cause a lot of problems and potential security violations in C/C++. When a program starts in C/C++, variables are not set to 0 by default, and will contain whatever happened to be in that memory address before the program started. This is what they fixed and seems good to me. Programs with misspellings will not compile, same as C/C++.
from the i-need-a-new-language-like-I-need-a-third-arm dept.
Having a third arm would be cool!
user@host 1% make love
No programming language could handle the case of (literally) "structA contain[ing] a structB and structB contain[ing] a structA" -- it's an infinitely recursive definition.
Now, if you meant "structA contains a pointer to a structB" and vice versa, then the solution would be to do multi-pass compilation. (I think. hehe)
Wherever there's a will, there's a motorway.
Only if it's C sharp Major....
Sigged!
SO what we are saying is that in order for a language to be "good", that it MUST be submited to a standards organization.... well I'll be a monkey's uncle, but C# is not portable. so what do I care who said it was standard? I think MS makes great languages, but they miss out on portability. If it was portable, I'd start using C#. MS locks stuff to windows, and that would be ok if windows wasn't so crappy itself....
SO, the difference is that Java is here, it's good, it works, and it's portable. C# is not.
Fook
The price we pay for immortality... is death. Narnia The Great Fall
Okay guys, on your marks!
You should be able to make a C# front end for the gcc family in a lunchtime!
Indeed, I don't know how many times I've tried to track down a stupid bug in VBScript because the variable was misspelled and it automatically initiatized it as a new variable.
Granted with VBScript you can disable this, but who has the time to look that up? (especially if you don't know where to find it if you are a rookie)
I think this fact alone nullifies the fact that MS scripting languages are supposed to be "easier to use".
rLowe
----- rL
Can this a troll if you want, I don't care.
I think some of you (2 people) failed to read my reply. I said:
Granted with VBScript you can disable this, but who has the time to look that up? (especially if you don't know where to find it if you are a rookie)
I know how to disable this. The fact that I did enabled me to make a prudent discussion about the point. The whole point about the comment was that in a simple scripting language, you should NOT HAVE TO know these kinds of things.
rLowe
----- rL
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 .DOC file, and opening it locked WordPad for over 5 minutes!
Don't worry! It only contains a
<p>
When I have a look at it, it mostly looks like Java or C++ to me, so there's absolutely no innovation behind me...BUT! they have one advantage to Java: <b>(restricted) use of native pointers!</b>
A monkey is doing the real work for me.
Because they're too thick to learn a second without the first one slipping away.
--
Cheers
Cheers
Jon
What - expect people to know how a language works? Surely not - you'll be expecting them to know where the Any key is next.
--
Cheers
Cheers
Jon
Variables still require declaration. From the documentation:
"Declarations in a C# program define the constituent elements of the program. C# programs are organized using namespaces (9), which can contain type declarations and nested namespace declarations. Type declarations (9.5) are used to define classes (10), structs (11), interfaces (13), enums (14), and delegates (15). The kinds of members permitted in a type declaration depends on the form of the type declaration. For instance, class declarations can contain declarations for instance constructors (10.10), destructors (10.11), static constructors (10.12), constants (10.3), fields (10.4), methods (10.5), properties (10.6), events (10.7), indexers (10.8), operators (10.9), and nested types."
"A declaration defines a name in the declaration space to which the declaration belongs. Except for overloaded constructor, method, indexer, and operator names, it is an error to have two or more declarations that introduce members with the same name in a declaration space. It is never possible for a declaration space to contain different kinds of members with the same name. For example, a declaration space can never contain a field and a method by the same name."
"A variable must be definitely assigned (5.3) before its value can be obtained.
"As described in the following sections, variables are either initially assigned or initially unassigned. An initially assigned variable has a well defined initial value and is always considered definitely assigned. An initially unassigned variable has no initial value. For an initially unassigned variable to be considered definitely assigned at a certain location, an assignment to the variable must occur in every possible execution path leading to that location."
and later on
"The following categories of variables are automatically initialized to their default values:
Static variables.
Instance variables of class instances.
Array elements.
"The default value of a variable depends on the type of the variable and is determined as follows:
For a variable of a value-type, the default value is the same as the value computed by the value-type's default constructor (4.1.1).
For a variable of a reference-type, the default value is null."
--
Cheers
Cheers
Jon
Wouldn't it be fun to see Sun, Oracle, IBM, RedHat, Corel, Caldera, Novell, etc., hijack the spec?
---------------------------------------------
SERENITY NOW!!!!!!!!!!!!!!!!
Just about all of us have spent hours debugging Perl code which did this to us, because we misspelled a variable name.
:)
That's what "use strict" is for.
Unix: Where
use strict; I can understand, but just try using perl -w on a file that is residing on a remote web server as an action file (sorry, CF lingo, bad bad bad) for your first email order form. It doesn't work.
Is this post not nifty? Sluggy Freelance. Worshi
Taken together, this means that ints will be automatically initialized to 0 unless you specifically initialize them to another value. If your compiler doesn't do this, then your compiler is broken.
Not quite, it is in fact 0. In C++, integral types are automatically initialized to 0 by default. Floating-point types are automatically initialized to 0.0, bools are initialized to false, and class objects are initialized using their default constructors.
Oh no! Its something from Microsoft! Its time for slashdot readers to be arrogant assholes and verbally rip the product to shreds because its from Microsoft.
Slashdot: Open sourced, closed minded
"when i needed you most, when i needed a friend, you let me down now, like i let you down then."
You do realise the ILOVEYOU type worms requires the user to run it? Just like a java class.
Uh...an ActiveX control (dll/ocx) also needs to be registered and can't just be run by double clicking either.
.class, and are only sandboxed when run inside browsers.
...and unix has security which current consumer operating systems don't have.
BTW, applets are also compiled to a
You can easily run ILOVEYOU type viruses in java. The issue isn't the language or anything, it's the wide availability of oo scripting engines that now ship with windows.
wasn't a big issue with unix scripts, since noone uses unix
Yes, but Microsoft is taking this straight to the ECMA.
I seem to remember something like that not happening with Sun...and when it finally did, they pulled out.
Geee.
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.
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.
And this is a language, not a platform, Microsoft are submitting C# to the ECMA. Microsoft will provide libraries for the
for i language i wrote for a cosc assignment, i implemented "exit X X" statements.
:= 0 to 100 := 0 to 100
:= 0 to 100
for i
{
for j
{
exit for 2;
};
};
you could also jump out of two if they are different.
e.g.
do
{
for i
{
exit do;
};
}
while (1);
I thought it was pretty neat...fast, and doesn't require messy labels.
- Similar syntax to Java with some annoying, non functional differences (e.g. Uses instead of import)
Agreed, I like import and packaging in Java.
- No synchronized keyword or equivalent. This makes the language not very suitable for serverside development.
Wrong. C# has lock() which works on one statement, and also System.CriticalSection.Enter() and System.CriticalSection.Exit().
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
I was a bit annoyed too, I like it how java is really clean. However there are some differences. Structs are faster (and they mentioned it would make XML parsing more efficient). Enumerations make things safer(something static final doesn't do in Java).
No inner classes. Another usefull feature of Java.
I didn't see them, but doesn't mean they won't turn up. Has delegates which are easier to understand than anonymous inner classes.
No security model. Yet another feature that they forgot to implement. I guess you are stuck with whatever ActiveX does for you.
I think Microsoft mentioned there is a security model.
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#.
Yes that was the first feature i looked for. Looks like Microsoft wasn't listening >:|.
Transparent use of COM objects. I suppose that is usefull but what about CORBA or JavaBeans?
Using Microsoft's JVM, you can access Java transparently as COM objects...and I'm sure you could write a CORBA ORB that is 'com-aware'..register a COM moniker called corba.
var x = GetObject("corba:my.object");
No preprocessor. Apart from memory management, the preprocessor is probably the largest source of maintenance headaches so Yay!
Wrong again, there IS a preprocessor. It's detailed in the language reference.
you gain little or nothing if moving from VB
Except a nicer looking language which is a barrier that prevents C++ programmers from using VB for anything serious (for fear of being scorned).
you loose a lot if moving from either Java or C++
Like? All Java 1.1 objects can be accessed from C#. C++ programmers can convert what they wrote in C++ to COM objects and use them from C#. Looks like a good balance to me.
All C# objects are com components, so they are usable from outside C#. Why bother using it then?
Uh cause the language is nicer than VB and easier to use then C++?
Vendor lock in. Do I need to explain this?
You mean like Java? C# will become a real standard. And Microsoft will write Windows libraries for C#. Other vendors can do their own thing. This is a language. NOT A PLATFORM.
Immaturity of language. If Java is a good example of how fast language adoption goes. It will take several years for C# get mature
Yes, but remember C# already has available hundreds of thousands of com objects available for use.
It does not address the needs of Java users, C++ users or VB users.
Uh, what? Ofcourse it does.
It does not contain anything you can't find in another language.
Um, well if you want to compare it to EVERY OTHER LANGUAGE then maybe. But if you compare it to other languages one by one, I think you'll find it unique. It has features Java does not have, and features C++/C does not have. And it's easy to use.
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.
What ever, the fact that you got so many facts wrong is an indication you didn't even bother to read the specs.
This language will simultaneously offend Java developers (for lack of features)
Um, it has more features than java tho. It'll affend Java programmers cause of the new unsafe features.
and C++ developers (for lack of features and freedom). It may appeal to VB developers (ignorance is bliss).
Um, but it gives a compromise between C++ and VB and Java. Something windows developers have been screaming for for a very long time.
You idiot. I said java classes, not applets.
C# is for client side and server side. Not for 'applets'..just like what Java is strong at (noone uses applets anymore).
import java.io.File;
class Idiot
{
public static void main(String[] args)
throws IOException
{
new File("c:\\yousuck.mp3").delete();
}
}
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.
They did it in J++ (Win32). And COM+ already works in a many nice safe garbage collected languages. e.g. VB, Delphi, Java, VBScript, JScript, Perlscript etc.
Well if you want to look at it that way, ActiveX is much more useful -- in a Windows application, it's practically inescapable.
Java Servlets certainly aren't doing anything that hadn't been done before they existed...
--
--
E2 IN2 IE?
How would I know? AFAIK, my life has not been significantly affected by either technology. It seems to me that Java is really good at three things and not much else:
animation/morphing of text
animation/morphing of graphics
animation/morphing of text AND graphics simultaneously
FWIW, I could live without both.
--
--
E2 IN2 IE?
I think the creators of the name were using hash. If you care to argue that it is intelligence dulling (anti-drug FUD), I will argue that it is an enhancement of one's creativity. If you had cutout characters of `C++' on a table, you could mangle it to look like C#...
Besides, it wouldn't be much fun to take the hash out of the "hash bang slash bin slash bash", everyone would have to use stupid arrays with Perl, and frankly, plain corned beef is boring...
--
--
E2 IN2 IE?
IMO the same thing can be said for many misfeatures like implicit variable declarations, C++-style operator overloading (Smalltalk style operator overloading is work, though) and untyped variables.
Try out fish, the friendly interactive shell.
It is to larff!
And does anyone else think it funny that for a language that slices, dices, is a floor wax and a dessert topping, the language manual is only available as an executable?
(I suppose it's a Micros**t self-extracting archive or some such.)
Unlimited growth == Cancer.
Look at the following. In one piece of code they demonstrate the goto keyword, AND why you should never include it in a language:
1.7.2 Labeled statements and goto statements
A labeled statement permits a statement to be prefixed by a label, and goto statements can be used to transfer control to a labeled statement.
The example
using System;
class Test
{
static void Main() {
goto H;
W: Console.WriteLine("world");
return;
H: Console.Write("Hello, ");
goto W;
}
}
is a convoluted version of the "Hello, world" program. The first statement transfers control to the statement labeled H. The first part of the message is written and then the next statement transfers control to the statement labeled W. The rest of the message is written, and the method returns.
${YEAR+1} is going to be the year of Linux on the desktop!
"Oh come on. ActiveX is a nice script kiddie hacking tool...."
Fair is fair, you hit the nail on the head. Too many people slag off MS products around here, saying they are good for nothing. You on the other hand have shown that there is always someone who finds these technologies useful, in this case, malicious crackers.
Moderate that man up!
${YEAR+1} is going to be the year of Linux on the desktop!
"finalizers" are (confusingly) called "destructors"
Not that confusing if you know that they're called destructors in C++ (though I believe that C++ destructors are somewhat different from Java finalizers.
Does this give my age away? You may all sneer at it if you like but your taxes are probably calculated in it!
Hopefully DFlat will be just another of those ephemeral things that go away. The things that will stick around are C, Cobol and (sadly) Basic.
Cobol is what Corporations and Governments run on. C and its Variants like C++ are what real work is done on making serious stuff. Basic was just about the only good thing MS ever put on the PC. They just scr*w*d it up trying to make it fit for grown ups.
Don't worry about it. C# or DFlat is just a spoiler. If the US legal system can get its' finger out, it will be quietly forgotten.
I'll see your Constitution and raise you a Queen.
fWidth: Integer;
property Width read fWidth write SetWidth;
This defines a Width property which has a write accessor, but when the value of Width is needed, it can be taken directly from the fWidth field (which is presumably set by SetWidth). You could also have a property that simply mirrors a field (read fWidth write fWidth). In C#, you need to write accessor functions instead of using efficient direct memory access.
property ColumnWidths[Index: Integer]: Integer read GetColumnWidth write SetColumnWidth;
This defines two indexed properties: ColumnNames and ColumnWidths. ColumnNames is the default property, so writing MyInstance[5] is equivalent to writing MyInstance.ColumnNames[5]. C# only allows one indexed property per class -- the class's "indexer", which behaves like a default indexed property in Delphi.
Visual IRC: Fast. Powerful. Free.
They want an easily supported alternative to VB that looks standards compliant and doesn't encourage people to move to other platforms. C and C++ is still the way to do it (no don't take away my pointers, I like my pointers) and everybody else will continue to use them because for some things there is no substitute short of assembly. Why spend the time mastering everything when you can do it all with one tool. But the VB people might finally get to write some solid server code.
I agree with everyone flaming the name. What were they thinking?
C# provides the ability to write "unsafe" code. Such code can deal
directly with pointer types, and fix objects to temporarily prevent the
garbage collector from moving them. This "unsafe" code feature is in
fact a "safe" feature from the perspective of both developers and users.
Unsafe code must be clearly marked in the code with the modifier unsafe,
so developers can't possibly use unsafe features accidentally, and the
compiler and the execution engine work together to ensure that unsafe
code cannot masquerade as safe code.
Read Epic the first RPG novel.
I agree with most of what has been said here -- yes, you can get around needing templates by using inheritance, and yes, it's often ugly and/or inconvenient. But not only are there already some generic Java compilers, Sun has also proposed the official addition of generics to Java.
Java is definitely still a maturing language and I think it has a lot of potential. One thing I'd like Java to be is more of a functional language, like Lisp or ML.
Easy there Tex!!
:(
Quake2 runs well on several platforms because they wrote good C code to make that happen. Still though, C is compiled and that helps...alot. If they wanted to make it SCREAM on any one platform they would have coded it against a specific architecture, using quite a bit of assembly I bet. They chose not to.
There is no rule that says MS has to make stuff work well on other platforms. They will, however, have to start cooperating better with other platforms if they want to continue to succeed as an entity. Thats what SOAP is all about.
MS will never care about portability. They will start caring about interoperability.
By the way...I didn't see Sun lining up to license COM. Why not? They thought Java was better. Thats good. Thats healthy competition. That will make MS work harder.
Unfortunately for use developers...thats one more thing we will have to learn
I'm still working on a clever footer.
It is ironic that, despite the general community's disdain for MS, Slashdot certainly benefits from the existence of MS.
The MS stories on Slashdot consistently get a huge number of posts.
I'm still working on a clever footer.
Thats ok fedos, this moderation crap is worthless anyway. I write what I write, and I realize there is a hostile crowd here. There are also many open minds.
Everyone talks about platform independnce, but what I really think what people want is interoperability. The funny thing is you don't need java to do that. Well written C/C++ code can easily interoperate on multiple platforms (look at Quake). Heck I have been hacking at some REALLY OLD fortran code written for an IBM mainframe 30 years ago and it compiles just fine on my PC.
So you don't need Java to interoperate. Stick to the standards and your code will fly on whatever platform is standards compliant.
Unfortunately Sun thinks they are a standards body. MS is not going to allow another company dictate how they create their software no matter how much we bitch and moan.
I like the fact that MS went out of their way to bring me Java the language, not Java the religion. If I wanted to program for an MS platform, and I wanted to use Java, I would have chosen J++ because it was optimed for Windows. If I wanted my code to run somewhere else, I would have chosen Cafe or JBuilder.
I'm still working on a clever footer.
Just to be sure you know what you are talking about, ActiveX is a technology not a language. ActiveX is what Java beans was patterned of off.
I'm still working on a clever footer.
I don't think this language is about developing new versions of desktop software. I think it has something to do with the previously announced .net strategy.
I'm still working on a clever footer.
I never said "first" I said ActiveX wasn't a language, but a technology.
I'm still working on a clever footer.
if (expression)
The point was that the compiler will complain if the evaulation of the expression does not return a boolean, as opposed to the (i=0) will not return a boolean
This looks exactly like JAVA... am I missing something??? Maybe the DOJ should see the reference manual for this...
MOO
C-sharp has seven sharps in the key signature
I don't think so. D^b is harmonically different, but in the diatonic system they are the same. If you play a brass (harmonic) instrument, you can see this for yourself when a harmonic D^b is actually higher than a C^#.
Look at the properties of the document in Word and you'll find the following:
Feature Cool
Even though Microsoft has officially denied it, this product _is_ their previously announced but then cancelled 'Java-killer' 'Cool'.
Whoops.
Funny. Starting in 1991, Al Stevens (a DDJ contributing columnist) created a text-mode GUI framework called D Flat. It was kinda like Turbo Vision as I remember.
???I seem to remember he named it D Flat because he didn't want to use C sharp, which was another windowing system????
I agree that the moderation system needs to be changed somehow, but putting a delay on it wouldn't be very fun. :) You'd have to wait for several hours before you could see what posts are good and such, and few moderators would bother going back several hours after the story was posted. I think a more fundamental change is needed, but I don't have any specific ideas. Oh well, at least I didn't get modded down for what I said. :)
------
Thank you for demonstrating my point so well.
------
Ha. Objective C. ha ha! MS is certainly not going to switch to a language popularized by Steve Jobs, et al. vicious I can't believe you got moderated up! end vicious
The buzz I'm hearing about C# is all positive from the MS camp. CEF (Common Executable Format) on CE was not as positive as they wanted it to be. Case in point - I've never seen any articles about it or even any hype. This is their second iteration. (Although we should count VB or MFC as the 0th iteration).
Why would MS worry about optimization on alpha or ppc? They no longer support those architectures. Only x86 nowadays (although CE lives on other things).
Read the info, this has been thought through...and makes sense in MS's world. (Maybe not in the real world - but its good for MS's world)
I'm skewed because I'm closer to the CE side of things... The desktop world might be different... But I don't think dramatically different
The idea of both a high and low level language in one is a good one. No doubts about it.
But Microsoft's implimentation is very poor.
If Microsoft would fix the implimentation, wich they will not do, then C# *might* have been a good language.
It at least would have been, and might still be, worth learning.
-----
If my facts are wrong then tell me. I don't mind.
The long, sorry history of ActiveCOM+ is one of interesting ideas in component-based architectures being scuppered by the painful process of implementing them. Anyone else try big 3 tier systems in 16 bit VC++ ? Ouch !
Every year or two, the technology gets simplified, the tools get an infinitesimal amount easier to drive, and marketing invents a new brand for it. Eventually it reaches the point where the average retrained COBOL'bert can make something vaguely useful, and the market then buys into it.
VC++ is still painful to work with; MFC is pants and COM work is a gazillion times more awkward than it ought to be (especially compared to VB or VJ). M$oft developers need a better tool for making moderately complex server-side COM components. I used to hope this was J++, but even if it's going to be some bizarre Redmondolalia, then it's better than MFC.
Give M$oft their due - OO (Yes, I optimistically wrote Eiffel class libraries too) didn't take off and componentware did. In no small part, this was because VBX put workable, useful, components onto many, many people's desktops long before penguins had even started drinking coffee. Even today, the Java mindset (especially implementing interfaces, rather than inheritance) is still much more like the COM / VB approach than the old Smalltalk-era one of the huge divergent tree of ygdrassil.
As the name suggests, this language was available with fully validated compilers in 1982, and supported most of the features that are used in this sample, but without a lot of cruft. (Okay, and no object orientation per se, but with almost all of the benefits in this regard that C# seems to allow but done in another fashion.) This sample looks so much like Ada code that it's ridiculous.
Great, so Microsoft is only eighteen years behind on this one! If only their operating systems could keep up with this rate of innovation!
If innovation is rampant in the operating systems market, why can't I get one yet with a capabilities model?
Most good compilers will pick up using a variable before it's assigned. Besides, it's seriously wasteful of CPU cycles to go around pre-initting variables where it's just not needed. That's why we've statements like short i=0 in C/C++
Pete C (M$ creats another bloatware tool)
Alison
"It is a miracle that curiosity survives formal education." - Albert Einstein
HAHA moderate this up!
Look! New previously undiscovered evidence!
INTERNAL MEMO MICROSOFT CORP
DATE: JUNE 2000
TO: Programming Department
FROM: Marketing
SUBJECT: New programming language C#
Bill has decided we need our own web language to compete with Java and some of the Unix languages such as Perl. We're going to tell the public that we came up with the idea of a language designed for the internet, and that it won't let the user make mistakes and won't have any security holes (that they can find). We need this in the next few days to coincide with the .NET announcement.
P.S. We also told them it would have lots of really pretty (useless) buttons
-------------------------------------------------FROM: Programming department
SUBJECT: Re: C# Programming language
Not a problem! We'll just take some C headers and stuff them into the Visual Basic package. We'll add a ton more of those stupid help messages that pop up when the programmer forgets a semicolon, or just at random to make sure they hate us, and maybe we'll add the Paperclip just for kicks and some extra memory usage. You guys in marketing make so much fun for us :)
---------------------------------------------Yeah this looks like a real winner :)
Never knock on Death's door:
The Anti-Blog
If thier language reference's document portability is any indication of the portability of c# itself, i wouldn't be to hopeful. I cant look at the pdf's myself because i'm on AIX and the downloads from microsoft are all .exe files.
You're confusing initialization with declaration. It would indeed be stupid to eliminate variable declaration (as JavaScript does) because many of the advantages of using C/C++ have to do with data types, which you don't have if you completely eliminate declarations. The two often seem to be correlated (ala VBScript & JavaScript). My understanding is that they're referring strictly to variable initialization. This is handy; then you know that when you declare an integer, it's initial value will always be zero. You don't get strange bugs that depend on the internal memory state of the system.
This is a Java feature. The VM does sensible things like set booleans to false, obj refs to null, ints/floats to 0, and so forth. It only does this for instance vars, however, and will complain if you try to use a local variable w/o initialization at compile time.
So yes, this is a good idea *IN THEORY*, but as usual, MS has (intentionally?) bungled the implementation.
"Honey, it's not working out; I think we should make our relationship open-source."
This is the situation I have a hard time imagining. When do I absolutely *HAVE* to use pointers? Performance isn't a good reason, since they apparently want to compile this to native. But then I don't understand how they implement their gc. Oh well. More info needed to condemn intelligently, I suppose :)
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.
True, but that still begs the question of exactly what happens in there. How are these methods special? How are the objects that use them memory-managed? It seems they're trying to walk a very tight piece of string here...
"Honey, it's not working out; I think we should make our relationship open-source."
Let me be more specific. When would you write those three, or anything requiring low-level twiddling, in a language like C# or Java? Wouldn't you use C++, C or even assembly for that?
"Honey, it's not working out; I think we should make our relationship open-source."
You guys are right! It must be crap! Look at the evidence:
1. Some of the things it does are similar to Java. Java is crap. Therefore C# is crap.
2. Some of the things it does are similar to C++. C++ is crap. Therefore C# is crap.
3. Some of the things it does are not done by C++ or Java. Making up new ideas is crap. Therefore C# is crap.
4. Some of the things it does are done by both C++ and Java. Copying old ideas is crap. Therefore C# is crap.
5. It contains features I don't understand. Anything I don't understand is crap. Therefore C# is crap.
6. It contains features I understand well. Anything that simple and obvious is crap. Therefore C# is crap.
C# is crap! Spread the word!
: Bat :
(Less sarcastically: I would love to join you in your M$ bashing, guys, but I'm just not in love enough with my own opinions. I keep trying new things. I guess it's a character flaw.)
I have discovered a truly remarkable
Assuring that everything is initialized can be tackled in a few ways:
1. Force you the programmer to initialize (Java)
2. Define that "uninitialized" variables are set to some particular value (0 would make sense). I believe this is what C# has done.
So, why shouldn't that be able to compile cleanly?
Not work or not compile?
I'm just guessing since I haven't read the spec yet, but perhaps x,y,z are objects proper and x is initialized to "null"?
(If so, that would suggest pretty poor performance...)
Combining pointers/gc. Are they INSANE?
Not really. The use of pointers in a language doesn't necessarily mean you can't also use garbage collection. Heck, there are garbage collectors out there for C. You can find one of them here. I've used it before and it seems to work fairly well.
Just my thoughts on the subject.
-j
Unfortunately the syntax is completely different.
Your wallet stays open. Our source remains closed. We are MSFT
For one, they allow for better type checking.
Moreover, I'd like to be able to write this in Java ( or any other non-proprietary language ):
enum i_color { RED, WHITE, GREEN };
System.out.println( "My preferred flag is:");
for ( i_color c=i_color.first; c i_color.last;c++)
System.out.println( "\t"+c.name );
System.out.println(":-)");
I know, I can do that with classes, but this is not the point: IMO powerful enum are a great feature in any high-level programming language.
Ciao
----
FB
I played the trombone from 6th through 12th grade. Granted I was no master, but I was around some pretty good musicians. I've never heard this before. I was taught that they were the same. Of course I didn't play D^b or C# that often either.
The C# language doesn't do much, if anything, to enhance portability. Instead they assume that the .NET interfaces are available on every OS.
The MS way: Portabilty through world dominance.
C, Objective C, C++, C+-, Java, C# - same syntax different semantics, please make it stop.
- AndrewN
- AndrewN
Ocaml!
It can be interpretted (e.g. Perl, Python).
It can be byte-compiled (e.g. Java).
It can compiled into native code (e.g. C++).
It has garbage collection.
It has a module system.
It can be object-oriented.
It's functional.
It's type-safe.
It has type inference.
It's succint.
It's sexy!
How do you pronounce this? See-Pound? See-Hash? See-Number?
----
Oh my god, Bear is driving! How can this be?
ADVENTURERS! - ANTIHERO FOR HIRE - CARDMASTER CONFLICT
"Windows 2000 is faster than NT 4.0!"
Yeah, but only if you run it on a system that's lower than the recommended specs.
I think MS has also proven that NT 4.0 is faster than Win9x is faster than NT 4.0. How, I'm not sure. I guess what they say really is true -- There are three kinds of lies, lies, damn lies, and benchmarks.
I used up all my sick days, so I'm calling in dead.
It was my understanding that C had no sharps or flats.
I'm almost positive about this (I hate to admit I don't know music--although I'm about to. People keep mistaking me for a bando anyway ^_^)
But, then again, I first learned it from an episode of Batman, the Animated Series, where it was one of the Riddler's "riddles".
Anyone else remember that episode? =D
J. T. MacLeod
Is it that hard to: tail -f error.log
Has anyone ever done any web development? Debugging CGI's in Perl is kiddie play.- windows
- linux
- mac
Now last time I checked quake3arena got far equivalent scores on at leat the linux, and windows platforms, actually framerates only differing by 2-3 frames per second.So please be a little more precise when you talk about speed. Speed isnt the reason why they are not porting it. The reason why they arent porting it becuase the language is pointless without the COM components, and Win32 APIs. I looked at the intro, and language reference.. did you?
Want to know what is looked like... Simple it looked fsckin exactly like java syntax, and even the API calls. It is too bad that M$ still cannot create products that play nice with others.
I am a webdeveloper, and when I develop sites, I dont say screw the netscape user and make IE specific, if I took that aproach, not only would I be cutting out some of my userbase, but I woul also look like an asshole for not taking the considerations of other people in my design. But of-course M$ always that we need it to be innotive crap to fall back on. Thats ok though, becuase I am sure that this will be great for Windows developers, working with COM is a pain-in-the-ass. But it is definetly a pure windows solution exactly like VisualBasic, very limited in scope, and not nearly as cool as it initially sounds. I think that modern language cover most of the bases, we have C\C++ for speed and maturity, java for platform compatibility, and elegeant design, perl for web-hacks, and get-it-done jobs. Why another language...? Becuase the world doesnt need another programming language... it needs interoperability, M$ should start thinking about how they are going to intergrate with the unix systems, becuase if they go down hill, they will have no one to hang on to but themselves. nuff said. -Nathan
...in 277 pages that describe a substantially Java like language they manage not to mention Java once . Seems that they're so arrogant that they're not even prepared to acknowledge their debt to Sun on this one. Evidently being beaten up by the DoJ hasn't taught them any humility.
Andy Armstrong
So basically G# is a F##C#ING difficult key?
<grub> Reading
Given any programming language, one can present examples of well-written, elegant code, and horrid, stupefyingly bad code. Depending on several factors (such as developer base, experience, resources, time, and the language being used) there are two major considerations in the quality of resulting code: frequency and severity.
Consider the following possibilities:
What do you think?
Remember, kids, it's only premarital if you plan on getting married.
syntactical sugar.
"Just gimme the damn plant, I'll roast the beans myself, thank you very much!"
</joke>
Remember, kids, it's only premarital if you plan on getting married.
Has anyone actually looked at this crap? Yeah, it's cool that it tries to natively incorporate XML/SOAP and all these newer Internet standards to push .com's to the edge of technology, but isn't that what Sun's been doing with Java? And (this is really good), the code - as much as my eyes could stand to read, anyway - looked exactly like Java! Ouch. And Bill said this wasn't going to be a replacement or competitor of Java.
Whatever, Bill. It's the seventh day. Give it a rest already!
On behalf of all those Slashdotters who solder on a ruglar basis, I'd like to say that I need a third arm -much- more than I need C#.
On the other hand, if one examines a 7-8 resolution (eg from B-C with an underlying harmony of V-I in C) it would indicate that the upward-leading tone (eg. C#) should be lower, since the diatonic major 3rd (based on the 12th root of 2) is about 15 beats/second sharp of the harmonic equivalent in the temprament octave.
When I was in college, our professer (David Cope, of composition software fame) used to refer to a music dictionary (name forgotten) which defined both of them exactly. I don't remember any more than that, other than that technically speaking they are in fact different.
check out my mp3 page
You don't have to "un-compile" khttpd, you have to explicitly put it in in the first place or it won't be there. And the point is that if you're serving static images, you can reduce a LOT of overhead by doing it out of the kernel. Of course, it's a completely optional feature that most people won't have in their kernels. There are thousands of these optional features that most people don't need and won't use, but some do and will.
Doh! Well there's still no WAY I'm playing in a key with 8 sharps.
And no, I'm not a wind player. If I were, I would throw a whining fit over one sharp :)
Moderate this guy up. (Shouldn't have posted AC buddy!)
I loved automatically initialized variables when I was a beginner just figuring out how to make the speaker beep. These days automatically initialized variables would cost me hours and hours of time. The log processing client I'm working on now has spit out 20 errors about mistyped variables today (I'm an average coder but a miserable typist) and if I'd had to find them myself I'd still be working of features I finished last week!
GWBASIC and BASICA had automatic variable initialization. When was the last time you used them for a serious program? Hmmmmm? Heck, even VB allows you to turn off automatic variable initialization.
Matthew Miller,
"Live Free or Die." Don't like it? Then keep out of the USA
moderate the above comment up... and, by the way, when is someone going to write a front-end for slashdot that allows for moderation of this kind...
Amazing magic tricks
Semantical sugar!
Amazing magic tricks
c# was created by microsoft, and was written for profit
forgive me if i'm thinking critically here, but what is the difference?
Amazing magic tricks
I have heard the argument between 'platform portability' and performance many times over. Java is easy to code, runs well and is platform independent. C++ can certainly be faster, but if you are careful and make use of 'standard libraries' your code base will be portable. Internet applications aside, I think the main selling point of something like java or even C# *gasp* is rapid development. I am biased as I have much more java experience than C++, but I can code a working version much sooner w/ java than any other language I use. We all know how managers and even customers can be about their product being completed on time and working. Unfortunately, those same people decide these very things for programmers.
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. ?
Does it bother you that variables within C# are all COM objects? Does your operating system support COM? Do you have a program that allows COM objects to exist on your machine? Then it can't run C#. There goes portability...
Stability. Hmmm. Complete control over the spec would imply stability. Not open-ness, but at least stability. For all the cruft in Microsoft's closed API's, there's very little change --> nice and stable, a bit like Java (I know, heresy :)
>Java doesn't have any versioning mechanism It does for serialisation. All cases are marked with a versionID, which you can override with your own if necessary. public static final long versionID = 0xCAFEBABE00000001L;
First of all, there is nothing new here. C# doesn't bring anything to the language table which hasn't been done many times before. Its just another imperative language clone (in this case, they just completely cloned Java...yay). I hoping was Microsoft would take this opportunity to really innovate and produce something with features which no one has ever seen before. Instead we get the same recycled ALGOL stuff as always; what a shame.
The language design notwithstanding however, C# is still useless; it's simply not portable enough to be a real language. I don't even mean portable in the Java sense...I mean "has a remote chance of being compiled on any platform other than win32, ever." Of course there will be people who will willingly tie themselves to passing fads like Microsoft.net, but for most part this language is relegated to the VB world of little windoze proggies. Exciting if you use VB I suppose, but not of interest to the average Slashdotter.
We can only hope this thing dissapears quickly and doesn't do too much damage in the meantime.
-W.W.
"Well it should be obvious to even the most dim-witted individual who holds an advanced degree in hyperbolic topology...
I wouldn't bet on its being a minor language. This could meet the needs of a lot of Windows developers rather nicely, and it appears designed to work nicely in modern dev environments (i.e. something more than a generic text editor.)
It's amazing to me that once again, a new language has been introduced without Eiffel's innovative Design by Contract. This is the one feature James Gosling says he most regrets leaving out of Java. He left it out, he says, because at the last minute, when Java was suddenly being thrust into the limelight, he wasn't sure how to do it right, so he left it for later, and now it may be too late to really build it in (as opposed to bolting it on as an afterthought.) It looks as though, after years of hearing Gosling expressing such regrets, MS is going to go right ahead and repeat his mistake.
Grr.
"Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
Its not bad. Really.
I mean, it doesn't go far enough. There are no templates or constrained generics, no support for design by contract, but its not bad.
I like the 'unsafe' keyword, reminds me of Modula-3, being able to section off code that you aren't sure won't crash the system, yet still letting someone write efficient code in a crunch. (Java's lets-force-them-to-offload-it-via-JNI approach doesn't work, JNI has too much overhead for many cases)
I like the return of operator overloading. In fact, the lack of overloading was one of the primary concerns which prevents me from using java in my day to day work. (I do a lot of matrix arithmetic, and it gets tedious and confusing entering this as function calls) I can understand why Java doesn't support overloading (no clear location for where it will reside, the programmer has to check both objects, etc...) but nevertheless I find it a tool that is useful when properly applied. It is just misapplied too often. However, I'm not going to prevent a trained professional from cleaning my deck with a powerwasher and force him to use a toothbrush instead simply because some yutz once hurt himself.
Its almost painfully familiar looking to anyone who has spent enough time in java and c++, which is both good and bad in a way, given that you'll tend to make mistakes, simply because you'll backslide into the behavior from one or the other that doesn't apply.
I did not see inner classes or anonymous classes, which is a shame as those are two Java constructs that I found useful. I know that they aren't original to Java, no flames please.
I don't like the return of the struct keyword, it is superfluous in a language of this type, and leads to recoding later. I can see its merits in the way they have applied it, to provide pass-by-value semantics, however I feel that this approach will cause confusion in practice, especially in a large project as you can't know if you are passing by value or reference without actually looking at the definition of the type of the parameter you are passing in (which is probably in another file). Simply looking at the function in question will not provide you with enough information.
All in all, if they had implemented some form of templates, I would have seriously considered using the language, as the rest of the design would allow me to leverage both my existing c++ and java programmers on a single project. However, without templates, I still have performance concerns for the types of applications on which I work . These qualms shouldn't really affect its target audience however, as templates aren't often required in the microsoft cut-and-paste templated mini-application development environment, and with built-in, fairly clean, COM support, it should be able to do rather well in its target market, judging simply on technical merits.
Sanity is a sandbox. I prefer the swings.
http://www.cs.mdx.ac.uk/harold/papers/Javaspae.htm l
(and it's intentional that's not a direct hyperlink)
Portability hasn't been a Microsoft concern for a long time.
Self didn't pioneer most of these concepts, even though they were apart of it. Smalltalk did, with the exception of JIT compilation.
JIT compilation became a part of VisualWorks a while ago... Sometime in the early 90's? I can't recall. But the rest of these features were first invented in Smalltalk, and then borrowed for Self.
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
So is C# a pointered java with some Visual Basic syntatic sugar? -coyo
--------------------------------------------------
The key of c# and c are differant. At one point I knew why this is, but I havent taken music theory in years.
-- the computer doesn't want any beer, no matter how much you think it does. NEVER, EVER feed your computer beer.
This reminds me of an old musical bon mot about crossing the road: "If you don't C# you'll Bb."
Change this to "Microsoft C#", and it takes on a whole new meaning...
So declare an Object and synchronize on it:
In practice I find you can often synchronize on a data structure object directly in the code that needs it locked. (If you use JGL then they're all thread safe anyway.)
So you cannot write the Melissa/ILOVEYOU-style worms in Java.
Actually, you can. They depend on the user double-clicking the attachment. Hey, presto -- you can do anything.
Call this a troll or flame-bait. Moderate this down. Don't care! :)
--
"It was hell!" recalls former child.
C++ has inner classes now? Since when? Boy, am I out of the loop!
Or do you mean nested classes? That's not quite the same thing.
---
Zardoz has spoken!
Oper on the Nightstar
Isn't this the "extend" phase of Embrace, Extend, Extinguish? bash will have trouble with "g#" - since it will think the rest of the line is commentary.
I'd like to interject the fact that Common Lisp has something called the CLOS, Common Lisp Object System, which qualifies Common Lisp as an object-oriented language as well.
Read about CLOS
I've been a C, and then C++ programmer for quite some time, but I've been using Lisp and Scheme more and more recently and have been quite intrigued.
Those who do not know the past are doomed to reimplement it, poorly.
I had a conversation with a Microsoftie (he's in their testing department for Win 2000) a year ago about this language. When the first grumblings of this project appeared (it was then called "Cool") I accused MS of simply spreading FUD because I didn't think they were stupid enough to try a platform dependent version of Java. His response made it very clear that MS truly believes people are interested in Java because of the language features and could care less about "the pipe dream" of platform independence. Hrm, maybe they are stupid enough to try this. As far as the so called "pip dream", it's funny how I've written simple Java applications and servlets that run great on Netware, Windows, Solaris and Linux. The only problems I've had, were with applets trying to run on the MS JVM in IE. Coincidence?
I can hear the lamers asking me to help them with their exploits now.
Eh...
Is this document the friggin' bible? I've never seen something get so literally dissected in my life. Need I remind that the language is nothing more than a spec at this point. Love it or hate it, it's too early to tell.
Sig this.
I admit I'm pretty disappointed in C#, as I was expecting templates.
But, to dismiss C#'s enhancements as syntactical sugar is I think something of a pain. Everyone in Perl country knows that syntactical sugar can often translate into real productivity gains, more concise code, etc.
This is my sig.
As time goes on, I believe you'll see more and more intelligence being downloaded to the client. I don't believe downright pathetic state of Java Applets in current web browsers should be your guide here -- instead, think of the successful "intelligent client" apps out there: apps such as quicktime, real player, the macromedia suite of plugins, the ILoveYou virii, the DVD controller language that won't let you fast forward over ads, and even JavaScript to some degree are all successful client scripting technologies.
I believe we'll see many more successful examples of the "intelligent client" model. It was just a shame that Java Applets weren't that example. (Java could'a been so damn cool in browsers, too...).
But the "bytecode" deal really was a red herring. Bytecode makes doing most of the things Java does quite a bit easier to implement. But it was marketed as the "cool thing", instead of the "thin g that made a lot of cool things possible", and I think that was a shame, too.
Slashdot is jumping the shark. I'm just driving the boat.
Dynamic binding is not part of java because of the Java VM. It was just a great deal easier to implement in Java because of the VM.
.NET paradigm, where everything is a COM object, there will be either be a powerful dynamic binding ability, or the language will simply fail.
Of all the ways that Java is different from C++, I rank the language's built-in support for dynamic binding as the most important (yes, I believe its even more important than GC). In fact, my biggest complaint about Java is that the dynamic binding doesn't go far enough, and the VM is built in a way that makes implementing better dynamic binding difficult.
I simply cannot imagine that C# won't have powerful dynamic binding capabilities -- in a language targeted towards the
Slashdot is jumping the shark. I'm just driving the boat.
Hey, that should be their next Windows-only 'development platform/language/mistake'! The language would be called 'M$', and pronounced Micro-Cash. Even though "M" (big m) means 'mega' in the realm of scientific prefixes, and "$" means 'dollar(s)', they'll redefine them, just like Kerberos.
Louis Wu
Thinking is one of hardest types of work.
Shiver. Jim Fleming was and will always be a kook.
Goodhew made no secret of Microsoft's intention to upstage Sun and Java. "Unlike some of our competitors who are trying to find an organization that will rubberstamp their proprietary control of the standard, we're aiming to work extensively with a standards body," he said.
Sorry for this display of ignorance, but what's a "dynamic" array?
Is that any different than e.g.
String sa[] = new String[10];
that Java already has?
Would you care to tell me how Java implements String pooling?
What is string pooling? Do you mean interning?
I imagine you'll find that it keeps reference counts.
No. Much more likely you'll find a hashtable of weakly-referenced string objects.
Referencing counting is a bad idea. Besides what the other poster said, they require atomic updates and add size to each object. It sure doesn't come cheap. Even conservative mark/sweep GC is often faster than simple ref counts.
"The Internet is made of cats."
"The Internet is made of cats."
Glad to see you made it back, btw...
"The Internet is made of cats."
"The Internet is made of cats."
"The Internet is made of cats."
I know of one college which put thier Sun machines under lock and key to make sure that the CS students worked in the Wintel lab donated by...
The dumbing down of the profession is the M$'s single biggest and most visisble achievement. They'll be wantin to collect on that investment.
"The Internet is made of cats."
The Baez concert last year was a lot better. I did some Perl right before we went in and saw god...
"The Internet is made of cats."
You've obviously never smoked hash. But at least you listened to those nice DARE people at highschool.
--
It's a
-- Danny Vermin
I wanted to download the reference, but I don't download .EXEs from sources I don't trust.
My mom is not a Karma whore!
the genius writes code that even an idiot can understand,
while the idiot writes code only a genius can understand.
nerds transcripts
While the REAL idiot writes code that not even the compiler can understand.
This is kind of nitpicky, but I don't like their console output code...
//A namespace in the .NET
//I edited it somewhat...
Here is C# Hello World:
using System;
class Hello
{
static void Main() {
Console.WriteLine("Hello,world");
}
}
So instead of System.out.println, we have System.Console.WriteLine. Lovely, huh? Just like Java.
Unfortunately, they take this whole "Embrace and Extend" thing one step too far. Notice the following program:
using System;
class Test
{
static void Main() {
int v1 = 0;
int v2 = v1;
Console.WriteLine("Values: {0}, {1}", v1, v2);
}
}
This looks ugly, doesn't it? You have to number your printed variables and put the numbers in braces. And no, I don't know if nested braces work...
For reference, here's how it's done in Java:
System.out.println("Values: " + v1 + ", " + v2);
Perhaps you don't know quite so much about Java as you think you do!
Java can be compiled to machine code just fine, thank you. One such Static Compiler is called TowerJ!
Of course, the reason why most java you use isn't compiled in this way is because that makes it no longer cross-platform (IMO - "A BAD THING").
(TowerJ is normally used on the server side, by the way, where cross-platform isn't needed)
Besides, with the latest (read Java 1.3, still in alpha) Just-in-time compiling JVMs, performance is really not an issue anymore.
Further, JITs can be faster than static compilation for programs that run longer (like WORD) because parts of the program that run more frequently (for me, cut and paste) can be optimized more (i.e. loops unrolled more, etc). Of course, they could do this with static compilation, but most static compilers don't because the programs GET BIGGER.
You owe it to yourself to try a JVM with a JIT!
I recommend the new IBM 1.3 JVM for linux. It's really something special, and it makes Java fly!
Get it at:
http://www.alphaworks.ibm.com/tech/linuxjdk
In my tests, IBM's new 1.3 JVM ran at 85% of native code on SciMark 2.0 (a scientific benchmark for Java, but also written in C).
Don't believe me? try the benchmark yourself:
http://math.nist.gov/scimark2/
And please use a JVM with a JIT installed! You owe it to yourself!
-Michael Arick
Actually, there is something good about this language. It might encourage Sun to submit Java to the standard bodies (again). Who knows maybe Sun will consider a real open-source/free license.
Oh yeah, does anyone have those references in other than EXE formats?
Monkey sense
It's C Hash, as in another pointless rehash of C.
It won't be much different to the IE messages relating to Flash plugins. 'You need Java2 to run this application - click here to install'.
That's my point. I wish you could do more with it. I would rather write applications in java than in c or c++, but that's just not practical.
The bus came by and I got on
That's when it all began
There was cowboy Neal
At the wheel
Of a bus to never-ever land
I'd rather be lucky than good.
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. When that failed too, it finally found it's niche as an Internet language. It's too bad because I think it's a great language and I love programming in it, but I am more interested in applications that web stuff.
The bus came by and I got on
That's when it all began
There was cowboy Neal
At the wheel
Of a bus to never-ever land
I'd rather be lucky than good.
Maybe there is hidden meaning, the # can also be called the "pound" sign. Maybe M$ wants to pound out the competition.
Sorry for the bad joke. Well, not really sorry, if I was I wouldn't be posting this.
*_*
That's a good point. The easier it is to get a Java app up and running, the better for Java.
Still, even if Microsoft included Java support with their OS, you'd still have to download updates from Microsoft. If Micrsoft bundles Java 1.1 with the OS, we're all gonna be firing up our modems when we need a Java 1.2 JVM anyway. Just like when M$ updates MDAC or ADO or the VB runtime libraries...
Also, you're thinking of casual home users here- the issue won't apply to people using Java for actual work because IT departments will take care of it-- the end user won't have a choice anyway. :-)
OtakuBooty.com: Smart, funny, sexy nerds.
"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"
If Microsoft stops supporting Java on Windows, that would actually strengthen Java's position on windows. Because instead of Microsoft's FUD-soaked Java implementations giving Java a bad name, the only Windows Java implementations (JVM's) would be made by people who actually want Java to succeed like IBM and Sun.
Just because Microsoft stops supporting Java... it's not like MS can STOP you from running CompanyX's JVM on your Windows box.
OtakuBooty.com: Smart, funny, sexy nerds.
Horse feathers.
Since VB 5, you have the option of native code or P-code. The VB runtime DLL, MSVBVMxx.DLL, contains hundreds of library functions, as well as the interpreter for the P-code. Native executables require the library functions, but that does not mean they run on a virtual machine.
Pre-processing: #define using import #define System java.lang.* #define Console System.out #define WriteLine println #define Main() Main(String args[]) + C#: using System; class Hello { static void Main() { Console.WriteLine("Hello, world"); } } = Java: import java.lang.* ; class Hello { public static void Main(String[] args) { System.out.println("Hello, world"); } } Yeah, it's NOTHING like Java.
Your point about wrapper classes is a good thing to mention, but the rest of the points that were made are irrevelant given the topic of whether or not C# is a Java ripoff.
I remember reading about this 7 or 8 months ago. Wasnt it originally supposed to be called COOL (C-like Object Oriented Language, or something)? I have to give it up that C# is a better name than COOL, but, that's like saying Windows NT is more stable than 98.
Money I owe, money-iy-ay
#! .. wait for comments on the net to start executing.
C#, the portable way to program under Windows ;-)
Meuh !
Well, I don't want to bash Python, but C# does produce natively executable code. :)) and wiggled it around to make it suit their own operating system better. They seem to be rather lax in what exactly to include, however, and I honestly think there's something that could have been left out.
Granted, C# seems to be written for a single platform (well, single line of platforms).
At least, they had the decency to call it a new language, and not sodomize an existing language with their own extensions (which Inprise did with C Builder).
What they have done is take some sane subset of C (although they could have let go of goto
There are some sweet things in there however, like the lock statement.
Let's just hope this'll make Windows easier to program right.
Look at this:
1.7.2 Labeled statements and goto statements
A labeled statement permits a statement to be prefixed by a label, and goto statements can be used to transfer control to a labeled statement.
The example
using System;
class Test
{
static void Main() {
goto H;
W: Console.WriteLine("world");
return;
H: Console.Write("Hello, ");
goto W;
}
}
I don't claim to be brighter than Microsoft, but, eh, if I'd redesign a language, I'd have the common sense to strip out the butt ugly parts of it.
MS has already submitted the language spec to the standards bodies, unlike SUN. And they are addressing cross platform issues with this language as well.
Do some research before you speak.
The Toddler...
Who thinks 99% of the post on Slashdot are just drivil.
The latest version of Windows (Windows5000000, in keeping with Microsoft's numbering style) will have operating system support for C#, and will not let anything written in another language to run properly. Microsoft will claim that this is "a feature", that "users wanted this", and "the other languages were just rejected by the market".
In addition, to address concerns that other companies are _illegally_ writing compilers for C#, Microsoft decides to drastically change the language so that none of these compilers will work with the new "official" Microsoft C# standard (this also forces everyone to buy the new Microsoft Visual-C# compiler). And to make sure that people don't write unauthorized development tools again, Microsoft decides to make all of the changes proprietary and not to tell anyone about them. Aha, now Microsoft has TOTAL CONTROL! Mwahahahaha!
Donny
P.S. Does anyone else think that the only reason Microsoft didn't call it C+ is because it was already a fruit drink?
Actually Micrsoft created quite a nice implementation of Java for windows, including the first JIT JVM that I know of. Of course, they also tried to "embrace and extend" Java... But Sun layed the smack down in court, and Microsoft is now prohibited from adding extra features to the language. So what's there to fear?
Classes are _always_ wrappers for data. The reason you have to use the long declaration is because Java is a strongly typed language. Actually, many would argue that the problem with Java isn't the fact that the short way creates primitives, not objects, but that the problem is that the short way exists at all, and that primitives exist. I forget why the Java folks at sun decided to include the primitives instead of making them objects, but they had some rational...
Office 2001 for Mac OS X is not a Cocco app, but rather a Carbon Application which does not use Obj-C. Besides, Office 2001 for Mac OS X won't be released until January, about 6 months after the Mac OS 9 release.
Yes, sometimes. Or you think you have more control. Optimization is best left to the compiler in most cases. If you really need to squeeze the last cycle out of your code, you need to use assembler sometimes. For some applications C is the appropriate choice, however, it really does not matter if a graphics window prompting for user input is redrawn in 3 milliseconds rather than 6.
Apps are generally smaller
I think that is only an issue for embedded systems with very limited memory. Does it really matter that you can save a few hundred bytes here and there if your application loads a 200K splash screen?
My biggest concern is that soon we'll have an entire generation of programmers that has no idea (much less cares) what really happens under the hood.
As someone else pointed out, that has already happened. How many programmers know assembly nowadays? How about CPU registers? And what's a NAND gate anyway? Of course, the whole point of high-level programming languages is to isolate the developer from these concerns. But, as always, there's a trade-off.
I think that it's important for a developer to have a fair understanding of computer systems from top to bottom
Well, maybe, but isn't that the field of the system engineers rather than programmers?
Just my $0.02.
MSN 8: Now Microsoft even has bugs in their ad campaigns.
by all means, that should be 42.
With great power comes great electricity bills.
I went through the documentation. It's basically Java embraced and extended. No templates; no generics. Two categories of types: value and reference. Value types are like int and C structs, while the reference types are more like C++ and Java classes. Garbage collection. You can't alias value types, but you can't avoid it for reference types. All types inherit from an object type. Property lists. Closely tied to COM and the MS APIs. Performance is likely to be a problem. No sign of careful or deep thought being given to the language definition. Perhaps the COBOL of the new millenium?
--Performance is likely to be a problem
-Might I ask what leads you to draw this conclusion?
1. Garbage collection. That can lead to problems in two contexts--when the program decides to collect the garbage, and when memory gets so fragmented that finding a block to allocate is a day-long task.
2. The inheritance tree. Not only are reference types accessed indirectly, but construction and destruction has to pass through everything between the root and the type being constructed.
3. Lack of generics. User-defined algorithms and containers tend to be inefficient.
4. Strings being a reference class. In Java, the construction of temporaries (especially string temporaries) is a big slow-down.
5. The general tone of the language manual, and the tendency of MS to design things that slosh as they walk.
A labeled statement permits a statement to be prefixed by a label, and goto statements can be used to transfer control to a labeled statement.
Everything in this post is false.
Gates thoughts...I'll call it Java, err C err C#!
Headlines:Microsoft claims copyright to the letter C. Apple sues over use of c in the name of their Macintosh line of computers. Linux users try to open the letter C under the GPL. Microsoft buys all the letters from the alphabet. What i just said will cost me $10. AOL cries because they only have a stupid acronim.
"Your just jealous because the voices only talk to me"
To the best of my knowledge, unsafe keywords only effect auto-garbage collection...
2 1337 4 u!
C-papers
Smoke hash, smoke
Personally, I feel that it should be called C-Pound (sorry to those in .UK), as it's used by a company that will Pound you into submission, and the bloat of the program probably adds up to quite a few pounds.
Marxism is the opiate of dumbasses
This is true, though the idea of being able to do a majority of testing for a Window$ based application on a platform that is stable had crossed my mind. Oh well, looks like MS has brought out the Tac Nuke to shoot themselves in the foot.
Marxism is the opiate of dumbasses
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.
Looks this may be a windows only tool, sad to say. I should have guessed that MS would do something like this. Creating a language standard then patenting it, I think that would put a crimp in any competition in the compiler market..
Marxism is the opiate of dumbasses
remember, Visual Basic "compiles to machine code"... but still requires a virtual machine...
That's what Java does. The primitive types (int, char, byte, etc..) are values and all objects are pointers that are automatically dereferenced and referenced as appropriate without any syntactic sugar ala C's "*", Pascal's "^" etc. And I really hate it. It's a not so obvious 'feature' that trips a lot of beginners up (hence half a lecture required to explain to first-year CS types why object1 == object2 doesn't quite work).
Worse still, Java has the String object that is treated like a primitive 90% of the time...
CHash is actually a hashing code produced by someone well outside M$ and is open sourced for the use of text based games like MUDs and MUSHes.
CHash itself is good stuff, so let's not sully the good name of a complete innocent. :-)
In space, no one can hear you moo.
when i first saw it, i thought it was pronounced "C-pound".. as if to pound c syntax into yet another new language...
---
They probably started calling it C-hash because they ran out of words starting with "e-". In the words of Captain Picard, "There's plenty of letters left in the Alphabet."
Sun did it for performance, though you'd think they'd be able to move the object to a primitive inside the VM, and still get this performance.
In any event, C#'s ambiguous "it's a primitive" "it's an object" and "it is pass-by-value while object are pass-by-reference...but then we add the ref keyword...and the out keyword" nonsense is a sad way to go about things.
All it does is make the language pointlessly inconsistent, and adds a slew of keywords that fail to make the language simple.
Uhh, accessor/mutator names should be based upon what the property represents, not its variable name.
The whole paradigm is to remove the functionality from the implementation.
setName("MyName"); would be appropriate, even if you were brainwashed enough to call your instance variables m_lpszname, or stored it in another object.
> Java doesn't let you use primitives (int, short,
> etc) as classes without wrapping them yourself
> (lots of overhead).
No more overhead than C#'s wrappers.
Plus C#'s contradiction of being both derived from object and not is stupid inconsistancy. They add a program time distinction that could be determined by the runtime system, for the sake of performance. This, like Java's approach, is stupid, but C#'s is worse because of the ambigous inconsistancy in what exactly a native type is.
It adds countless stupid features like ref and out, forever requiring their use, when something derived from object should be a reference automatically. Instead, you have this nonsensical native type distinction. This does not simplify the language any, and is hardly better than Java's method.
> 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.
Java does provide this, via JNI, so you're incorrect.
I would contest that claiming that such a language is "simple" when it allows you to directly muck with this, is laughable. This is yet more complexity, for a language that is supposed to simplify C++.
> Java doesn't have a "foreach" statement.
> 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
These two are importantly related.
Java and C++ both provide iterator mechanism for navigating collections. These iterator types allow for efficient navigation of collections, since a given collection might not be easily accessible as a vector.
If you were to index over a tree that is providing an array interface, how exactly is that efficient?
What of a linked list?
If all you provide is an index operator, you're definitely not providing a generic collection navigation mechanism.
> 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.
These provide nothing for encapsulation. This is a sad unneeded feature that will lead to inconsistancy in the naming of accessor/mutator methods. For a single variable "property" you have this stupid interface (which masquerades as a normal instance variable), while a property that is accessed by more than a variable name (such as by keys) sees no benefit. So now you have instance-variable look-alikes and set/get pairs.
This is pointless inconsistancy, and provides nothing for encapsulation.
C# is itended be Java-like, in terms of syntax, simply because Java apparently has seen popularity due to its simplicity. No, it isn't exactly like Java, but it's anything but better.
In the end it's not simple, it doesn't provide type-safe parametric polymorphism, has pointless inconsistancies, and doesn't provide anything new to programming languages or even improve on an existing language, except by providing instant COMification, which is only useful for Windows.
No, C# uses single inheritance. It's right there in the documentation.
"Classes support single inheritance"
"Teach Yourself C# in 21 Days" or "C# for Dummies"?
Remember, You are unique...just like everyone else.
From clangref.doc, page 15:
I think "Orwell" would make a catchy language name.
Oh, and is anybody else reminded of the barbershop-quartet episode of The Simpsons? "We need a name that's clever the first time you hear it, but less clever every time you hear it after that." "How about the B-Sharps?"
When all you have is a hammer, everything looks like a skull.
To be fair, this is why nearly all experienced Perl coders use -w and 'use strict', thereby causing the compiler to enforce variable declarations and warn about use of uninitialized variables.
When all you have is a hammer, everything looks like a skull.
"C hashed" would be appropriate.
TWW
"Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
Anyone think this'll last any longer than that?
One more thing...C++ is, of course, the increment of C. Basic programming joke. I think calling it C# instead of C^2 or J-- shows that Microsoft can't even get basic coding right.
> C hash
Are you sure it's not spelled C ash?
Thanks for the tip, but alas, it still doesn't make up for the fact that it's a Word document.
It should have been called Object Oriented Multi-Platform Advertising Hype.
Then we could all sing:
Linux advocates are in a no Win situation
Just my $.02 worth.
Some fun Information
They mentioned that this was for the .net stuff, and wasn't their motto a computer on every desktop? It sounds like they're pushing for a dummy terminal on every desktop now. /MSerf/tty1028023757900182 - The handle of the future.
OK, I took a once-over through the document (I actually looked at the Word one) and was unimpressed. Most of my feelings were expressed by others, so I won't repeat them here. As far as being able to do system-level code, it has a number of problems. (Of course, who in their right minds would code an OS, for example, in C++?)
The big problem I see, though, is that people who are doing telecom protocols are going to find tough sledding in using McLanguage to build packets.
What I want to know is, exactly WHO is the audience for this new, non-portable language?
Good programmers won't need these trivial incremental "improvements", and a new language isn't going to make crappy programmers any better.
If anything, this 'more intuitive' language will just invite more non-programmers to dabble in coding, thus proliferating the already festering heap of shit code in the world.
DirectX vs. OGL all over again. "Innovation"... yeah, right. Merely avoiding Java licensing fees by yet again obfuscating the development platform.
Sorry, I'm feeling cynical today.
---
https://www.accountkiller.com/removal-requested
Hey, I actually *could* use a third arm. Two hands on the keyboard, one on the mouse. b&
All but God can prove this sentence true.
> "Embraces emerging Web programming standards"
Embrace...
> "Extensive interoperability"
Extend...
Well, we all *know* what comes next, right?
Chris Mattern
All right, all right. I've read it now (thanks to the info that it contains a conventional zip file), and must say that it looks just like Java with some stuff from C++ (ie. namespaces), as well as some additional Microsoft-specific support. How useful.
Hey, Microsoft! Wake me up when you develop a real language!
Sure, it'll strengthen Java among those of us that have the desire to install the JVM and run Java apps on Windows. But the language's power isn't going to stem from us.
If Windows doesn't have more support for Java, then Java programs won't be popular among the masses of people that use out-of-the-box Microsoft Windows.
Although I suppose it would be possible to package programs with a JVM installer, this would only work for programs distributed via CD -- it would really confuse users to have to download and install the JVM first, and you know there could easily end up being 3 copies on the same computer. The distributed installer would have to be smart enough to allow full compatability without resulting in numerous copies of the JVM residing on the user's computer.
Hopefully, this language will crash and burn and Microsoft will jack up its Java support. Or, people could just start using Linux or Mac OS X.
the true power of this language is in its web integration- the ability of any object written in c# to pass data as xml data, and to communicate with any app on any platform.
.NET strategy and c# have the potential to keep them on top for a long time.
.NET and a language called c# to facilitate this which will only ensure their power in the computing world. and don't forget that cell phones and palms and other gadgets are all part of .NET.
there has been a focus on c#'s ability to create desktop apps. but M$' new focus is in a direction completely away from the desktop since they realize that that business model will not guarantee them the future of the computing market (which they obviously must try to control). fortunately or unfortunatly (you decide) i think their
if all of their market leading desktop apps are rewritten to save all info as xml data instead of the proprietary office format, which can then be passed around from app to app no matter what the platform, this just might be their best business strategy ever.
and if this is the direction everything is going (every app, every platform able to communicate), M$ is creating a framework called
it's basically windows for the web, and the language to program it. love 'em or hate 'em, they're smart.
just my opinion. peace be with everyone.
This post illustrates a common misconception. Just to set the record straight, a compiler that can take advantage of both static and dynamic program information (read: a JIT) can generally produce much better code than one that only takes advantage of static program information. There are Java static compilers out there. Their steady-state performance is about the same as the JITs.
A variable must be definitely assigned before its value can be obtained. The example
class Test
...
{
static void Main() {
int a;
int b = 1;
int c = a + b;
}
}
is invalid because it attempts to use the variable a before it is assigned a value.
Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005
Might I ask what leads you to draw this conclusion?
Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005
Actually, while I wouldn't hold my breath for good cross-platform C# support, specifying the bit-lengths of pre-defined types does NOT point to platform-specificness.
Java's virtual machine, as one example, specifies the lengths of pre-defined types. A Java int is always 32 bits, regardless of the underlying processor, a short is always 16 bits, etc.
I always wanted to have something to do with compiler design but no company in this field offered me a job. I have a linker behind my belt though ;-). Guess I'm volunteering here...
I mean really this is the chance for the open source freaks to release this at the same time as MS or even ahead of them! Besides the language looks good enough to replace java. Given the support that SUN showed to the OSS community over the java port I think they deserve less support from us.
Why is that file an executable anyway?
What's wrong with a nice text format that anyone can read?
At first I did not notice that it was not a text file and tried to do a remote open, i was somewhat startled when winamp popped up and tried to play the file.
.sig
IIS doesn't run "in the kernel" firstly. DirectX interfaces with a HAL layer but technically DirectX doesn't operate in the kernel. Parts of the GUI does run in the kernel because, like all valid technologies, there are compromises to be made : Users and designers decided that the speed increase of putting it in the kernel were worth the decrease in reliability, especially if coupled with a zealous campaign for GUI quality (WHQL). With the proper drivers (esp. Matrox which makes astounding drivers) you get the speed increase with perfect stability.
As far as the porting, 2000 is a microkernel and can be ported easily however no one wants the ported versions. It's unfortunate but the Intel platform is simply the best choice for the majority of users currently so it was a waste of time making 4 or 5 other versions.
There is no overhead to in-process COM objects. Why do you presume that there's a lot of overhead? Obviously there will be overhead for out-of-process simply via the IPC needs, how for inprocess it's a simple V-table.
Indeed...I saw they left the goto statement around, and was immediately turned off.
:-).
Edsger Dijkstra does not approve
The fact that Java maintains its portability even though it specifies bit widths is due to the JRE/JVM which can handle 32 bit ints on 16 bit architectures. All this means is that the compiled code will not run on a system C# was not compiled for. Duh.
Platform specificity Not too ironically, Microsoft published this "introduction" in an MS-Word/DOC encoded format, compressed by a DOS-based self-extracting tool. Also, not too ironically, the introduction states early on that C# is a Microsoft platform specific language: Every object compiles into a COM object. (No mention of D-Com/Active X is made.) Ultimately, only systems capable of running COM will be capable of supporting a program compiled via C#.
The portability concerns grow from there. For instance, the introduction specifies bit-lengths for various pre-defined types. The introduction also notes that even constants and literals are compiled as Class-instances. Thus, you could write the code "6.ToString();". And you can't rely on a pre-processor for constant defining -- apparently, you must use package and class constants (and "Attributes" -- see below). In another example of platform-specific code generation, user-defined functions and methods are allowed to be declared with variable-length arguments. Are these arguments passed in Pascal or C order? It's a complete mystery to me, since Windows has historically been first-to-last argument passing, and variable-length functions were exceptions to this rule. What will happen to this code on register-heavy stack frames? Then there are the "unclean" code sections in which pieces of code can be marked as such and written, for instance, in an entirely different language, such as C or C++, or using C pointers and assembly to defeat (or rather, embrace and extend) the compiler's bytecode verifier! In sum, the language reinforces many techniques and programming styles which will be highly platform- and architecture-specific. Developers will probably struggle for years developing coding techniques which avoid these platform dependencies.
Syntax similarities. C# and Java appear to be nearly identical from a syntax standpoint. Several outstanding counterexamples include: C#'s "using" declaration to pull in classes instead of Java's "import"; C# includes new keywords such as "event" to explicitly specify the need for a delegation method; C# incorporates "rectangular arrays" which look like Pascal arrays, instead of the C/C++/Java "array of arrays" notation; an "API" to allow the inlining of other language code, such as C++ and C; and C# has operator overloading much like C++ does. Personally, I frown upon the "rectangular" array notation, as that complicates arrays and litters the language with superflous features; otoh, presumably, these arrays are much faster. I'm also upset that C# follows Java "lead" in removing automatic type conversion from integer to boolean and vice-versa; but I recognize this brings cheers to many C programmers. Finally, operator overloading, the eye-candy of all programming language constructs, was "retained" from C++. If for no other reason, I will not use C# because it allows programmers to create code more confusing than macro assembly during its prime.
Unincorporated Java features. The introduction did not mention threading at all, or security in specific detail. The lack of threading won't be missed by many, but it certainly will be a loss; threading will have to be handled through the OS and presumably through a class interface, which will again, tie the language to the MS platform (for a while). And while the introduciton briefly mentions a bytecode verifier in the compiler and execution stages, it's hard to see how this will work when methods can have variable length arguments. It's also hard to see how "unsafe" code will be safer simply because the code is "marked" unsafe. Buffer overflows and honest-to-goodness bugs will plague C# programmers just as they did C programmers.
Miscellaneous Differences. C# requires the user to explicitly pass-by-reference, whereas in Java, all Objects are passed by reference. Programmers in Java might be confused for a while at the notion that a literal like '6' will be passed as a copied Object unless otherwise specified as a reference. The "event" keyword might screw up a few unsuspecting programmers wanting to create their own "event" enum or variable or class. I did not see explicit references to the a Java-like String class with "+" style concatenation; instead, a method "WriteLine" will look somewhat like fprintf, but apparently without any type checking whatsoever. The keyword "readonly" replaces "const". Variables cannot be used until assigned to (who cares if they're automatically initialized to 0??). The concept of "Attributes" seems to blend C++ templates, C's include and typedef, and Java's RTI class methods.
Summary. This language improves on C, somewhat, by creating a simple to use Object oriented language based familiar to C programmers. But this language is more like a somewhat scaled-down C++, with single inheritance and no direct support for templates and simplified pointer and reference support. And therein lies the problem: it fundamentally does not really improve on C++, but makes the language appear more Java like. And while it may seem like Java from afar, it does not incorporate Java's main selling points: cross-platform, bytecode verifcation for security, multi-threading, and true OO inheritance (as opposed to COM "inheritance").
Still, I would strongly consider writing my first ASP COM object in C# rather than C++, and likely many other people will as well. I mean, if you're going to be against cross platform, open architectures, why use a language anyone else can use? Use C# and remain a dedicated MS shop forever.
Will we see gcc with C# support ? After all this standard is open... And it looks like a promising progaminglanguage, combining the best of C & Java & Delphi. I bet that if Redhat had announced this language, the attitude here would be quite different.
I was going to post the specs as a .pdf file, but I'm having trouble finding an anonymous web thingy. No, I'm not a moron, the Internet is going really slowly through my universities net connection
Moderators got no clue
if (i=0) isn't always a typo. You could be testing if the assignment succeeded correctly. ... }
A compiler should not complain about this imho.
Consider
int i = 5;
if (i) {
The compiler would complain because 5 is not a bool value. Do you like such behaviour?
So you can't assign a variable in an if statement?
So true is no longer Everything but nothing(null, 0, empty)?
I want if(expression), not if(bool)!!
Since when does m$ use winzip selfextractor anyway?
Having a goto can be a good thing, allthough it should be avoided at all cost.
Recommending goto is a bad thing. It leads to spaghetti programming.
I agree that there should be another way to break out of nested loops!
<O
( \
X
8===D
__
http://smoke.rotten.com/bird
Is why anyone in their right mind would use an object-oriented language where ALL objects are COM objects to develop web-based applications. I'm a java developer (who am I kidding? I'm a Code Monkey) working on the web team for a big company, and the major recurring theme is SECURITY.
Obviously, you wouldn't want a function to read text from an html header file be able to open up the passwerds.txt file if you "accidentally" pass it the right filepath.
Obviously, you wouldn't want EVERY FREAKING OBJECT you create to be able to access EVERY AUTOMATABLE function in the windows API.
i have no sig.
"If Stupidity got us into this mess, then why can't it get us out?" -- Will Rogers
Why do we need C# when Objective-C already does everything C# does, but it's been around for awhile! http://www.gnustep.org and http://developer.apple.com/techpubs/macosx/ has more info!
since it's nicely enclosed in a Windows executable, making it useless for we Mac folks
Just drop it on StuffIt Expander. It has no problem unpacking it.
Of course, you'll probably end up missing the EULA... :-)
Avi
- You have tighter control over the performance of your own code.
- Apps are generally smaller
Of course, it's harder to organize a program when you have no object-oriented constructs. C++ helps here, but things like tempories and exception-handling add a lot of (time/space) overhead. Java and C# add even more overhead. My biggest concern is that soon we'll have an entire generation of programmers that has no idea (much less cares) what really happens under the hood. I think that it's important for a developer to have a fair understanding of computer systems from top to bottom, and complex, proprietary operating systems, virtual machines and layers and layers of software are only making this harder. What do you guys think? Will the split between those who know what happens under the hood and those who don't widen with these new languages and their virtual machines and complex run-time systems? Does it matter? What about performance? What about efficient use of resources (like it matters anymore)?...when there is an existing one which looks extremely good, offers all of this, and is an Open Source language which would benefit from having more people work on it. Check out www.gnu.org/software/sather.
>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.
They are great if you like to separate your local vars from your member vars with an _m or an m_:
setm_Name("MyName");
Looks nice eh? NOT.
Since this whole language seems to only work for programs on the .NET thingymajigger, its sole survival depends .NET. Well, .NET seems to only be a way for M$ to gain more control and exclusive rights to a part of your daily computer activities and the checkbook, sorry i mean debit card, tied to them. So if all the programs on .NET are to be C# (c-pound) based, if .NET gets any popularity and current products are preasured to move ... you can immagine the power M$ will gain. Unfutunatly the huddled masses are easy to move ... not everybody with a checkbook knows anything.... So .NET may thrive, and in doing so destroy the small developer with license fees.
Teamwork is a bunch of people doing what I tell them.
There is no virtual machine. Code compiles straight to a Windows .exe. And according to a MS press release dated June 26, there's an "inline c" method to allow you to program straight to the underlying platform. So give up any hope for "write once, run anywhere".
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.
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.
--
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
Main Entry: enharmonic
: of, relating to, or being notes that are written differently (as A flat and G sharp) but sound the same in the tempered scale /-ni-k(&-)lE/ adverb
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
- enharmonically
--
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
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;
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.
"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.
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.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
C.
I sometimes write stuff
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.
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.
> 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?
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.
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.
- 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.
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.)
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
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
"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
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
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
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.
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.
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.
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.
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.
/. 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 ?
Part of the problem no doubt is that many
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?)
> 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.
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.
If tits were wings it'd be flying around.
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.
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
Not trying to be a smart aleck or anything but I have to ask: ``It took hours to debug a typo?'' What about
or
I'd think those would be the first things to try when debugging Perl.
--
CUR ALLOC 20195.....5804M
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
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
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.
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.)
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.
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...
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.
"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.
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.
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
"Cause there's 40 different shades of black, so many fortresses and ways to attack, so why you complainin'?"
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
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
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.
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
"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
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.
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
Really quick development of Server-side technology. You can make regular programs in Java, Applets are just gravy :)
ReadThe ReflectionEngine, a cyberpunk style n
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.
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#.
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
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
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
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
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
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
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
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
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.
The only reference that I can find to goto in Java is this.
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?
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
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...
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).
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?
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
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
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. (-:
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.
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.
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
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
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.
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.
so sue me ;P
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.
However, unlike Java, C# compiles to machine code, not byte code. Therefore C# programs do not take the performance hit that Java programs do.
[...]
Who can tell me what is wrong with this picture ?
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.
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!
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."
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.
'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
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.
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."
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
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.
...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"?
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?
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.
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.
We use Java for web stuff (what else can you do with it?).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...
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 !!! ---
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.
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
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.
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.
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.
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
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!
... 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.
"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)
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.
:P
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".
DNA just wants to be free...
> 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.
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?
--
> 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
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
- 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!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?
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 :)
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.
<voice sounds-like="Mr Rogers">Can you say Trojan Horse? Can you say DDOS? I knew you could!</voice>
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...
...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.
DO NOT LEAVE IT IS NOT REAL
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
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 --
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?
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.
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....
2 1337 4 u!
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!
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.
C hash
See C hash run
run c hash CRASH
C# $%^&
Because if you don't C sharp, you'll B flat. :P
--
Hand me that airplane glue and I'll tell you another story.
...it apparently just relies on the same standard class libraries as VB and friends. ugh.
DNA just wants to be free...
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
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); }
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
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
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.
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!
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
"enables developers to quickly build a wide range of applications for the new Microsoft .NET platform"
.NET.
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, 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...
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.
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?
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.
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.
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
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?
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.
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."
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.
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.
"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"E mbraces emerging web programming standards'
Originally 'Creates^H^H^H^H^H^H^HInnovates^H^H^H^H^H^H^H^H^H
"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.
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.
------
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:
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."
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.
My god! Do they know what the key signature for that looks like?!? No WAY I'm playing in a key with 8 sharps.
----
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.
Innovations aside, here's what scares me the most:
..uh...27"
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