Apache Declares War On Oracle Over Java
jfruhlinger writes "The Apache Software Foundation, feeling increasingly marginalized as Oracle asserts its control over the Java platform, is fighting back, trying to rally fellow members of the Java Community Process to block the next version of the language if Oracle doesn't make it available under an open license amenable to Apache. Last month's Oracle-IBM pact was a blow against the ASF, which had worked with IBM in the past, but it appears that Apache isn't giving up the fight."
Now we know who launched that missile!
Everything I know about Oracle makes this absolutely unsurprising. It looks to me as though they're trying to cut out all the "competition" in order to ride out the recession.
You know the thing about UDP jokes? I don't care if you get it or not.
C# is tied to a single OS. That makes it a nonstarter right there.
Mono is not a portable version, it is like its namesake a disease. Meant to poison the well that is Free Software.
Geronimooooooo!
Tsunami -- You can't bring a good wave down!
Keep in mind that Oracle Java is the "reference" copy of Java. Just because its the one most people use is not the point. For many moons, there was a couple of OTHER java implementations (Too bad Oracle now owns the BEA implementation of java too). There is still one that FreeBSD has (that was actually "blessed" by Sun).
UPS Sucks
Injuns, soothsayers, and volcanoes? Sounds like one hella cool game! When'll the demo be available?
.
Prisencolinensinainciusol. Ol Rait!
> Apache Declares War On Oracle Over Java
Sometimes it seems like the world hasn't changed much in the last two thousand years.
-- IANAL, this isn't legal advice, and definitely isn't legal advice for you. Also, Squee!
C# is better than Java anyway
Citation needed. For instance, Java has much better enum support (they are proper objects) from my perspective.
IBM-Oracle Pact. I wonder how long this non-aggression pact will last? This sounds suspiciously like the Molotov-Ribbentrop Pact. If you look it up, it had a really bad ending.
Nokia went for Python on Maemo. Looks like they knew what they were doing.
Which part do you disagree with?
That's a little dramatic, isn't it? Mono is the open source implementation of .NET, which is a very solid framework I might add, though clearly MS did wield it to further Windows (I don't deny that). Mono is released under GPL, LGPL, and MIT licenses http://en.wikipedia.org/wiki/Mono_(software).
I mean, facts are facts, so why do you have to be so dramatic about it? Or I mean.. did it.. where did Mono touch you? You can tell me.
FTFY.
The Apache Indian in North America would go to war with the Athenian Oracle at Delphi over the island of Java in the South Pacific.
Too bad Oracle now owns the BEA implementation of java too
BEA never wrote a JVM. They bought JRocket shortly before being acquired by Oracle.
There aint no pancake so thin it doesn't have two sides.
Java is the new COBOL.
During the declining years of cobol, I/we watched the participants fighting to increase their portion of the pie, regardless of how much it shrunk the pie.
"Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
Mono should be looked at like WINE, useful to port programs to, useful to get some programs to run, but shouldn't be your language of choice if you want to get cross-platform apps.
Taxation is legalized theft, no more, no less.
Mono is a trap, and solely exists at Microsoft's pleasure. Once MS decides the want to kill it, out go the patent infringement lawsuits and anyone using Mono is on shaky ground unless they donate to Microsoft's coffers.
The fact that it hasn't happened yet is no insurance. Copyright/left is one thing, patents are another and I don't trust Microsoft.
Make sure everyone's vote counts: Verified Voting
c# has some nice friendly language features. But the JVM still vastly outperforms the CLR runtime.
What the Java world desperately needs is a international standard defining both the language but the set of libraries and even the byte code that goes with it. As soon as the Java world starts following an international standard (or sets of standards) instead of being held hostage by a multinational corpotation then all these petty problems will go away.
Slashdot, fix your code or at least hire someone who is competent at it to do it for you.
The license is not the issue, the patents are the issue.
If it gains traction rest assured MS will come seeking rent like they trying to do with android now.
No, it is an attempt at an open source implementation of .NET (which as you say, is a solid framework, despite all the COM crap) - which isn't much different that GCJ or Harmony - neither of which anyone that uses Java takes seriously as alternatives to parts of the Java stack (though they definitely respect the efforts and intents of the developers).
Mono is definitely NOT a .NET implementation, and nobody can use it as such in "business". And like GCJ or Harmony, no .NET developers really take it seriously for the same reasons, and the fact that most .NET developers are Windows people and couldn't care less about Linux.
However, mono though it can be used as "mono" in its own right if everyone understands the implications that brings. Many people prefer other offerings given that scenario however.
Mono violates the same patents as Android and Harmony. Microsoft bought its licence from SUN, but it does not cover Mono. Unless Microsoft makes Mono its own project, it is no better than anything else. And I thought "rewriting Hudson in C is a stupid idea". Now it makes sense...
I think he disagreed with this
"it is like its namesake a disease. Meant to poison the well that is Free Software."
No, Sun (now Oracle) defines Java and licences the trademarks and compatibility kit (ie the tests that you must pass in order to declare you are Java).
At the moment at least, nobody cares if you are a 100% complete Java implementation if you can't call yourself Java. You will not be adopted by most businesses, wont gather a large user base.
BEA don't have (didn't have?) an implementation of Java either...
And the BSD one is Sun's anyway.
It's a shame BlackBerry (aka RIM) haven't gone down the same route - they've tied themselves into a flavour of Java with a non-standard graphics API.
In what way?
Do you not think it exists solely to get MS patents into the free software ecosystem?
Do you think MS is just going to let it thrive ever?
Mono is like moonlight, it gets MS patents into free software land and lets them claim cross compatibility without any actual cross compatibility.
I prefer having the potential to shoot myself in the foot using C# instead of always shooting my foot, my leg, and my neighbor's leg using Java.
If you wanted to make this headline more sensational, you could change it to "Apache says GPLv2 license not good enough." which is what OpenJDK7 is licensed under.
Yeah, Apache may be at war with Oracle now, but this has the potential for much more widespread damage. It also puts the Free Software Foundation in an... interesting position, as this technically is the first salvo from Apache in a license war between GPL and Apache License.
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
I've got news for you.
Getters and setters are bad software engineering in general, so I'd have to consider properties to be a real fast shortcut to bad software engineering.
"When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
GP: Mono is not portable
P: Yes it is! Here is a link to its license!
Being open source doesn't make something portable.
What about functional programming then? Java kind of blows if you want to use that programming paradigm.
All your base are belong to Wii.
Would a company who only had money in mind off such InSaNe SaViNgs!~!!
Walk with Music;
-1 Troll
I've had Mono running on a few different flavors of Linux, OS X, Windows, etc. It's portable enough. Portability is a misnomer anyway. It's not as if I can just take Java code I've written for Android and it will magically work on Windows.
You must be new here.
Most Java programmers can't program Java either, so it doesn't surprise me that books on Csharp get it wrong either!
Oracle: I'd ask you to sit down, but, you're not going to anyway. And don't worry about that language.
Apache: What language?
[Apache turns to look for a language, and as he does, he knocks Java, which shatters on the floor.]
Oracle: That language.
Apache: I'm sorry--
Oracle: I said don't worry about it. I'll get one of my intern to fix it.
Apache: How did you know?
Oracle: Ohh, what's really going to bake you're noodle later on is, would you still have broken it if I hadn't said anything?
Getters I could agree with, but setters make sense in that I can stop you from unilaterally changing my objects' variables to values that doesn't make sense/cause crashes/etc...
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
Java has a huge tool base and lots of great development already done, more developers and a larger platform base. But, IMHO C# is a cleaner and more consistent language. Delegates are nice at times as well, something we're used in messaging and protocol libraries with great success.
I said no... but I missed and it came out yes.
I was about to say "how the hell is Sun still in business?" for about the thousandth time.
Then I remembered...
Too bad Oracle now owns the BEA implementation of java too
BEA never wrote a JVM. They bought JRocket shortly before being acquired by Oracle.
I wouldn't consider six years to be be "shortly." Quoth the Wikipedia entry for JRockit: JRockit, a proprietary Java Virtual Machine (JVM) originally developed by Appeal Virtual Machines and acquired by BEA Systems in 2002, became part of Oracle Fusion Middleware in 2008.
Mono runs on windows, mac, FreeBSD, linux and iOS. What more platforms would it need to be considered portable?
Not saying its perfect or there aren't other options, but at least be accurate.
---- Booth was a patriot ----
Bruce Almighty?
Most people never thought Java would become a hot potato to be careful with. No one thought that Oracle would be going after people over patents. Sun put Java under the GPL2.
Can you tell me how Mono is more safe being under the GPL/LGPL/MIT when it is using tech directly from a company that is in many ways a direct competitor and has outwardly stated it thinks of open source as "communism"? Microsoft does have patents on specific things used in Mono. Mono is also under the GPL2. Coincidence? I think not.
It's called a can of worms. It's just we have a lot of slashdotters who refuse to believe it now for whatever reason.
Once you start despising the jerks, you become one.
Oh. No. Sorry. Thought of my second guess the second I guessed.
But would I have if I hadn't made the first guess?
The Apache Indian in North America would go to war with the Athenian Oracle at Delphi over the island of Java in the South Pacific.
Sounds like a game of FreeCiv
XML is a known as a key material required to create SMD: Software of Mass Destruction
The OP stated an opinion. A citation would be meaningless. And enums are not objects in Java, though they must be declared within an object. Which is stupid, as enums are types, just like objects are.
Apache to Oracle: Do what we say or we'll resign!
Oracle to Apache: Sayanora
I don't know that they should stay, but if they want to have any influence working with Oracle, aligned along Oracle's self interest is the only way to have impact.
Declaring "war" and making threats is highly unlikely to cause any useful change in Oracle's direction.
Surely the OpenSolaris experience illustrates just how Oracle behaves w.r.t. threats.
...and put Java and MySQL back into open source - PERMANENTLY!
The policy of lying to Apache about Java was started by Sun, not Oracle.
Harmony classpath are actually not too bad. I don't know comparatively how they stack up against Hotspot's classpath, but it seems to be working for android anyways. The lacking member of the equation is GCJ or any other clean room JVM implementations which sadly do lag behind the official releases.
Bye!
Getters are good because they abstract the data model away from the object interface. It doesn't matter where the data comes from or how it's stored because access is always through a method (if needed).
What's stupid about Java is that it doesn't hide the getters and setters behind properties. Just like the data model should be irrelevant, so should the fact that you may be calling a method to get a value.
Object Pascal (and perhaps C#) does it right. The getter may be a private data field or it may be a method. It's unimportant to the user of the object.
The argument isn't about the license, it's about patents. At any time, MS could step in and say that they own patents essential to the Mono implementation. That's why people are cautious about Mono and why most steer clear of it.
The exact same thing applies to Java as well then.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
Parrot? That is a VM that can run a lot of different languages. You could always take one of the JavaScript engines -- V8, TraceMonkey+JaegerMonkey, JSC, etc. -- and adapt it to run python if you were so inclined. Also, if you like C# as a language, you could use Vala. And fossils C and C++ may be, but a lot of software is built with them including the major OSs, Web Browsers, Compilers and Virtual Machines/JIT engines.
Apache Declares War On Oracle Over Java
Slashdot never definess anything. Translated, this reads
An American Indian declares war on an ancient Greek prophet over coffee.
Who would win this election: Andrew Weiner vs Andrew Weiner's weiner.
Mono should be looked at like WINE, useful to port programs to, useful to get some programs to run, but shouldn't be your language of choice if you want to get cross-platform apps.
I write ObjectCloud in C#, test on Mac with Mono, and deploy in on Ubuntu Linux with Mono. My experience with Mono is that it's fast and reliable, as long as you're sticking with the lower-level CLR APIs. IE, it's fine for servers that handle their own sockets; but it's not good for GUI applications.
No, I will not work for your startup
GP: Mono is not portable
P: Yes it is! Here is a link to its license!
Being open source doesn't make something portable.
Absolutely correct. I have tried in vain to get Monodevelop working fully on OS X but to no avail. There are a bunch of linux specific dependencies required to have it work fully. You cannot build most of the templates on OS X let alone being able to edit a GUI inside of Monodevelop.
The current state of the OS X port is an absolute joke and show how much linux is trying to copy the "windows" way of doing things.
Jesus was a compassionate social conservative who called individuals to sin no more.
Any Java developer worth their salt, will know that anything else coming out about Oracle's plans for Java are nothing compared to this. ASF is probably the biggest source of software for Java developers. To the point that most Java software has components from ASF bundled, even if indirectly.
All of Oracle's Java based software has components from Apache. IBM's Webshpere software has components from Apache. JBoss, Spring, Google's tools... All of them...
Most of the extensions in C# were done better in D. And most aren't really necessary or useful. Now, this isn't to say I think Java is at the pinnacle of software engineering - it doesn't support a number of very nice features in "pure" OO, and there are "newer" concepts in Software Engineering (such as Templates, Aspects and Mobile Threads) that have no direct parallel. Obviously, some of these aren't getting used anywhere else either, so clearly they're not considered vital by anyone. At the moment, at least. In some respects, adding new concepts can be a bad thing, but it does mean that when those concepts are valuable, languages too rigid in their design won't be able to make efficient use of them. (C++ tries to include all kinds of new concepts, which is why it is so horribly complex. This is the price of being too fluid.)
"Better" is therefore hard to define. Better for what? The only real definition of "better" in any abstract sense is that the better language will be capable of evolving in the right direction at the right time without having too much baggage. And this can only ever be known in hindsight. Which is why Fortran is still useful in mathematics, even though it is a ghastly language -- it has evolved in ways mathematicians/engineers needed more than rival languages. In a battle of "survival of the fittest", it has survived and has thus demonstrated that it is fitter for some purposes. The usefulness of Fortran is utterly non-obvious and is only knowable because it exists.
In principle, on SMP/multi-core machines, Silk (an instruction-level parallel C), UPC and OpenMP-enabled C should have overwhelmed vanilla C by now. In practice, people just moved to better fork management, better threading libraries and better shared memory and used that to handle the parallelism. (The ATLAS maths library recently stopped developing its OpenMP support because it was inferior in practice.)
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)
>I have plenty of alternatives.
Ok. I have a mature product, which is a custom manufacturing ERP system. I am quite proud of it, it represents the peak of my career. It has been built in J2EE, and has some components deployed in JBoss, and some in regular Tomcat instances. A small ($50 million/year) company runs its factory on this system, which is responsible for supply chain, procurement, inventory control, and cost accounting. The system is dependent on more than a handful of items from the Apache toolchain.
In my shoes, would you be able to explain to my boss, how "plenty of alternatives" fit into this scenario?
The current state of OS X ports of _MOST_ software is an "absolute joke."
they're rewriting Hudson in C? really? show me a link (I'm actually genuinely interested now :) )
Time for Oracle to circle the wagons and call for the cavalry!
Browsing at +1 - no ACs, I ignore their posts. So refreshing!
- Apache Software Foundation: Check
- OpenOffice.org/Open Document Foundation: Check
- MySQL: Check
At this rate, you'll have pissed off the entire world of free software before the year is over. Maybe go for Linux next. Or the Mozilla Foundation, but I don't remember if Sun was involved there in a major way.
lol. Good job you don't use C!
(BTW, C# is a shoot-yourself language now - ever since they added var types, extension methods (omg yuk!) and similar stuff to support scripting languages built on the CLR. You can be spectacularly stupid without even realising it. They started well, but then.. kept adding stuff they liked. It'll end up like COM did).
except that in C#, there's a handy shortcut that's used a great deal.
public type x { get; set; }
which provides you with a getter and a setter method on that type without having to bother typing all that nasty code to prevent invalid values from being set. In fact, they kinda provide you with all the style, but none of the substance of get/set methods in the first place, which I find to be pretty useless. You might as well access the member variable directly. I mean, for all the good it does. It does stop your StyleCop checker from telling you off for not using get/set accessor methods though, so that's quite worthwhile. (unless you think that automated style police tools are just part of the pointless bureaucracy too)
That, I think, sums up a lot of C# - nice IDE, some nice easy-to-use features, but ultimately, its just a very verbose language that doesn't really help you write good code.
C# has unsigned data types. The lacks of which has always bugged me about Java.
It is interesting because from the point of view of any developer using Java for real work(tm), the ASF is just as important, if not more important than, Oracle at this point. I have the choice of several JVMs, but there is no real alternative to the multitude of Apache core libraries and frameworks.
Sounds fine, as long as galleons will lose the ability to sink nuclear submarines.
One that hath name thou can not otter
excuse me, but developing a C# application against the mono framework is completely portable.
MS has a legaly binding statement that says mono and anyone who implements it is not liable under any MS patents. Your argument is an ignorant non-starter.
C# is an ECMA standard. It would be pretty difficult for MS to sue the mono project.
-]Phreak Out[-
Maybe not. According to the Wall Street Journal , RIM is planning to move all of its devices toward a new OS based on QNX, beginning with the BlackBerry tablet. No word on what that might mean for Java development on the BlackBerry platform.
Breakfast served all day!
why isn't it good for GUI apps? GTK# is a good cross platform toolkit and has a good designer in mono develop.
C# is better than Java anyway
Citation needed.
Posting that is idiotic, if you know anything at all about those languages - or programming in general - you would know that there is nothing he/she can cite that would prove that statement one way or the other. Neither can be defined as better and that statement - if not accompanied by a specific situation in which one language is preferable - always comes with an implied 'IMO'.
C# is a shoot-yourself language now - ever since they added var types, extension methods (omg yuk!) and similar stuff to support scripting languages built on the CLR.
Even at the start, when C# allowed exceptions to be thrown without declaration, it had already started down the route of shooting yourself in the foot for the type of large software engineering projects with many developers that Java is mostly used for.
The principle of estoppel would seem to apply here however:
Microsoft has promised not to sue, and stated so publicly, in writing. The Mono developers (and users) have proceeded under the assumption that commitment was made in good faith; Even if Microsoft reverses their decision, they cannot then sue for infringement of the *patents they already agreed not to sue* over. Estoppel would kick in, protecting the devs & users.
There is a bigger problem: Oracle again! We know that Microsoft, for .NET, licenses certain patents from Oracle (and that Oracle earn quite a bit of money from it). Does Mono have a licence to those Oracle patents? If not, regardless of what Microsoft say, what is to stop Oracle from suing the pants off Mono (or companies that use it) for patent infringement as well?
How is using a current version of mono + GTK# different than me using .net 3.0 + GTK#?
They have said they own the patents and they have publicly affirmed they will never sue mono or people who develop using mono. case closed... next!
Actually, I believe that 'Mono' comes from the word for 'Monkey'
3/10
Python is included in the distn by default. Java is not.
Developers can develop in C or Python without adding a run time to the system.
you have to go WAY out of your way to use var and extension methods. It is still much more natural to statically type your variables and define all your methods in the class definition (well... extension methods could be a bit of an issue since it is easy, but I hate dealing with them so I don't care)
Enums in Java allow behavior to be added to the class itself. Even if the state is immutable, the ability to extend an enum to add complex behavior based on the enum type itself, is something lacking in C#'s C-like enum support.
Even RSM has pointed out on numerous occasions that free software is not immune to software patents. Indeed, he rarely misses an opportunity to remind everyone of this fact. I am very tired of hearing free software advocates bring up the patent issue and then act like free software is not equally or even more encumbered by these patents; software patents are a threat to all software, regardless of source.
I love being idiotic! "C# is better than Java anyway" is a blanket statement from an subjective zealot. Both languages have good features and bad features, but simply dismissing one because it isn't in your camp is rather short sighted.
verbose? you must write C code.
or... you know... not
http://dotneverland.blogspot.com/2008/07/yet-another-benchmark-of-clr-vs-jvm.html
FTFY.
The Apache Indian in North America would go to war with the Athenian Oracle at Delphi over the island of Java in the South Pacific.
Phocian, not Athenian... We mustn't let that Apache get lost while he's in Greece.
Using var in C# still statically types your variables, perhaps you are confusing var with dynamic. I don't understand what you mean by "out of your way"... if you're using resharper, it will give you a handy prompt to convert redundant type declarations to use var.
And if you believe the statement is actually legally binding (did you ask a lawyer? Thought not), and if you believe there are no loopholes in it, then you are what we call a "convenient idiot". Don't be offended, it's a technical term. Look it up.
Google thought Java had a legally binding statement that said anyone who used it was not liable under Sun patents. Look where that got them.
So what happens when Apache uses the GLPv2 version of the Java LANGUAGE and builds its self a VM (not a JVM) called Lava that is attractive to Open Source Developers outside the JCP? Even IBM could get leverage on Oracle if they decided to cooperate. Oracle may own the JVM but it doesn't own the VM concept, so others have a lot of flexibility. At that point, it just requires the larger community to pile on and decide they want to use it. Java becomes history covered by Hot Lava.
Every one keeps saying Oracle is going to take Google down, but if Google can show it is only using VM techniques rather than JVM techniques, I can't see how they are not in the clear. There is just way to much prior art (UCSD-Pascal 1970's vintage).
Mono is the *incomplete* open source implementation of .NET. There, fixed it for ya. Dontcha know that Mono doesn't implement all the required libraries for true interoperability with .NET (the Mono team*are* working on this, but let's get real about where the state of play is).
When I said GUI, I meant WinForms. I should have been more specific. A WinForms C# App isn't going to run well on Linux. I have no experience with GTK#.
No, I will not work for your startup
...and useful to extend to pool of developers that can write programs for the Linux platform. Developers are the only way to get and keep users. That seems to be the one meme that Microsoft has always gotten right, and the place where the Linux community could use some serious self evaluation.
The Oracle HTTP server is a simple Web HTTPD server (Web listener). It is based on the Apache Web Server provided by the Apache Group
http://www.orafaq.com/wiki/HTTP_Server_FAQ
Oracle Enterprise Linux (OEL) is Oracle's Linux distribution. OEL is based on Red Hat Enterprise Linux and is binary compatible with Red Hat (not a fork!).
http://www.orafaq.com/wiki/Oracle_Enterprise_Linux
So why isn't the open-source community taking advantage of this leverage? Just prevent Oracle from using your products for free. Make sure Oracle pays you (you = Red Hat, ASF) when they download your products. Oracle is vulnerable. Take advantage of it, for crying out loud.
Oracle is using your stuff for free, Mr. Red Hat and Mr. ASF, and making big money with it.
There is still one that FreeBSD has (that was actually "blessed" by Sun).
If I remember correctly, FreeBSD's version is a port of the original Sun implementation, not a grounds-up rewrite. So any patents would still apply.
Actually, given how they're suing Dalvik, which is not only a complete rewrite code-wise, but is not even a Java VM - I think that, for the time being, the only safe assumption is that any VM is in the patent mine field. You want to be safe, stick to languages with implementations which compile directly to native code - C, C++; if you want something more high-level, Vala.
For instance, Java has much better enum support (they are proper objects) from my perspective.
There are precisely two things that Java as a language has over C#:
- better enums
- "super" in generic wildcards
On the other hand, here's what C# - as of version 4.0, the current stable one - has over Java:
- first-class properties
- delegates & events (yeah, you can do the same with interfaces and anonymous inner objects, but it's 4 times as long)
- full-featured closures
- type inference for locals and lambda arguments
- user-defined value types
- nullable value types (with no boxing)
- ability to extend classes and interfaces from the outside
- operator overloading
- RAII blocks ("using")
- sequence comprehensions with syntactic sugar (LINQ)
- dynamic name-based member and operator dispatch ("duck typing")
- C-style pointers with pointer arithmetic and unions (for when you want to get closer to the metal)
- ability to directly call any C library (P/Invoke), with a type system that fully covers everything in C with direct mappings
I've probably forgot a few. From this list, RAII will appear in Java 7 (IIRC), and closures only in Java 8, and that's about it. Of course, by that time we'll see C# 5.0 with syntactic sugar for asynchronous code.
I'm confused. Nobody can succeed with the whole world as your enemy. Maybe I'm missing something, but from where I sit, it doesn't look like Oracle has many friends to begin with, and is losing more every day. Oracle and Microsoft have basically been enemies forever, but Oracle had other companies which were it's friends, of sorts, like Sun, IBM, and some others. It just looks to me that Oracle is going to make everyone into their enemy, and how can any company succeed, long term, with that situation?
BTW, C# is a shoot-yourself language now - ever since they added var types, extension methods (omg yuk!) and similar stuff to support scripting languages built on the CLR
You are thoroughly confused.
There is no such thing as a "var type" in C#. When you see this:
it means "declare a variable named 'x', and infer its type from the initializer". In this case, since the initializer is an int, so shall be the variable. It doesn't have a "var type", and it cannot change type later.
Extension methods are there, but they have nothing whatsoever to do with "supporting scripting languages". They appeared in C# 3.0 to back the syntactic sugar in LINQ.
There is precisely one feature in C#, which appeared in C# 4.0 (i.e. 8 months ago), that is there to "support dynamic languages", and that is the "dynamic" type, as in:
which is most likely what you have confused with "var". You are, of course, free to use it or ignore it. So far I've only seen it once in the code which has to work with MS Office via COM, and the code would have been much more painful if not for it.
Even at the start, when C# allowed exceptions to be thrown without declaration, it had already started down the route of shooting yourself in the foot for the type of large software engineering projects with many developers that Java is mostly used for.
Of all languages with exceptions, Java is the only one I know of which has checked exceptions. Hm, wonder why...
Also got to wonder why the single most popular Java framework deliberately avoids checked exceptions:
Checked exceptions are overused in Java. A platform shouldn't force you to catch exceptions you're unlikely to be able to recover from.
by and large the rest of that superset is complete crap - most of it is just a shortcut to bad software engineering.
It would be helpful to be more specific - which features exactly are a "shortcut to bad engineering", and why? Are you talking about first-class functions (delegates)? Closures? Sequence comprehensions (LINQ)? And if they're so bad, then why Java keeps trying to chase C# on all of those?
To be honest, about the only case where unsigned data types are actually used in C# is when you're calling into some C or COM library. Outside of it, it quickly becomes a mess once you start mixing signed and unsigned values, same as it always was in C.
Some people are wondering why Apache just won't align itself with Oracle and be done with this.
It's not about the GPL vs Apache License.
The true question is the same that faces Mono and .NET.
Is the Java Platform an open standard that anyone can implement or is it an implementation of a standard that Sun/Oracle made up? We all know that in the .NET world that Mono is just an implementation of a Microsoft standard that later became an ECMA (some parts) standard. Apache wants their Harmony project to be under their license not the GPL.
Let's look at this from say a C or C++ view point. Could Apache write a C/C++ compiler and library and put it under the Apache License? The answer is yes, there are a couple of patents out there that they'd have to watch for but without hesitation it is in the realm of most absolutely. Now turn that same logic over to say Java or .NET. You'd find yourself in the realm of Not really or Fat chance.
So in the end is Java truly open or are we just open sourcing something that is controlled by one entity? If you look hard at the OpenSolaris and the OpenOffice.org debates you'll see that there is a common theme going around here. Me thinks that Apache is grandstanding for a point and hoping the current tide (the anti-Oracle movement) helps push Java somewhere, where the person who is truly in control won't let it go in or at least won't care if ASF decides to leave.
An indian declares war on a priest over coffee. What happened? Someone spill the cream? Lid fall off the sugar? Get over it already! Damn oversensitive babies!
Checked exceptions are overused in Java. A platform shouldn't force you to catch exceptions you're unlikely to be able to recover from.
Java doesn't force you to do that. If the caller is unlikely to be able to recover, then you should be throwing a RuntimeException or Error, both of which are unchecked. But for exceptions that can easily be handled, it is much easier to handle them when you first write the program rather than have to go back and find all the problems later when your testing shows up that you've missed some exceptional conditions that commonly occur.
Java doesn't force you to do that. If the caller is unlikely to be able to recover, then you should be throwing a RuntimeException or Error, both of which are unchecked.
Yes, and that is precisely what Spring does for most of their exceptions.
If their talented engineers are by-and-large leaving and they are by-and-large unable to hire more, they will quickly become a dying shell of a mediocre company.
So you're saying their fall started when they got too close to Sun? Sound like Icarus ;-)
Life is too short for Java
enums are not objects in Java, though they must be declared within an object. Which is stupid, as enums are types, just like objects are.
No, enum types are classes, and enums are objects. They derive from Object (via Enum) and can be declared in their own file, seperately from all other classes. The only difference is enums have a limited set of instances.
Or you could, you know, compile your code to native machine code. Seriously, when was the last time you actually needed the same binary to work on more than one platform? If you one of the tiny subset of the population for whom the answer is not 'never,' when was the last time that this couldn't have been solved with application bundles containing multiple binaries?
I am TheRaven on Soylent News
I hope this is the end for Java. That language never lived up to its promises, and it it wasn't for the media hype, and the dumbing down of the software industry, it never would have taken off in the first place. I'd gladly trade 10 java devs for a single C++ dev.
Java doesn't force you to catch exceptions that you're unable to recover from, it forces you to either catch them or declare that you propagate them. This is incredibly important if you want to do static code flow analysis, both for optimisation and for validation. One of the things I'm currently being paid to work on is exception support in C++, and the lack of this information in most C++ programs makes life very difficult for the compiler.
I am TheRaven on Soylent News
The point of using set and get methods like this is so that you avoid exposing the implementation with the interface. It's irrelevant in a language like C++, where the header needs to contain the class layout, but in a slightly more dynamic language it's very important. In this version of the class, the set and get operations are just writing to the instance variable directly, but in a future version they might do something more complex.
I'm not sure about C#, but in Objective-C they also allow things like key-value observing to work automatically (i.e. no user code required). The framework swizzles the set methods at run time, replacing them with one that calls the original bracketed with calls that deliver notifications. This allows for some very loose binding between models and views, with entirely generic controllers. If you access the ivars directly, there is nowhere for the framework to insert the hooks.
I am TheRaven on Soylent News
Well, if you saw them, sir, they weren't Apaches.
No left turn unstoned.
That shortcut actually exists for a reason.
To be specific, if you later decide you want to implement logic while getting and setting, if you made it a public class variable instead, you'd have to recompile everything that links against it.
If I put public type x { get; set; } and later decided that I wanted to make sure x.foo != 0 during the set, I could change it to something like this:
private type myX;
public type x {
get {
return x;
}
set {
if (x.foo == 0)
throw new ArgumentException("foo cannot equal 0");
myX = value;
}
}
This requires no recompilation of any other classes, just of the class this logic is in. Granted, it's still a bad idea, as callers wouldn't be expecting an ArgumentException, but it makes sense if my logic was going to divide by that value at a later date... I've just shifted it from a DivideByZeroException to an ArgumentException.
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
I wouldn't consider six years to be be "shortly."
You will when you're my age.
Free Martian Whores!
Well... that would be like saying the KDE framework isn't good for GUIs since it doesn't support win32 or winforms UIs.
you are right... I was thinking implicit typing versus explicit typing.
I still do not use it and since nothing forces you to use it, you have to go out of your way. I feel it was put there to make VB developers feel more comfortable.
I was more interested in the content than the actual pictures... since the conclusion was basically
"these numbers mean squat since the performance variance depends greatly on the underlying environment"
Reading must be a dying art.
No, that's understanding the design of the CLR. It allows APIs that are platform specific and APIs that are platform neutral. Assuming that you build against Microsoft-specific or Windows-specific APIs, then you're not going to run well, or at all, on Linux.
No, I will not work for your startup
Microsoft might be Evil but Oracle is the DEVIL
I like to make it easy to read my code.
I don't care what MS does in their libraries, but my code will be explicit. I even use nice long variable names with underscores between words in the name!
It's a matter of which niche they better fit. C/C++ is best when speed and efficiency matter most, such as system (base) tools. Custom Application development on the other hand can accept some inefficiency in place of expressiveness and dynamism.
Table-ized A.I.
C# is tied to a single OS. That makes it a nonstarter right there.
Runs fine on my Linux box.
Mono is not a portable version, it is like its namesake a disease. Meant to poison the well that is Free Software.
Funny, given Sun's/Oracle's patent pool and litigiousness, I think it's quite clear that Java is "meant to poison the well that is Free Software".
Do you not think it exists solely to get MS patents into the free software ecosystem?
And which patents would that be? Nobody has been able to show a single essential patent necessary for implementing core C#, and yet Microsoft also made a legally binding commitment.
For Java, not only are there dozens of essential patents, we've known about them for years, and Sun/Oracle explicitly doesn't license them. And Sun/Oracle has successfully poisoned the open source ecosystem with their fake open source software.
Do you think MS is just going to let it thrive ever?
Both Oracle and Microsoft are totally untrustworthy and evil; however, if I have to deal with evil companies, I prefer to do it with some legal protections, and Microsoft offers those while Oracle doesn't.
There is another big difference between C# and Java. In Java, you are strongly discouraged from making native calls. For example, instead of using the native desktop GUI widgets, Java writes a large wrapper (Swing) around the desktop interface and tries to port all that complexity from platform to platform. In C# on Windows, I make Windows (C# friendly wrappers -- but still Windows) specific calls if I am trying to create a GUI user interface. Similar points go for certain other APIs such as ADSI, network pipes, registry, HTTP, and encryption. In fact, if you look at the general low level Windows APIs, there is a lot of functionality there that is not captured in Java.
.net API is a large collection of APIs, some of which run on Linux on C#, some that don't. Some are protected by GPL like licenses so you can use them without a fear of a lawsuit, others are not. As an example, I think there are still some controversies about some of the fancier parts of the WebForms APIs (some of the complicated dynamic HTML tables for example).
I agree that C# is better than Java at doing the basics, but C# is hard to separate from the platform that birthed it. This makes C# a difficult language to deal with if you are not writing for a Windows platform. For example, from my understanding, the port to Linux of C# is not to make applications portable from Windows to Linux (except maybe some server apps), but to make C# a productive language for Linux the ways it is for Microsoft. I expect to call native Linux APIs from C# when I am running on Linux. Why not? The benefit of doing otherwise is not so clear given the general lack of portability of C#. This approach does create stress points. The
I used it earlier this year for writing a library. While it wasn't perfect it was passable. It may have crashed a few times but I never lost my work.
In Republican America phones tap you.