Ruby in universities ?

G

Gregor Kopp

Oliver said:
Generics didn't appear in C# until version 2.0. Meanwhile Generics
where in Java as of 1.5. The release date of Java 1.5, according to
http://mindprod.com/jgloss/javareleasedates.html, is 2004-09-29. The
earliest mention I can find of C# 2.0 is dated 2005. Can anyone find an
earlier reference, or maybe even an exact release date?

Otherwise, it looks like Java had generics before C# did.

- Oliver

Generics were possible with the release of .NET 2.0.
It's CLR issued.
 
G

gregarican

According to my searches Microsoft officially released .NET 2.0 with
generic support included on November 7, 2005. If Java released 1.5 with
generic support included September 29, 2004 then obviously Java's
inclusion predates Microsoft's.
 
S

surfunbear

That's true but it's a starting point for discussions. Most of the
examples
you mention seem to depend on higher level languages versus
others. As hardware improves slower and bulkier languages like Ruby
should do better.


As times goes on, I would say direct pointers, goto, and lack of
garbage collection
would be more and more associated with lower level languages, real time
issues and so forth.

However in general people will disagree, I was just advocating an
analysis of the core language as opposed to the API, not that the later
is not significant, but
a language can't easily escape how it's core semantics where defined as
time progresses. Thus it may be easier to design a new language to
address a newer set of problems than adapt an old one.
 
S

surfunbear

Did sun have a court case with MS over this ?

MS did not want to go along with the open architecture of java
or some such seems I recall hearing, so they took many of the ideas
from java and made C#.
 
O

Oliver Wong

Did sun have a court case with MS over this ?

MS did not want to go along with the open architecture of java
or some such seems I recall hearing, so they took many of the ideas
from java and made C#.

I don't have much confidence in this rumour; particularly the implied
causality between "did not want to go along with an open architecture" and
"made C#". It costs money to hire people to develop a new language. And
developing a new language isn't the easiest way to "not go along with an
open architecture". If that was the only goal, Microsoft could have simply
dropped Java and NOT make C#.

- Oliver
 
O

Oliver Wong

The Ghost In The Machine said:
In comp.lang.java.advocacy, gregarican
<[email protected]>
wrote


I'm getting indications that September 30th was at one point the target
release date for Java 5.

http://java.sys-con.com/read/46202.htm?CFID=26728&CFTOKEN=526914E8-1044-D24C-3E02872D09BFD111

Also,

http://developers.slashdot.org/article.pl?sid=04/09/03/0539219

mentions "Sun's Java 5 Download Page is now serving up J2SE 5.0 RC".
This page is dated Fri Sep 03, no year -- but 2004 has a Fri Sep 03.

http://www.ondotnet.com/pub/a/dotnet/2004/05/17/liberty.html

however, is dated 05/17/2004 -- 4 months prior to Java 5 -- and
mentions Visual C# 2.0's generics.

Another page is even earlier:

http://www.artima.com/intv/generics.html

which is dated January 26, 2004, and mentions Pizza, which was
apparently eventually incorporated into Java 5, after mutating
a bit. The Java JVM apparently didn't mutate, though -- which
leads to interesting quirks. C#'s .NET environment apparently
did mutate to accommodate proper type checking.

I would guess that C# 2.0 was at least being worked on in January 2004.

http://blogs.msdn.com/csharpfaq/archive/2004/03/12/88913.aspx

is dated March 12, 2004, and goes into some detail on C# generics
as well.

Thanks, that was interesting.

It sounds like, a best, the Java team and the C# team were essentially
developping generics at the same time. So I don't think what happened was
the Java people were like "Oh crap, C# has generics! We better get it in
Java ASAP!" Rather, I think there was a lot of academic research of generics
at the time, and both teams (coincidentally?) felt "now" would be a good
time to implement generics into their languages, where "now" is 1.5 for
Java, and 2.0 for C#.

- Oliver
 
O

Otis Bricker

Thanks, that was interesting.

It sounds like, a best, the Java team and the C# team were
essentially
developping generics at the same time. So I don't think what happened
was the Java people were like "Oh crap, C# has generics! We better get
it in Java ASAP!" Rather, I think there was a lot of academic research
of generics at the time, and both teams (coincidentally?) felt "now"
would be a good time to implement generics into their languages, where
"now" is 1.5 for Java, and 2.0 for C#.

Check out http://www.jcp.org/en/jsr/detail?id=14

The basics were there for Generics long before they shipped. As JSR 14, it
was one of the first changes proposed and Example implementations were
available in the form of GJ and PolyJ back in 1998.

OB
 
A

asj

The said:
Hmmm....when did Java lose momentum? Somehow, I missed it;
seems to me it's been chugging right along. ;-)

Java loses momentum every year....it's been declared dead since 1998 or
so, when Wordperfect for Java collapsed and applets proved REALLY
annoying.

Btw, interesting side topic about generics...i always thought that was
some response to C#....
..
 
A

asj

What exactly is JRuby and Grails ?

I did take a peek at the websites, they seem to be an implementation of
Ruby rather than some alternative in java as far as I can tell.

Note: I have not used Groovy, so perhaps someone else can give a
personal opinion on it...it fell into some problems last year, and i
believe was biled by Hani in the bileblog, but it seems to have gotten
its act together since then. certainly, the new support by Oracle is a
BIG blessing to get it moving - and i'm sure there's a book in the
works ;-).

Grails - no it isn't an implementation of ruby...it's one of many web
frameworks
http://grails.codehaus.org/
http://en.wikipedia.org/wiki/Grails_(Framework)

Grails is an open source web application framework for high
productivity. It's based on the Groovy programming language and is part
of the Java platform. It has been designed to be easy to learn, easy to
develop applications and extensible. It attempts to offer the right
balance between consistency and powerful features. Grails has three
properties that increase developer productivity significantly when
compared to traditional Java web frameworks:

* No XML configuration
* Ready-to-use development environment
* Functionality available through mixin

Groovy:
http://groovy.codehaus.org/
Groovy is an agile dynamic language for the Java Platform with many
features that inspired languages like Python, Ruby and Smalltalk,
making them available to Java developers using a Java-like syntax.

JRuby
http://en.wikipedia.org/wiki/JRuby
JRuby is a pure Java implementation of the Ruby interpreter, being
developed by the JRuby team. It is tightly integrated with Java to
allow the embedding of the interpreter into any Java application with
full two-way access between the java and the Ruby code. (Compare Jython
for the Python language.) It is likely to be widely used for scripting
applications such as games.

http://jruby.sourceforge.net/
http://www.jruby.net/
 
A

Austin Ziegler

What exactly is JRuby and Grails ?

JRuby is a Ruby implementation in Java.

Grails is a Rails-like implementation in Groovy.
C# was microsofts rip off of java from what I understand and not an
alternative.

Then you understand incorrectly. The whole .NET effort was made in
response to Java, but C# was created avoiding a number of mistakes that
Java made from the beginning.

-a
 
G

gregarican

Tor said:
The funny thing is this: Ruby fans push Rails heavily, but what else
does Ruby have going for it? Java didn't have Rails, but it had a ton
of other frameworks and technologies.

Ruby has a lot going for it. An active, friendly user community.
Relatively clean, elegant syntax. Not a boatload of gotchas and
exceptions to the rule. And from what I have seen Ruby "fans" aren't
the ones pushing Rails as much as those bandwagoners who are out to
grab onto the coattails of the latest and greatest hyped technology.

Lately AJAX has been the buzzword. If you check out Ruby blogs,
newsgroup threads, mailing lists, and whatnot you will actually find
key Ruby contributors who question whether Rails' popularity will
outdistance and overshadow Ruby itself. They are not saying that Rails
will just help put Ruby's name out there for outsiders to check out.
 
T

Tor Iver Wilhelmsen

asj said:
In 2001 C# was introduced by Microsoft as a Java-kIller...I remember
the big hype back then, and even the editor-in-chief of JDJ magazine
said Java might not even last 5 years! As a result, the JCP started
introducing some C# like featuires (generics for one)

Generics were proposed in 1999, and a preprocessor (GJ) existed for
the purpose, and "preview" code for generics was available from Sun in
May 2000.

http://homepages.inf.ed.ac.uk/wadler/gj/

Other 1.5/5.0 features:

- Typesafe enums (unlike the prettified ints of C) were used prior to
the inlusion of the standard mechanism by implementing the Enum
pattern.
- Varargs: Syntactic sugar for Object[].
- Attributes: People used XDoclet for much the same, the difference
being the XDoclet-based information didn't end up inside the class
files.
Finally, the new hype (and it seems every few years a new hype comes
along) of Ruby caused the introduction of Rails-like frameworks like
Grails.

http://grails.codehaus.org/

The funny thing is this: Ruby fans push Rails heavily, but what else
does Ruby have going for it? Java didn't have Rails, but it had a ton
of other frameworks and technologies.
 
T

Tor Iver Wilhelmsen

Austin Ziegler said:
Then you understand incorrectly. The whole .NET effort was made in
response to Java, but C# was created avoiding a number of mistakes that
Java made from the beginning.

Such as? :)

C# was based more on Delphi/ObjectPascal anyway, since that was what
the C# chief architect had been responsible for when he was at
Borland.
 
G

Gary Watson

Not sure if this is a dumb question, but
if I start a masters degree in computer science, will the classes
require that I write in C++ and Java ? Since those are more common,
that's what I might expect. Too bad because I am really starting to
like Ruby alot.

Only 20 ruby jobs listed on boston craigs list, 300 or so for Perl. I
wonder when this
might start to change ?
It was my experience that almost all programming in the beginning
classes were done in Java, later in C++. As I got to the end of my
degree, I started having choices as to which languages I used to
implement things, so I started handing in assignments in ruby. Colleges
will be different, I've heard of some that start you out in scheme or
lisp. I can only speak from my own experience.
 
O

Otis Bricker

In comp.lang.java.advocacy, Tor Iver Wilhelmsen
<[email protected]>
wrote


Well, there are a few problems I can readily identify in Java; these
are either bugs, warts, missing, or just par for the course.

Most of these don't seem that bad or
[W] int vs. Integer, float vs. Float, boolean vs. Boolean. Boxing
helps but is a band-aid.

I'm for a purer object model also but C# does the same thing, doesn't it?
[W] Call me a purist, but encouraging expensive operations in Java is
not good; an example of course is List.get(int). Granted, this is
always possible, but the C++/STL implementation makes more sense.

Well, no one makes you use it. :> If I need to look at all the elements,
I'll iterate, but sometimes you just know what you need.
There's also java.util.RandomAccess, to confuse/add/assist.

Is this really any different that the std::iterator_traits. Both are ways
of letting you know the capabilities of the collection so you can pass
them along optimized code paths.

[?] Are the non-byte datatypes fixed-size?

Not sure what you mean. I believe that int,long, double and the like are
all fixed size.
[P] The Enumerator/Iterator dichotomy doesn't look necessary.

Evolution in action. We have redundant DNA code also. Enumerator is
almost missing in the current docs.
[W] AWT and Swing work well enough together but do we really need
both?

Again, change happens. AWT came first and was roundly criticised for not
providing a good cross-platform solution. So in comes Swing. But you
can't just drop support for AWT without killing all your previous code.
All you can do is encourage people t move away.
[W] [].length vs. String.length() vs. Collection.size(). Can we
clean this up?

Why? Conceptually, I see a difference. Arrays and Strings are linear.
Collections are not. What is the 'length' of a HashMap?
[W] a.equals(b) requires that a be non-null.

I tend to declare things as I instantiate them, both in C++ and my rare
ventures into Java, so I cannot remember this ever being a problem. At
least for me. In the odd case where it shows up, it is almost certainly a
bug that a was being accesed and I forgot to init it.
[W] "".equals(null) returns false. Granted, maybe they're supposed to
be unequal, but one wonders if there shouldn't be an
equalsNullIsEmpty(), at least, ugly as that is. Most people ensure
Strings are non-null so this isn't that big a deal but it is annoying.

equals is documented as having certain behaviors. One of them is that:
"For any non-null reference value x, x.equals(null) should return false."

Maybe it is thing that comes from working with Databases but null strings
and empty strings are completely different to me. And I cannot imagine
what would cause me to type "".equals(null). if I really needed it:

boolean equalOrNull(String a,String b){
if(a==null || a.equals("")){
if(b==null || b.equals(""))
return true;
else
return false;
}
return a.equals(b);
}

Could be put somewhere for use.
[W] Various protocols in J2EE assume a mapping of xzy -> getXyz,
setXyz. Unfortunately, class is a reserved keyword, although
getClass() exists. In a way, that's good news, as that means
getClass() isn't available for the casual user and he would have to
use things such as getDefiningClass(), getClazz(), or other such junk.

Having never done J2EE I cannot comment.
[?] I'm not sure about catching run-time exceptions such
as NullPointerException and IllegalArgumentException.
It's convenient to catch them, of course, print the
traceback, and keep the app from dying. However, it also
is probably being misused. How to prevent this, I for one
don't know; I doubt C# has a much better solution here,
and I certainly do not.

Don't catch them. OK, that isn't completely what I think. I do think that
RunTimeExceptions are usually the result of bugs and it is better to fix
the bug that caused it than to try and handle after the fact.

[P] java.io.Serializable should have generated XML from the
beginning. Of course there's the little issue of timing;
I don't think Java, in its alpha stages, knew about XML.
Ditto for java.rmi.

I'm no big fan of XML. I cannot see why you should require its use for
Serialization. Binary is more compact and in many cases, less costly to
use.

And as you said, XML was appearing at the same time as Serialization.
[P] It is possible that Java.io.File et al could have
avoided some silliness by pathname translation -- in other
words, '/' is always the path delimiter, and there is
only one root, so that G: would be mapped to, say, /g.
However, there's the flip side of possibly requiring
escapes for certain characters in that case. For instance,
old MacOS pathnames were delimited by ':', which means a
':' in a MacOS jvm under this new scheme would have to
be very carefully handled; in the current scheme nothing
really special needs to be done but the app might have
to wonder why it gets a directory not found condition or
strange pathnames such as 'c:\application\data\path'.

OK, you just alienated everyone that is used to a different convention.
File.separator and File.pathSeparator are always the setup. It really
isn't that hard to do but it does require you to think about multiple
platforms.
[M] The "webbrowser" of javax.swing.JEditorPane has
many problems. Ideally, it would understand XML by
now as well, and, with additional machinery (xalan,
probably), preprocessing instructions. As it is, it can
understand HTML and some CSS constructs, and now isn't
quite as stupid as it was with the <link/> construct.
Embeddable local objects is a plus, but not understanding
applets is a minus. It is possible Java will eventually
simply punt on this issue to more capable hands such as
FireFox and a local text editor. It is also possible
Java will allow integration of Firefox and editor widgets,
for a seamless-looking GUI.

As I said, I am not that into XML and haven't needed to embed fancy HTML
in my GUI. This item does what little I need and I am not sure dragging
in a more complete but larger engine would be justified for most apps.
They do claim to be moving toward HTML 4.0 support.

And aren't there problems with the <applet> tag in some browsers? The doc
do say the <object> is partially supported. Wonder what would happen if
you had an applet that displayed a JEditPane that displayed the Applet.

[M] A PDF Swing viewer would be nice. There might actually
be one, but if so I'd have to find it; it's not part of
Java currently. RTF, strangely enough, is.

PDF was a proprietary format. I don't know what its current status is.
[M] Built-in support for ASN.1 would be nice as well.
Admittedly, ASN.1 has apparently been relegated to "just
for SNMP traps", despite the fact that ASN.1 can in theory
replace RMI entirely, much like SOAP. Watch this space.

No Comment
[P] Is there a good reason why Runnable.run() can't throw
a Throwable? (Apart from the perhaps obvious one of
trying to disentangle Throwables in the calling thread,
which are not thrown by the calling thread?)

Just where would you catch it? The code in your launching thread could be
anywhere when the Runnable throws. So even if the Exception carried some
info that told it what thread it came from, you would either no call
stack for it to unwind or it would arive at whatever random place you are
currently and it would be very ugly to have to code everywhere for the
possibility of any exception.
[P] ThreadLocals are interesting. Are there better
methods by which a Thread can have its own value of certain
statics? For example, a Thread might extend Comparable,
allowing Threads to be put into the key side of a Map.
Of course the user could implement that himself, but this
is a little weird.

I would not be surprised if something similar was not done behind the
scenes by ThreadLocal.get/set. Sometimes you need threadlocal variables.
[?] Is java.lang.ThreadDeath going away anytime soon,
since the only method causing it is deprecated?

Not until that deprecated method is removed. What would you do if it went
away but the generating method remained?

[?] Point2D is a little strange since it assumes double instead of
java.lang.Number in various areas.

There's probably more but this already grows overlong.
 
T

Tim Smith

The Ghost In The said:
Hmmm....when did Java lose momentum? Somehow, I missed it; seems to me
it's been chugging right along. ;-) Of course,

Not on the desktop, which is what I think the quote was talking about. For
a while, there was quite a bit of interest in using Java for regular
applications.
 
J

Josselin

This is not necessarily an argument for Java. See Paul Graham's essays
"Beating the Averages" and "Revenge of the Nerds" at www.paulgraham.com.
The gist is that using a more powerful language on the server as opposed to
using a less powerful, but more common, language can be a big win if you are
in a competitive industry.

If I could only have one language on my resume, I'd pick one of the less
common but more powerful ones, and aim for jobs at companies that recognize
the value of this, rather than list an average language like Java and work
for companies doing average things.

is this ng dedicated to Ruby ? this kind of non-ending pure academic
discussion about Java vs Ruby is quite tedious... if I need info about
java I'll switch over to one of the existing java ng...
oh ! I just remember I can use rules to delete all 'java' ralated
posts... sorry ;-))

joss
 
O

Oliver Wong

Otis Bricker said:
The Ghost In The Machine said:
[W] Call me a purist, but encouraging expensive operations in Java is
not good; an example of course is List.get(int). Granted, this is
always possible, but the C++/STL implementation makes more sense.

I don't think it's "encouraging" expensive operations, so much as
"neutrally making them available, and it's up to the programmer to decide
which operations to call, and which ones not to".

[...]
[?] Are the non-byte datatypes fixed-size?

Not sure what you mean. I believe that int,long, double and the like are
all fixed size.

They have a fixed range (e.g. from Long.MIN_VALUE to Long.MAX_VALUE for
long). Their actual bit-width is implementation defined, and is inaccessible
from within your Java program.

[...]
Wonder what would happen if
you had an applet that displayed a JEditPane that displayed the Applet.

JEditPane ignores the <OBJECT>/<APPLET> tag, AFAIK.

- Oliver
 
T

Thomas E Enebo

Thanks, that was interesting.

It sounds like, a best, the Java team and the C# team were essentially
developping generics at the same time. So I don't think what happened was
the Java people were like "Oh crap, C# has generics! We better get it in
Java ASAP!" Rather, I think there was a lot of academic research of
generics at the time, and both teams (coincidentally?) felt "now" would be
a good time to implement generics into their languages, where "now" is 1.5
for Java, and 2.0 for C#.

Java unofficially had generics in 2001 if you wanted to step outside
Sun for your compiler:

http://pizzacompiler.sourceforge.net/

I think there were several projects like this that helped give fuel years
before Sun did it officially. You know the Sun engineers and JCP experts
had a large handle on their options long before the JSR offically kicked
off (much less a production release of it).

-Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,125
Latest member
VinayKumar Nevatia_
Top