Yeah, I'd meant to say that was a small explanation of why the things were used, not why they're there. Erasure is explained in a small amount of detail here:
Generics are implemented by type erasure: generic type information is present only at compile time, after which it is erased by the compiler. The main advantage of this approach is that it provides total interoperability between generic code and legacy code that uses non-parameterized types (which are technically known as raw types). The main disadvantages are that parameter type information is not available at run time, and that automatically generated casts may fail when interoperating with ill-behaved legacy code. There is, however, a way to achieve guaranteed run-time type safety for generic collections even when interoperating with ill-behaved legacy code.
Covariance and contravariance are covered quite well here. The main thing is that Generics, unlike return types and (I think) arrays) are contravariant rather than covariant in Java's Generics (and I could be wrong about this, I'm just up and this is roughly what I remember), which confuses a lot of people and leads to various strange-looking constructs.
For now, right click an executable and choose "Run as..." to run as another user. With any luck user-switching and the like will be easier in MSH (obviously the current support for just about anything on the command line is lacking).
Technically, there's no difference, no. But the point here is that GPLed/other open-sourced code is considerably easier to find, due wholly to its openness. Since most proprietary vendors don't tend to give out their source (and if they did, without an NDA, it may well actually be covered by this), it's considerably more difficult to steal.
Argh. I'm actually at work, far from the textbooks that led me to this conclusion, at present. I think the flexibility of C++ is part of the problem, however, the fact that it's possible to break the type system at will makes it less strong by default. Its reliance on pointers (which can obviously be worked around, but then, treating C++ as a programming "construction kit" is an approach that one can end up with very easily) is a pretty big problem too.
Java's Generics are crippled because there was a specification that they be backwards-compatible, so they're implemented through erasure. Not ideal. C++'s templates are, to the best of my knowledge, Turing-complete, and are not a good implementation of parametric polymorphism, although they do make it possible. Generics are far safer than templates though.
As for the casting thing, yes, I'm more than aware of that, it's un unfortunate consequence of that sort of language (with, as you point out, inheritance). Java's static typechecking is far better than that of C++, however, and that was my point. There's quite a few languages with far, far better systems still, but they are not really in widespread use in industry.
The problem with this is that Managers, or even same-level code reviewers, cannot be expected to be able to trawl through code to check for open-sourced code. Once the licence text is removed (and perhaps the code is tweaked to look more like the in-house coding practices) it's incredibly difficult to check that some unethical coder isn't stealing GPLed code, although the consequences could affect the whole company.
I believe this is the point of the insurance, but I could be wrong.
Scope and extensibility aren't really issues of type-safety, and if not handled well they're often more of a detriment to the language than a benefit.
I'm tempted to say that limits to the scope of a language (again, this is something that functional languages tend to do better) are usually a good thing, since they promote consistency. With languages like C++, more rigid coding practices need to be put into place just to be fairly safe, let alone consistent.
For what it's worth, the reason that the Java implementation of generics is like this (using erasure) is because the researchers who developed it were told specifically it had to work with old versions of the JVM.
Then Sun went and changed parts of the bytecode anyway, effectively making that (fairly serious) limitation pointless. Ah well.
C# makes a distinction between virtual and non-virtual methods (which is largely used for optimisation which is not available otherwise, as I understand it). The distinction between override (which seems a little unnecessary, but it's arguably better than ambiguity) and new stems from this.
I wouldn't say there's a huge difference between C# and Java, certainly not of the kind you're trying to imply there is. C#'s syntax is a little closer to C++, not so much the Windows API.
To the best of my knowledge, there's still not a exhaustive proof that Java is typesafe, let alone more complex proofs. The proofs are possible, yes, but they are incredibly time-consuming, and much of the time may not even catch the problems for which you look.
I can safely say that Java doesn't suck, but on the other hand,.NET is an extremely nice technology. Java is certainly lagging behind (and has been for some time) in terms of suitability to desktop applications, but it's a solid base and is extremely useful for just about everything else.
I'm sure it was in the right-click menu for a while. Strange. It's a complex operation that has little meaning to the user, though — as evidenced by the fact that most "easy to use" *nix systems hide the actual reason you need to change user (or that you're changing user at all) from the user... Ubuntu and OSX are two good "off the top of my head" examples of this.
Applications being able to flag themselves as "needing admin access" might be a solution (as sudo does) but I suspect it'd be another thing that MS would be chastised for for whatever reason.
...OS lack of support for simple privledge granting...
The fairly sad thing is that Windows does have a perfectly good system for privileges, it's just not supported or (at least expected to be) used in anything less than a corporate environment.
Games shouldn't be writing to their install folders (that's what Application Settings is for) or the HKEY_SYSTEM registry branch though. This is an example of developers just being stuck in old ways of doing things.
With any luck Vista won't have people as Administrator by default. That will kill this problem, since people just won't be able to do it any more. It probably requires more luck than it really should, though.
That's the sort of thing I mean. I don't think there's a particular requirement that games are a special case, but yeah, that's a problem (I own Battlefield 2, so I've seen this). We should really be asking why admin rights are required.
Thing is, normally wouldn't matter what or when they add to their software. But their usual routine is to add some feature and raise hell over to prove they did it first and everybody else is just a bunch of loosers.
I think it's more that the tech guys will add a feature, then the marketing guys will yell about it to high heaven. Thinking about MS as one entity leads to confusion, I find, and undue hatred. I expect that Linux, with marketing guys, would be no better.
I sure don't, because most applications publishers in the windows world make it more than slightly inconvenient to run with other than Admin level privledges.
That's not actually true in any huge way any more, although it was when XP first came out, and most users haven't changed the default behaviour which was necessary to get a lot of stuff to work back then. Also there's some "high profile" applications which have been too dumb to change this (which always gets brought up in these discussions, so I might as well mention it although I don't know offhand what they are).
Why doesn't slashdot just create one article titled "People that believe in God are stupid" and have all ID discussion there?
Because people who believe in God don't believe that ID should be taught as a science. Not all of them. Not even a majority.
If they called it "People who believe that ID is real science is stupid", then allowed all religious and non-religious people to poke fun at these idiots, then it'd be a bit better.
LaTeX is available for Windows. That's what MikTeX is, if I remember correctly. It works 100% fine. It's not a convincing reason to switch because exactly the same software is available for Windows, not a similar package.
Yeah, I'd meant to say that was a small explanation of why the things were used, not why they're there. Erasure is explained in a small amount of detail here:
Covariance and contravariance are covered quite well here. The main thing is that Generics, unlike return types and (I think) arrays) are contravariant rather than covariant in Java's Generics (and I could be wrong about this, I'm just up and this is roughly what I remember), which confuses a lot of people and leads to various strange-looking constructs.
That's the gist of it, yeah. There's some notes on it here, it brings in a few limitations of its own.
Yeah, I like my sudo. Windows lacks a lot of neat command-line stuff like that.
For now, right click an executable and choose "Run as..." to run as another user. With any luck user-switching and the like will be easier in MSH (obviously the current support for just about anything on the command line is lacking).
In the context of copyright infringement, perhaps it was supposed to be ironic.
Technically, there's no difference, no. But the point here is that GPLed/other open-sourced code is considerably easier to find, due wholly to its openness. Since most proprietary vendors don't tend to give out their source (and if they did, without an NDA, it may well actually be covered by this), it's considerably more difficult to steal.
Argh. I'm actually at work, far from the textbooks that led me to this conclusion, at present. I think the flexibility of C++ is part of the problem, however, the fact that it's possible to break the type system at will makes it less strong by default. Its reliance on pointers (which can obviously be worked around, but then, treating C++ as a programming "construction kit" is an approach that one can end up with very easily) is a pretty big problem too.
Java's Generics are crippled because there was a specification that they be backwards-compatible, so they're implemented through erasure. Not ideal. C++'s templates are, to the best of my knowledge, Turing-complete, and are not a good implementation of parametric polymorphism, although they do make it possible. Generics are far safer than templates though.
As for the casting thing, yes, I'm more than aware of that, it's un unfortunate consequence of that sort of language (with, as you point out, inheritance). Java's static typechecking is far better than that of C++, however, and that was my point. There's quite a few languages with far, far better systems still, but they are not really in widespread use in industry.
The problem with this is that Managers, or even same-level code reviewers, cannot be expected to be able to trawl through code to check for open-sourced code. Once the licence text is removed (and perhaps the code is tweaked to look more like the in-house coding practices) it's incredibly difficult to check that some unethical coder isn't stealing GPLed code, although the consequences could affect the whole company.
I believe this is the point of the insurance, but I could be wrong.
Scope and extensibility aren't really issues of type-safety, and if not handled well they're often more of a detriment to the language than a benefit.
I'm tempted to say that limits to the scope of a language (again, this is something that functional languages tend to do better) are usually a good thing, since they promote consistency. With languages like C++, more rigid coding practices need to be put into place just to be fairly safe, let alone consistent.
Compared to C/C++ I mean, it's worlds ahead. Obviously many languages (in particular functional languages) are better.
True, but it doesn't really scale so well as it should, and as it does in other applications. It'll get there, I'm sure.
For what it's worth, the reason that the Java implementation of generics is like this (using erasure) is because the researchers who developed it were told specifically it had to work with old versions of the JVM.
Then Sun went and changed parts of the bytecode anyway, effectively making that (fairly serious) limitation pointless. Ah well.
C# makes a distinction between virtual and non-virtual methods (which is largely used for optimisation which is not available otherwise, as I understand it). The distinction between override (which seems a little unnecessary, but it's arguably better than ambiguity) and new stems from this.
I wouldn't say there's a huge difference between C# and Java, certainly not of the kind you're trying to imply there is. C#'s syntax is a little closer to C++, not so much the Windows API.
To the best of my knowledge, there's still not a exhaustive proof that Java is typesafe, let alone more complex proofs. The proofs are possible, yes, but they are incredibly time-consuming, and much of the time may not even catch the problems for which you look.
I'd like to add "type safety" in there, but then I'm a programming language geek at the best of times.
I can safely say that Java doesn't suck, but on the other hand, .NET is an extremely nice technology. Java is certainly lagging behind (and has been for some time) in terms of suitability to desktop applications, but it's a solid base and is extremely useful for just about everything else.
I'm sure it was in the right-click menu for a while. Strange. It's a complex operation that has little meaning to the user, though — as evidenced by the fact that most "easy to use" *nix systems hide the actual reason you need to change user (or that you're changing user at all) from the user... Ubuntu and OSX are two good "off the top of my head" examples of this.
Applications being able to flag themselves as "needing admin access" might be a solution (as sudo does) but I suspect it'd be another thing that MS would be chastised for for whatever reason.
The fairly sad thing is that Windows does have a perfectly good system for privileges, it's just not supported or (at least expected to be) used in anything less than a corporate environment.
Games shouldn't be writing to their install folders (that's what Application Settings is for) or the HKEY_SYSTEM registry branch though. This is an example of developers just being stuck in old ways of doing things.
With any luck Vista won't have people as Administrator by default. That will kill this problem, since people just won't be able to do it any more. It probably requires more luck than it really should, though.
That's the sort of thing I mean. I don't think there's a particular requirement that games are a special case, but yeah, that's a problem (I own Battlefield 2, so I've seen this). We should really be asking why admin rights are required.
I think it's more that the tech guys will add a feature, then the marketing guys will yell about it to high heaven. Thinking about MS as one entity leads to confusion, I find, and undue hatred. I expect that Linux, with marketing guys, would be no better.
That's not actually true in any huge way any more, although it was when XP first came out, and most users haven't changed the default behaviour which was necessary to get a lot of stuff to work back then. Also there's some "high profile" applications which have been too dumb to change this (which always gets brought up in these discussions, so I might as well mention it although I don't know offhand what they are).
Because people who believe in God don't believe that ID should be taught as a science. Not all of them. Not even a majority.
If they called it "People who believe that ID is real science is stupid", then allowed all religious and non-religious people to poke fun at these idiots, then it'd be a bit better.
Thanks for information.
LaTeX is available for Windows. That's what MikTeX is, if I remember correctly. It works 100% fine. It's not a convincing reason to switch because exactly the same software is available for Windows, not a similar package.