Why not? The size of an integer - and when it overflows - is "implementation defined" in both C and C++. There is no way of saying what this function returns for a given input other then referring to your specific compiler's documentation.
And no, "all the world uses GCC" is not an argument.
OK, you're right in that I should have written "Life is better without memory leaks". But:
So theoretically, not having garbae collection would actually reduce the risk of coredumps by reducing the chances of writing to an area of memory not under the programs control.
Care to explain this? You surely don't want to say "If my memory-leaking program grabs all the memory, all the memory will belong to my program".
If you please could give an example how to produce a core dump (or smashing the stack...) in any language designed by people smart enough to include garbage collection?
You cannot tell a Swing-Button something like "If you get pressed, please call the method "doSomething" of this object" - you have to implement an Interface that forces you to chose meaningless names like "actionPerformed".
Even in C this can be avoided with function pointers. However, in real languages (heck, even in JavaScript!), functions are just another data type that can be freely passed around - and in really good languages, even be passed around partially applicated.
Say you have a function add(a, b) { a + b }. In a functional language supporting currying, you can say "let add_one = add 1" (or "add_one = add(1)" in C-style syntax). You can now take this newly generated function and store it in fancy data structures, call it when you feel like it, or pass it as a callback to a button. Try that with Java.
(Side note: There is a language extending Java to support functions as data - it's called Pizza. Try finding it on Goole:)
I also like Qt, however, the problem is that it is either Free or cross-platform (for a limited definition of cross-platform, btw.) There is no Free Qt for Windows, and not even a free one for the Mac.
The whole idea of interfaces, to me, seems to be due to the fact that you don't have callbacks in Java. This, of course, is stupid: Why can't I say "OK, you performed an action, so call this function" instead of "OK, if you insist on it, I will call my method 'actionPerformed'"?
As for operator overloading in Java, it works, as long as you are a Sun employee. There is exactly one overloaded operator, "+" for Strings.
1) Doctors are responsible for human lives. this is software. excepting the code that keeps planes in the air, missiles on target, and other obvious shit, nobody dies from a poorly-written, ugly piece of software.
Well, poorly written software to keep missiles on target would of course prevent people from dying...
Some languages that will compile to Java byte code:
Python
Tcl
Ruby
Perl
Lisp
Scheme
Eiffel
Smalltalk
C++
Ada
Basic
Logo
Prolog
Standard ML
Objective Caml
Sather
Cobol
XSLT
Pascal
Oberon
Modula-2
For some languages, several implementations are available. Some compile to Java code, some directly to bytecode. There are a lot more, mostly special-purpose languages.
It's also worth noting that PFLs are not neccessarily dog slow. In The Great Computer Language Shootout, both OCaml and MLton (a Standard ML compiler) are between gcc and g++ in CPU usage, and OCaml even in Memory usage. Don't even ask about ease of development:)
It that isn't your primary concern (and frankly, it seldom is), there are lots of interesting FPLs, like Erlang, which has support for parallel, distributed, fault-tolerant computing as a primary design goal.
However, as for the "critical mass", it's a chicken and egg problem. There are way less useful libraries for FPLs, and the documentation you get is mostly not quite written for the "pragmatic programmer".
However, I also would recommend a FPL if you want to write good code quickly and have fun doing so - I agree with the OCaml-Team chosing "The programming tool of choice for the discriminating hacker" as a motto for the language.
Not that I really know what I'm talking about (hey - this is slashdot!), but I would guess that you will at least still need a binary JDK to actually build your native one. Quite a lot of important JDK tools are themselves written in Java (even Javac, IIRC), so you need some JDK to bootstrap.
You probably won't need Linux emulation any more, though. pkg_add -r name_of_native_jdk should suffice.
Of course, you actually can run Java on FreeBSD - either in the Linuxulator, or even a native one. (Compiled on your machine! With your optimizations! Yay!)
The sad point is that it's a pain to install, due to licensing problems. To have native Java, you have to install the linux compat libs (basically a mini-RedHat), a linux-JDK, accept a NDA from Sun and download the JDK source, download a patch, and finally compile it. Of course, the last two parts aren't scriptable.
<flaimbait>Hopefully this problems go away when this propriatary Java shit is replaced by an open standard like C# and.NET</flaimbait>
Use Version numbers? You mean like with Word back than, when they upgraded from 2.x (IIRC) to 6.0 because some other Office Suite really was in it's sixth revision?
IE is definitly not pushed "so far in the kernel". It has nothing to do with kernel32.dll, it's simply that some parts of it get pre-loaded on system startup - that's not unlike the kdeinit idea, or that funky mozilla feature I just have forgotten the even more funky name of.
It basically trades system startup speed (or the timeframe between "startx" and "KDE is up and running" with kdeinit) against application startup speed. If you happen to typically run an app more than once per session, that is a quite good idea.
There is a difference between bundling a browser with an OS, which is what they did, and integrating it in the kernel. As you may have noticed, MS Windows includes more than kernel32.dll.
And, by the way, RedHat indeed kind of makes the DBMS they ship with their distribution - they basically forked PostgreSQL.
The link may work, but sorry, you obviously have no idea what Active Directory is.
It's not a directory in the sense of "something to put files in" (that would propably be "Active Folder" in MS parlance), it is a directory service, in the sense LDAP is (and in fact, you can query it via LDAP.
I really love the effords of the TrustedBSD project. I hope a lot of it gets merged to Free 5.0. IMHO some of the things they do are probably the only reasonable way to work around the flaws in usual UNIX design (like the omnipotent root).
If it only were possible to have both the advantages of TrustedBSD and OpenBSD... To bad they are, at this point, mutually exclusive. I hope the Open guys find the time to integrate some of TrustedBSDs features - of course after a thorough auditing:)
Um, code usually is what specifies behaviour. In Java, I inherit method names.
It's not hard to create, say, a list or set for any type you need. But it's way better if the language supports it generically.
And no, "all the world uses GCC" is not an argument.
OK, I really like the new Macs, but how insane must you be if you want to run a web server on an iMac?
So theoretically, not having garbae collection would actually reduce the risk of coredumps by reducing the chances of writing to an area of memory not under the programs control.
Care to explain this? You surely don't want to say "If my memory-leaking program grabs all the memory, all the memory will belong to my program".
If you please could give an example how to produce a core dump (or smashing the stack...) in any language designed by people smart enough to include garbage collection?
Even in C this can be avoided with function pointers. However, in real languages (heck, even in JavaScript!), functions are just another data type that can be freely passed around - and in really good languages, even be passed around partially applicated.
Say you have a function add(a, b) { a + b }. In a functional language supporting currying, you can say "let add_one = add 1" (or "add_one = add(1)" in C-style syntax). You can now take this newly generated function and store it in fancy data structures, call it when you feel like it, or pass it as a callback to a button. Try that with Java.
(Side note: There is a language extending Java to support functions as data - it's called Pizza. Try finding it on Goole :)
I wouldn't call a language where the result of
int foo(int a, int b)
{
return a + b;
}
is is unspecified "platform independent". YMMV.
Of couse, with Java, the situation is even worse.
Why? Life is better without coredumps...
As for operator overloading in Java, it works, as long as you are a Sun employee. There is exactly one overloaded operator, "+" for Strings.
You don't work much with consultants, do you?
Well, poorly written software to keep missiles on target would of course prevent people from dying...
- Python
- Tcl
- Ruby
- Perl
- Lisp
- Scheme
- Eiffel
- Smalltalk
- C++
- Ada
- Basic
- Logo
- Prolog
- Standard ML
- Objective Caml
- Sather
- Cobol
- XSLT
- Pascal
- Oberon
- Modula-2
For some languages, several implementations are available. Some compile to Java code, some directly to bytecode. There are a lot more, mostly special-purpose languages.See e.g. Languages for the Java VM.
It that isn't your primary concern (and frankly, it seldom is), there are lots of interesting FPLs, like Erlang, which has support for parallel, distributed, fault-tolerant computing as a primary design goal.
However, as for the "critical mass", it's a chicken and egg problem. There are way less useful libraries for FPLs, and the documentation you get is mostly not quite written for the "pragmatic programmer".
However, I also would recommend a FPL if you want to write good code quickly and have fun doing so - I agree with the OCaml-Team chosing "The programming tool of choice for the discriminating hacker" as a motto for the language.
Funny, if you use A Patchy Server, it usually isn't as bad as it could be...
Pity that HTML4.0/CSS2/DOM1 support got worse with every new release of IE, while the standards kept evolving to XHTML1.1, CSS3, DOM3...
According to MS (grain of salt etc.), everything except WinForms and ADODB.NET.
You probably won't need Linux emulation any more, though. pkg_add -r name_of_native_jdk should suffice.
The sad point is that it's a pain to install, due to licensing problems. To have native Java, you have to install the linux compat libs (basically a mini-RedHat), a linux-JDK, accept a NDA from Sun and download the JDK source, download a patch, and finally compile it. Of course, the last two parts aren't scriptable.
<flaimbait>Hopefully this problems go away when this propriatary Java shit is replaced by an open standard like C# and .NET</flaimbait>
Use Version numbers? You mean like with Word back than, when they upgraded from 2.x (IIRC) to 6.0 because some other Office Suite really was in it's sixth revision?
It basically trades system startup speed (or the timeframe between "startx" and "KDE is up and running" with kdeinit) against application startup speed. If you happen to typically run an app more than once per session, that is a quite good idea.
There is a difference between bundling a browser with an OS, which is what they did, and integrating it in the kernel. As you may have noticed, MS Windows includes more than kernel32.dll.
And, by the way, RedHat indeed kind of makes the DBMS they ship with their distribution - they basically forked PostgreSQL.
It's not a directory in the sense of "something to put files in" (that would propably be "Active Folder" in MS parlance), it is a directory service, in the sense LDAP is (and in fact, you can query it via LDAP.
If it only were possible to have both the advantages of TrustedBSD and OpenBSD... To bad they are, at this point, mutually exclusive. I hope the Open guys find the time to integrate some of TrustedBSDs features - of course after a thorough auditing :)
BTW, I guess in a case like this, DMOZ seems to win over Google in being "your friend".
Well, quite a lot of dasr appears in de.alt.netdigest. But everything but the original is definitly !recovery.