 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dr Chaos Guest
|
Posted: Thu Apr 29, 2004 6:04 pm Post subject: Re: What if...Java hadn't been invented.... |
|
|
On Wed, 28 Apr 2004 16:27:00 -0800, Jörn W. Janneck <> wrote:
| Quote: |
"Dr Chaos" <mbkennelSPAMBEGONE (AT) NOSPAMyahoo (DOT) com> wrote in message
news:slrnc90clk.cao.mbkennelSPAMBEGONE (AT) lyapunov (DOT) ucsd.edu...
On Tue, 27 Apr 2004 14:18:20 -0800, Jörn W. Janneck <> wrote:
why would javac need to be open source for this purpose? a preprocessor
could do whatever you wanted, and produce java, so that it would not
even
have to bother with low-level code generation. and, of course, this has
been
done numerous times already, for instance in order to realize some form
of
"contract" as you suggest.
source level debugging sucks.
right, but fixing this would be no rocket science. of course, this would
require modifying javac, and perhaps that is the substance of roedy's
remark.
but i still don't think that this is the main impediment to
compiling other languages to the jvm. imho, java embodies the jvm concepts
pretty much canonically, if using an ugly c syntax. the differential utility
of begin/end vs curly braces is just not big enough to bother.
|
Compiling to JVM is a different issue than to Java source code to be
processed by javac.
In that case you really are writing a full compiler.
SmartEiffel has compiled to JVM bytecodes for quite a long time now,
and you can do multiple inheritance.
| Quote: | you see the same situation (in spite of microsoft's efforts to claim
otherwise) with the clr and c#: c# is the canonical clr-notation, and my
guess is that the clr ecosystem, like the jvm cousin, will essentially
become a language monoculture with a few experimental languages at its
edges.
and the reason is that the essential part of a language is not the
syntax, but the abstractions it offers, and having more than one notation
for precisely the same set of abstractions is just a waste of time and
effort.
|
I'm not so sure. There is human psychology involved.
And as we see by the SmartEiffel and various genericized Java.succ() compilers
that you can support an enlarged semantic model in the source language.
You might not be able to LINK to it though from another language.
The JVM designers had it wrong: JVM is the next generation of linking
format beyond the utterly antideluvian 'ld'.
|
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Thu Apr 29, 2004 11:31 pm Post subject: Re: What if...Java hadn't been invented.... |
|
|
On Thu, 29 Apr 2004 08:47:20 -0800, "Jörn W. Janneck" <jwjanneck at
yahoo dot com> wrote or quoted :
| Quote: | i beg to differ on this. for instance, the jvm embodies (and enforces) a
type system, and unfortunately it isn't a very good one.
|
If you could start over, how would you change the type system in the
underlying JVM? I can hardly imagine doing it any other way. I have
not been exposed to enough alternatives.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
|
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Thu Apr 29, 2004 11:34 pm Post subject: Re: What if...Java hadn't been invented.... |
|
|
On Thu, 29 Apr 2004 13:12:00 -0800, "Jörn W. Janneck" <jwjanneck at
yahoo dot com> wrote or quoted :
| Quote: | i think that many of roedy's
points could be addressed by compiling to java,
|
I think most people would want to start with Java, but make some tiny
toe in the water change. If they had Javac that would encourage that.
Even if you compile to Java , you need to do a tremendous amount of
stuff from scratch.
I don't think Sun wants to encourage experiments in Java syntax. It
might be a great way though to TEST ideas extensively in production
before building them into the language.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
|
|
| Back to top |
|
 |
altkey Guest
|
Posted: Fri Apr 30, 2004 2:52 am Post subject: Re: What if...Java hadn't been invented.... |
|
|
"Jörn W. Janneck" <jwjanneck at yahoo dot com> wrote:
| Quote: | altkey wrote:
Jörn W. Janneck wrote:
[snip]
right, but fixing this would be no rocket science. of course, this would
require modifying javac, and perhaps that is the substance of roedy's
remark. but i still don't think that this is the main impediment to
compiling other languages to the jvm. imho, java embodies the jvm
concepts
pretty much canonically, if using an ugly c syntax. the differential
utility
of begin/end vs curly braces is just not big enough to bother.
I'm not sure that there's any significant problem with the jvm and
bytecode; there are some minor problems but nothing very significant.
i beg to differ on this. for instance, the jvm embodies (and enforces) a
type system, and unfortunately it isn't a very good one.
|
Restrictions implied in the type system also apply to the type systems in
traditional languages - COBOB, FORTRAN, Pascal, C - and some less
traditional languages - C++, Python, Perl. We'd need to move to something
like smalltalk to get some relief. Unfortunately smalltalk never achieved
the market penetration that Java has.
I do a bit of Python nowadays. It is nice for a lot of reasons but it has
its own set of weaknesses - security, separation of contract from
implementation etc. but is is a nice dynamic language.
| Quote: |
I believe the reason why the JVM hasn't attracted a lot of different
front-ends (languages other than Java) is that Java came out in the mid
1990s and it took a while before it was hugely popular (3 or so years at
least) and during that time Java as a language became the reason to
migrate more than the JVM itself. The idea that you could learn one
language (Java and its APIs) and program for Windows, MacOS, Unix, and
later Linux along with Mac OS X, was attractive.
binary portability was certainly a factor, but it is a characteristic of
the jvm, not java as a language.
|
Binary portability is a characteristic of the jvm, the jvm's bytecodes are
created by Java - specifically by people writing Java. I wasn't attempting
to offer an explanation for the way cross platform code works just for the
cool effect that it added to the Java language.
| Quote: | if there would have been competing
notations that leveraged that characteristic, while somehow magically
fixing some of the shortcomings of the language (say, for instance, the
absence of parametric types), i am sure that would have had some impact.
alas, this kind of shortcoming is not only one of the language itself, it
is part of the platform, and any fixes on the language level without
changing the jvm must be hacks (i submit jdk 1.5 as evidence).
I came from a Adabas/Natural, COBOL, C, and VB background in 1997 when I
learned Java and part of the attraction for me was that I'd only need to
learn Java and learn about its APIs. The C like syntax was ok - i would
have preferred Pascal like syntax, but that was mainly for theoretical
reasons rather than practical ones - but the fact that there was only
ONE language to work with was appealing. It meant that all the Patterns
and architecture literature could be written for the syntax of a single
language that everybody who did jvm development would be familiar with.
That was a very positive thing for me.
but isn't this simplicity somewhat deceptive?
|
The main pont i made was that a single syntax (specifically Java syntax)
provided an environment for a body of literature (specifically
Architecture, patterns etc) that was more widely accessable because the
examples and illustrations were coded in Java. Java's popularity provided a
good environment for such literature and it still does, but the
introduction of .NET and .NET's popularity mark a return to a fragemented
literature (unless examples are multilingual - C#, VB for example).
| Quote: | while i agree that java/jvm
did change the expectation people have towards portability of languages
(one of its key contributions, i think), there are just many things it is
not a very good language for, apart from not being a particularly good
general-purpose language in the first place. prior to java, you could have
said that all you need to do is learn c++ and its libraries (on the
platform that is relevant to you, say mfc), and *sans binary portability*
you would have the same situation in terms of having to learn languages,
would you not?
Now we have .NET and C#, VB, ECMA script, J#, Python# etc .... all very
interesting, all very cool for VB, Java, C#, etc programmers (since they
all receive one API and can transfer their IL code between themselves),
but not so cool for the literature about useful things like
architecture, patterns, etc.
insofar as they truly embody the same abstractions, you have a point. but
looking at the entire breadth of programming languages, c#, java, vb etc.
are indistinguishably close anyway, to the point where they are almost the
same thing. take for instance a language like sql---it provides a very
different model for thinking about programs, and it also cannot be
subsumed by java (in spite of java libraries for talking to databases, of
course), and neither should it be.
|
SQL seems to be a data/schema definition and accessing language; a far cry
from a general programming language. SQL has its own set of problems too -
a divided type system that is implementation dependent, a fragmented syntax
that is partially vendor specific, a difficult paradigm (set theory) for
programmers to properly grasp and use optimally.
|
|
| Back to top |
|
 |
, Guest
|
Posted: Sat May 01, 2004 10:29 pm Post subject: Re: What if...Java hadn't been invented.... |
|
|
Java was not invented... it was copied, one piece from here (C/C++)
another form there (Ada, UCSD Pascal, SmallTalk)...
On Sun, 25 Apr 2004 19:55:04 +0800, Mike B
<someone (AT) invalidaddress2 (DOT) someplace> wrote:
| Quote: | Would anything have popped up in its place, or would we all still be using
C++?
Mike
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|