In comp.os.linux.advocacy, Ayende Rahien
wrote
on Fri, 8 Jun 2001 20:59:26 +0200
>> In comp.os.linux.advocacy, Sean
>> Linux isn't quite that restrictive, although ideally it
>> would have upward-compatibility, as well. However, since the
>> source code is usually available, one can "roll their own",
>> in many cases. (Of course, this requires a certain mindset;
>> "./configure && make depend && make" is a little harder --
>> although not that much harder -- than "double-click on SETUP.EXE".)
>> Some of the savvier individuals can also make modifications.
>What is so frigging hard in putting this
>./configure && make depend && make in a script and calling it setup.script,
>and making the UI run it on dbclick?
[1] That would be up to the package author.
[2] Different file managers have different methods of indicating
a script -- although most likely the only thing looked for is
the presence of the appropriate 'x' bit.
[3] The icon for "setup.sh" is similarly constrained; there's no elegant
method by which to show that it's different than, say,
"fubar.sh" or "a_tool" (which is an executable file).
Quote:>> And then there's the wildcard: Java. Were everyone to immediately
>> adopt Java, it may no longer matter what's underneath -- this must
>> scare Microsoft, judging from their response (.NET and C# et al).
>I think that .NET is like Java should've been. (Not dvelling on the
>techincaleties here, I'm talking about general attidue)
>It provide an easy way to port existing applications to the new platform, it
>provide number of languages, and allows you to interact with the underlaying
>OS. (IIRC, Java didn't have JNI in its first incarnation)
It's worse than that; Java has no elegant method of calling arbitrary C++
code. It has to do the following.
[1] Construct -- interpretively! -- the argument list to the JNI code,
which must have a special signature. For example, strings are
'jstring *', objects are 'jobject *', etc. This is a slow process,
apparently.
[2] Call the JNI stub routine.
[3] The JNI stub routine code now has to do certain things, in order
to create strings, manipulate objects, arrays of bytes, etc.
These are documented fairly well, but are still slightly painful;
what's worse is that these are all C-oriented. (There are some
good reasons for this; C++ is still not all that standard in certain
endeavors.)
C#/.NET will -- apparently -- be far more straightforward, at least
in terms of existing models such as DCOM+. On the other hand, DCOM+
isn't all that straightforward to me personally.
And C#/.NET will be faster; there will be no interpreted code
anywhere in the system. (Ultimately, Java won't have interpreted
code either, but Hotspot does optimizations on the fly only, and
it's not clear whether Sun has standardized on a compiler switch
for storing precompiled JIT-compatible code, or not.)
One advantage Java has: it is multi-platform, unlike the CLR
of C#/.NET. This may be fixed in time as creative hackers implement
various CLR's for non-Microsoft platforms. It's even possible
Microsoft will release CLR source code -- after a few years.
(Note that C#/.NET will only be multiplatform in the sense that
C++ is: one can call arbitrary components on arbitrary machines, but
unlike Java one cannot transplant binary code without
special considerations. Source code can be easily transported,
of course.)
Quote:>I've a friend that does Java programming. (I know Java enough to recognize
>the syntax, and maybe do some simple apps, so I don't have 1st hand
>experiance here)
>He says that C# (personal experiance here is like my Java's.) is like a
>better Java.
It's a faster system, perhaps. Better is in the eye of the beholder;
Java in particular is better if only because it's out and being used.
C#/.Net, by contrast, is at best in beta.
Quote:>I must say that the most glaring defect I've found in Java is the case -
>break statement. Why *allow* this error-prone process?
>Java eliminate many of the C/C++ defects (usually by saying "this cause
>bugs, it wouldn't be on Java"), why not take this out as well?
Indeed; they could have gone with the Pascal model, which requires
a single statement after each label (there are some minor syntactic
differences: case X in '1': begin ... end ... end; as opposed to
switch(X) { case '1': { ... } break; ... } ). It may be because they
wanted the 'case' keyword and the lack of a break statement may
have proved confusing when moving from Java to C++ -- if one
were to use Java as a * prototyping tool.
On the other hand -- it does introduce that rather * bug you
speak of, the "oops, I did another clause".
--
EAC code #191 40d:10h:43m actually running Linux.
This is a .sig.