You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leo Sutic <le...@inspireinfrastructure.com> on 2003/05/08 17:54:20 UTC

[OT] .Net better than Java in some ways

http://comment.zdnet.co.uk/story/0,,t479-s2134382,00.html

Basically, .Net is better than java in:

 + Configuration
 + Meta data
 + Assemblies
 + Remoting

I thought about Avalon's Configuration, the meta data we are using, 
the bundle RT and AltRMI reading that.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Jakob Praher <jp...@yahoo.de>.
Am Sam, 2003-05-10 um 06.13 schrieb Jakob Praher:
> hi Leo,
> 
> it's 6 am in the morning, funny but this mail has catched my eyes - I
> had to reply. [ perhaps I should take a cup of java first ;-) ]
> 
> Am Don, 2003-05-08 um 17.54 schrieb Leo Sutic:
> > http://comment.zdnet.co.uk/story/0,,t479-s2134382,00.html
> > 
> > Basically, .Net is better than java in:
> > 
> 
> I think all the features that are offered by .NET can be built into
> Java. And I think that jar bundling and class loading concept is insofar
> interesting as you can build an assembly like behaviour.
This is sentence should be:
I think most of the features that are offered by .NET can be built on
top of Java. Plus Java 1.5 will be very interesing, for instance the
Application Iosolation API, which by then should be in J2SE (JanosVM
already comes with it today - but this is a research vm, for distributed
scenarios) 
> 
> Though perhaps there are some things Java could borrow from the CLR, but
> I personally hate the Kapital Letters In Method Names. (;-)).
> 
> And personally I think Java is more sweet from a language point of view.
> (though ruby is also great (had to say that)).
> 
> >  + Configuration
> >  + Meta data
> >  + Assemblies
> >  + Remoting
> > 
> > I thought about Avalon's Configuration, the meta data we are using, 
> > the bundle RT and AltRMI reading that.
> 
> So as I interpret your above statement, the following expression
> evaluates to true:
> 
> 	(Java+Avalon).atLeastAsGoodAs( .NET ) ==  true 
>  
> just my 2 cents.
> 
> -- Jakob
> > 
> > /LS
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> > For additional commands, e-mail: dev-help@avalon.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Monday 12 May 2003 03:35 am, Leo Sutic wrote:
> > From: Nicola Ken Barozzi [mailto:nicolaken@apache.org]
> >
> >   -  get{} / set{} and other amenities, look here:
> >
> >        http://www.geocities.com/csharpfaq/
> >
> >    maybe you'll be surprised to see the pitfalls ;-)
>
> I think that FAQ was too pessimistic. Basically any feature that
> could possibly be misused resulted in a "C# Best Practice: Do not
> use feature X."

The world is full of idiots like myself. ALL features has to be exploited in 
the most obscure ways. I still remember my FIRST C program (I was to 
implement an language "bytecode" interpreter). The main loop;

#define EOC 0x1A  //End of Code

    while( ++p != EOC )
	p = (*(c[p]))(s,p);

c = array of function pointers;
p = position in bytecodes;
s = pointer to stack pointer;

and then a bunch of functions;
char* noop( char** s, char* p )
{}

I thought it was real cool in '85 or so, coming from assembly, so much in so 
few characters.

It is no good trying to teach others good patterns, and the more flexibility 
the language provide the more likely it is it will be misused at massive 
scale, and hard to track bugs as the net result. 

Csharp (there is an Fsharp also, an online bank) doesn't impress me one bit. 
Even VB is a better choice.

Niclas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [OT] .Net better than Java in some ways

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: Nicola Ken Barozzi [mailto:nicolaken@apache.org] 
> 
>   -  get{} / set{} and other amenities, look here:
> 
>        http://www.geocities.com/csharpfaq/
> 
>    maybe you'll be surprised to see the pitfalls ;-)

I think that FAQ was too pessimistic. Basically any feature that
could possibly be misused resulted in a "C# Best Practice: Do not 
use feature X."

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [WOT] How does this relate to the problems we need to solve now? (Re: [OT] .Net better than Java in some ways)

Posted by Leo Sutic <le...@inspireinfrastructure.com>.
> From: Berin Loritsch [mailto:bloritsch@apache.org] 
>
> However, this entire thread is so far off topic now, it is 
> hard to see how it applies to Avalon at all.

Because we might ditch Java and Avalon completely and make Spearhead,
bundles etc. a moot point.

Joking aside, point taken.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


[WOT] How does this relate to the problems we need to solve now? (Re: [OT] .Net better than Java in some ways)

Posted by Berin Loritsch <bl...@apache.org>.
Leo, both of you are correct.  The difference between a struct and a
class is something that IMO a developer shouldn't have to worry about.
Either use structs or use classes, but not both.

However, this entire thread is so far off topic now, it is hard to see
how it applies to Avalon at all.

Can we get back to the relase process, the bundle/DU project, or
Spearhead?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [OT] .Net better than Java in some ways

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: Nicola Ken Barozzi [mailto:nicolaken@apache.org] 
>
> The problem arises because you don't know what you are dealing with.

*Exactly*, but not in the way you mean.

> The example is:
> 
> Point p = new Point(10, 10);
> object box = p;
> p.x = 20;
> Console.Write(((Point)box).x);
> 
> 
> Now, it's very clear to me that the above should give 20.

Yes, but that's because you don't know what you're dealing with.

Consider:

int i = 10;
object box = new Integer (i);
i = 20;
Console.Write(((Integer)box).intValue ());

Should the above result in 20 as well?

*That's* the difference between Structs and Classes.

The issue here is whether Points make for good Structs at all.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Leo Simons wrote, On 12/05/2003 14.15:

> Nicola Ken Barozzi wrote:
> 
>> Leo Simons wrote, On 11/05/2003 11.07:
>>
>>>> I personally hate the Capital Letters In Method Names too. (;-)).
>>>
>>>
>>> +1 to that.
>>
>>
>> It's how a programmer understands the Java suggested notation at a 
>> first glance... so IMHO they did look at Java, but did they really 
>> work with it? ;-P
> 
> I think you can safely assume they did a few long thorough studies on 
> the matter. MS is really good at user studies and product improvement 
> through customer feedback. We just disagree with the average MS customer 
> I guess ;)

I guess that they just had to make it *look* different ;-)

>>        http://www.geocities.com/csharpfaq/
>>
>>    maybe you'll be surprised to see the pitfalls ;-)
> 
> Some of that is just silly. Example: "Do not use boxing and unboxing 
> (...) use wrapper classes.". How often do you test for identity for 
> wrapper primitives? If the identity of an int were important, it 
> wouldn't qualify as a primitive!

The problem arises because you don't know what you are dealing with.

The example is:

Point p = new Point(10, 10);
object box = p;
p.x = 20;
Console.Write(((Point)box).x);


Now, it's very clear to me that the above should give 20.
NO! It gives 10, because the class was written this way:

  struct Point {
   public int x, y;
   public Point(int x, int y) {
     this.x = x;
     this.y = y;
   }
}

It seems that it's more a problem with structs than with boxing, but the 
two combined are really potentially whacky nevertheless.

>>  -  for <blah> in <list>: Java 1.5 will have for ( <blah> : <list> )
> 
> finally! :D

I thought at first that the notation is crap, as I'm more and more 
getting used to python.

In fact, I started some time ago with C++ but notation was crap: I 
prefer much to use class A extends B than colons or similar.

As you know in Java:

   if (!list.contains(blah)){
     do_this();
   }

In Python:

   if blah not in list:
     do_this()


As you know, Python is *much* easier to read.

So I would have liked:

  foreach(blah in list){

  }

But it would mean new words in the language, 'foreach' and 'in', so they 
preferred to use a colon. Bleah.


>>  - the event mechanism: JDK 1.4 already a this utility class
>>    that uses Proxies.  Look at 
>> http://java.sun.com/j2se/1.4.1/docs/api/java/beans/EventHandler.html
> 
> 
> neat. Can't wait till deployment standards switch to 1.4.

The problem though is that you loose static checks, as you pass the 
method name as a string. Event handling should really be a nice thing to 
do with metadata.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Leo Simons <le...@apache.org>.
Nicola Ken Barozzi wrote:
> Leo Simons wrote, On 11/05/2003 11.07:
>>> I personally hate the Capital Letters In Method Names too. (;-)).
>>
>> +1 to that.
> 
> It's how a programmer understands the Java suggested notation at a first 
> glance... so IMHO they did look at Java, but did they really work with 
> it? ;-P

I think you can safely assume they did a few long thorough studies on 
the matter. MS is really good at user studies and product improvement 
through customer feedback. We just disagree with the average MS customer 
I guess ;)

>        http://www.geocities.com/csharpfaq/
> 
>    maybe you'll be surprised to see the pitfalls ;-)

Some of that is just silly. Example: "Do not use boxing and unboxing 
(...) use wrapper classes.". How often do you test for identity for 
wrapper primitives? If the identity of an int were important, it 
wouldn't qualify as a primitive!

>  -  for <blah> in <list>: Java 1.5 will have for ( <blah> : <list> )

finally! :D

>  - the event mechanism: JDK 1.4 already a this utility class
>    that uses Proxies.  Look at 
> http://java.sun.com/j2se/1.4.1/docs/api/java/beans/EventHandler.html

neat. Can't wait till deployment standards switch to 1.4.

- LSD



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Leo Simons wrote, On 11/05/2003 11.07:
> since we're OT already....
...
>> I personally hate the Capital Letters In Method Names too. (;-)).
> 
> +1 to that.

It's how a programmer understands the Java suggested notation at a first 
glance... so IMHO they did look at Java, but did they really work with 
it? ;-P

>> And personally I think Java is more sweet from a language point of view.
> 
> So far, I like get{} / set{}, for <blah> in <list>, the event mechanism, 
> and some other things in C# a lot. 

  -  get{} / set{} and other amenities, look here:

        http://www.geocities.com/csharpfaq/

    maybe you'll be surprised to see the pitfalls ;-)

  -  for <blah> in <list>: Java 1.5 will have for ( <blah> : <list> )

  - the event mechanism: JDK 1.4 already a this utility class
    that uses Proxies.  Look at 
http://java.sun.com/j2se/1.4.1/docs/api/java/beans/EventHandler.html

    You can do:

    myButton.addActionListener(
     (ActionListener)EventHandler.create
                (ActionListener.class, frame, "toFront"));

    instead of

    //Equivalent code using an inner class instead of EventHandler.
    myButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            frame.toFront();
        }
    });



-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [RT (was: OT)] .Net better than Java in some ways

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Leo Simons wrote, On 12/05/2003 12.21:

> Leo Sutic wrote:
> 
>>> would it not be easier/cleaner to have the parser output bytecode 
>>> rather than sourcecode and short-circuit the java compiler?
>>
>> Then you have to implement all the compile-time optimizations of Sun's 
>> javac.
> 
> ah, cool, you're thinking realistically :D I could imagine, for example 
> forking jikes (which is open source) and implemeting this kind of 
> compiler-add-on functionality there. More work, I guess.

The eclipse compiler is all in Java and can be used to hook in 
preprocessing. There are also other macro-like systems that do this, but 
AFAIK all research stuff.

The real boost to Avalon IMHO would come if we could make users get the 
logger as a "singleton" but treat it exactly as in Avalon.
Basically intercept all Logger.log() calls and substitute with a 
lifecycle stage + calls to that instance.

;-D

Anyway, another article:
http://genamics.com/developer/csharp_comparative.htm

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [RT (was: OT)] .Net better than Java in some ways

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: news [mailto:news@main.gmane.org] On Behalf Of Leo Simons
>
> ah....yes! In the meantime, consider:
> 
> void service( ServiceManager manager )
> {
>      m_manager = manager;
>      // ...
>      m_comp = ServiceUtil.get( MyComponent.ROLE, m_manager );
>      m_comp2 = ServiceUtil.get( MyOtherComponent.ROLE, m_manager );
> }
> void dispose()
> {
>      ServiceUtil.release( m_comp, m_manager );
>      ServiceUtil.release( m_comp2, m_manager );
> }
> 
> for encapsulating the try/catch :D

Not quite:

 1. m_comp = ServiceUtil.get( MyComponent.ROLE, m_manager );

    You need a cast here:

    m_comp = (MyComponent) ServiceUtil.get( MyComponent.ROLE, m_manager
);

 2. This does not work on a per-request basis. I.e. when you are looking
    up components and expect to release them before the client itself
    is disposed.

I found JJTree & JavaCC which seems like the tools to use for this kind
of
processing.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [RT (was: OT)] .Net better than Java in some ways

Posted by Leo Simons <le...@apache.org>.
Leo Sutic wrote:
>>would it not be easier/cleaner to have the parser output 
>>bytecode rather 
>>than sourcecode and short-circuit the java compiler?
> 
> Then you have to implement all the compile-time optimizations 
> of Sun's javac.

ah, cool, you're thinking realistically :D I could imagine, for example 
forking jikes (which is open source) and implemeting this kind of 
compiler-add-on functionality there. More work, I guess.

>>>Anyway, what the above would allow one to use Java as a base and
>>>create doman-specific extensions as needed.
>>
>>potentially really neat. Any idea where/how/if avalon fits in?
> 
>     using (manager; MyComponent comp, MyOtherComponent otherComp) {
>         comp.method (parameter);
>         ....
>     }

ah....yes! In the meantime, consider:

void service( ServiceManager manager )
{
     m_manager = manager;
     // ...
     m_comp = ServiceUtil.get( MyComponent.ROLE, m_manager );
     m_comp2 = ServiceUtil.get( MyOtherComponent.ROLE, m_manager );
}
void dispose()
{
     ServiceUtil.release( m_comp, m_manager );
     ServiceUtil.release( m_comp2, m_manager );
}

for encapsulating the try/catch :D

gotta run!

- LSD



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [RT (was: OT)] .Net better than Java in some ways

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: Stephan Michels [mailto:stephan@apache.org] 
> 
> Do you know JSE(Java Syntactic Extensions)? I found this in a 
> interesting blog:
> http://www.webweavertech.com/ovidiu/weblog/archives/000120.html#000120

I had read that one a while ago. I remembered it as not going far
enough.
A macro can only operate on its parameters, and not more. For my SQL
example, I'd like to look up DB schemas etc. in order to generate code.

I've now checked a bit more, and it seems like it does allow you
to execute any code during macro processing. But I'm not sure.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [RT (was: OT)] .Net better than Java in some ways

Posted by Stephan Michels <st...@apache.org>.


On Mon, 12 May 2003, Leo Sutic wrote:

> > > Anyway, what the above would allow one to use Java as a base and
> > > create doman-specific extensions as needed.
> >
> > potentially really neat. Any idea where/how/if avalon fits in?
>
>     MyComponent comp = null;
>     MyOtherComponent otherComp = null;
>     try {
>         comp = (MyComponent) manager.lookup (MyComponent.ROLE);
>         otherComp = (MyOtherComponent) manager.lookup
> (MyOtherComponent.ROLE);
>
>         comp.method (parameter);
>         ....
>     } finally {
>         manager.release (comp);
>         manager.release (otherComp);
>     }
>
>      --->
>
>     using (manager; MyComponent comp, MyOtherComponent otherComp) {
>         comp.method (parameter);
>         ....
>     }
>
> or for you Phoenix people:
>
>     using (manager;
>            MyComponent comp ("my-role"),
>            MyOtherComponent otherComp ("my-other-role")) {
>
>         comp.method (parameter);
>         ....
>
>     }
>
> ?


Do you know JSE(Java Syntactic Extensions)? I found this in a
interesting blog:

http://www.webweavertech.com/ovidiu/weblog/archives/000120.html#000120

Stephan Michels.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [RT (was: OT)] .Net better than Java in some ways

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: news [mailto:news@main.gmane.org] On Behalf Of Leo Simons
> 
> It seems what you 
> have here is a language extension optimizing the code structure with 
> regard to one or two particular aspects/problem spaces, which 
> in the end results in (nearly) identical bytecode. Right?

Yes.

> would it not be easier/cleaner to have the parser output 
> bytecode rather 
> than sourcecode and short-circuit the java compiler?

Then you have to implement all the compile-time optimizations 
of Sun's javac. For example, suppose you have the statement:

  int x = 3 + 4;

You want the compiler to output the equivalent bytecode of:

  int x = 7;

I.e. "constant folding". There's a ton of these things that gets
stuffed into compilers, and I'm afraid we'd end up re-implementing
them if you output bytecode directly.

I'd like to use the existing javac compiler whenever possible.

> > Anyway, what the above would allow one to use Java as a base and
> > create doman-specific extensions as needed.
> 
> potentially really neat. Any idea where/how/if avalon fits in?

    MyComponent comp = null;
    MyOtherComponent otherComp = null;
    try {
        comp = (MyComponent) manager.lookup (MyComponent.ROLE);
        otherComp = (MyOtherComponent) manager.lookup
(MyOtherComponent.ROLE);

        comp.method (parameter);
        ....
    } finally {
        manager.release (comp);
        manager.release (otherComp);
    }
 
     --->

    using (manager; MyComponent comp, MyOtherComponent otherComp) {
        comp.method (parameter);
        ....
    }

or for you Phoenix people:

    using (manager; 
           MyComponent comp ("my-role"), 
           MyOtherComponent otherComp ("my-other-role")) {

        comp.method (parameter);
        ....

    }

?

> [1] - 
> http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/9i
_sqlj/SQLJWithBC4JSample/Readme.html

Interesting. Thanks.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [RT (was: OT)] .Net better than Java in some ways

Posted by Leo Simons <le...@apache.org>.
neat.

Leo Sutic wrote:
> I have been thinking about extending Java for scripting purposes (and
> for other purposes). In effect, being able to play around with different
> extensions of Java just to see what happens. For example, while you
> have to do this in JDBC:
> 
<snip/>
> 
> I'd like to change that to:
> 
>     transaction (companyDatabase) {
>         update (Employee) {
>             office = 6;
>         } where {
>             office == 5;
>         }
>     } catch (SQLException e) {
>         // Handle the exception somehow
>     }
<snip/>

reminds me of SQLJ [1], only potentially much cleaner. It seems what you 
have here is a language extension optimizing the code structure with 
regard to one or two particular aspects/problem spaces, which in the end 
results in (nearly) identical bytecode. Right?

> Now regarding the extending of Java: Eclipse (www.eclipse.org) have
> defined what is in effect a Java DOM. That is, you have a class
> SwitchStatement that can give you a list of CaseStatements and
> so on. Having that would allow one to
> 
>  + Extend the DOM with custom elements.
>  + Extend the parser to support those elements.
>  + Have some equivalent of XSLT.
>  + Output Java source code, feed that to the standard Java compiler.
>  + Augment the bytecode afterwards.

would it not be easier/cleaner to have the parser output bytecode rather 
than sourcecode and short-circuit the java compiler?

> (I think it was Bjarne Stroustrup who said it was only a matter of
> time before Java evolved into multiple, incompatible versions,
> each one with proprietary extensions.)

as long as you can load the extension-supporting parts into the base 
platform using a well-defined and well-supported mechanism *or* support 
a common base format (bytecode), the incompatibilities should be 
manageable. A nice example of this is that there are various 
language-level java features (like serialization) which are implemented 
using attributes and delegates in C#.

AspectJ+JSR175+Runtime-exposed extensible parser facilities (Java DOM) 
should hopefully allow for that management.

> Anyway, what the above would allow one to use Java as a base and
> create doman-specific extensions as needed.

potentially really neat. Any idea where/how/if avalon fits in?

- LSD

[1] - 
http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/9i_sqlj/SQLJWithBC4JSample/Readme.html



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [OT] .Net better than Java in some ways

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: Niclas Hedhman [mailto:niclas@hedhman.org] 
>
> link no longer works.

http://216.239.33.104/search?q=cache:tTJe_46_iCQC:www.25hoursaday.com/Cs
harpVsJava.html+csharpvsjava&hl=en&start=1&ie=UTF-8



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Sunday 11 May 2003 05:31 pm, Sam Ruby wrote:
> Jakob Praher wrote:
> >>since we're OT already....

+1 

> >>http://www.25hoursaday.com/CsharpVsJava.html

> FYI - the author is a Microsoft employee (and a personal friend).

And running MS server? Because link no longer works.


Niclas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Jakob Praher <jp...@yahoo.de>.
Am Mon, 2003-05-12 um 03.31 schrieb Sam Ruby:
> Jakob Praher wrote:
> > Am Son, 2003-05-11 um 11.07 schrieb Leo Simons:
> > 
> >>since we're OT already....
> >>
> >>here's a nice link:
> >>
> >>http://www.25hoursaday.com/CsharpVsJava.html
> >>
> >>"A COMPARISON OF MICROSOFT'S C# PROGRAMMING LANGUAGE TO SUN 
> >>MICROSYSTEMS' JAVA PROGRAMMING LANGUAGE"
> > 
> > 
> > thanks for the pointer - good technical comparison without marketing.
> 
> FYI - the author is a Microsoft employee (and a personal friend).

ah. Thanks for the info Sam. 
Interesting that he has a link to the LXR (linux cross reference) ;-)
plus he is running an Apache/1.3.24 :-)

http://www.25hoursaday.com/Mozilla_default.htm

on the other hand, if Joshua Bloch or Guy Steele had written a
comparison, I think it would have been technical as well. 

-- Jakob

> - Sam Ruby
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Sam Ruby <ru...@apache.org>.
Jakob Praher wrote:
> Am Son, 2003-05-11 um 11.07 schrieb Leo Simons:
> 
>>since we're OT already....
>>
>>here's a nice link:
>>
>>http://www.25hoursaday.com/CsharpVsJava.html
>>
>>"A COMPARISON OF MICROSOFT'S C# PROGRAMMING LANGUAGE TO SUN 
>>MICROSYSTEMS' JAVA PROGRAMMING LANGUAGE"
> 
> 
> thanks for the pointer - good technical comparison without marketing.

FYI - the author is a Microsoft employee (and a personal friend).

- Sam Ruby



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


[RT (was: OT)] .Net better than Java in some ways

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: Jakob Praher [mailto:jpraher@yahoo.de] 
>
> > > 	(Java+Avalon).atLeastAsGoodAs( .NET ) ==  true
> > 
> > patch:
> >          (Java+Avalon).potentiallyAtLeastAsGoodAs( .NET ) ==  true
> > 
> > we've got some work to do :D
>
> propably more realistic - now we have patched it let's make 
> that statement evaluate to true ;-)

Jakob,

even worse, since the only non-numeric type for which the + operator is
defined is String the first (Java+Avalon) expression will evaluate
to String or some numeric type and the thing won't even compile.

                       -oO   However   Oo-

I have been thinking about extending Java for scripting purposes (and
for other purposes). In effect, being able to play around with different
extensions of Java just to see what happens. For example, while you
have to do this in JDBC:

    Connection conn = getConnection ();
    try {
        PreparedStatement stmt = conn.prepareStatement (
            "UPDATE employee SET office = ? WHERE office = ?");
        try {
            stmt.setInt (1, 6);
            stmt.setInt (1, 5);
            stmt.executeUpdate ();
        } finally {
            stmt.close ();
        }
    } catch (SQLException e){
        // Handle the exception somehow
    } finally {
        conn.close ();
    }

I'd like to change that to:

    transaction (companyDatabase) {
        update (Employee) {
            office = 6;
        } where {
            office == 5;
        }
    } catch (SQLException e) {
        // Handle the exception somehow
    }

to get some kind of SQL-in-Java processing. In effect, relational
processing in Java.

Now regarding the extending of Java: Eclipse (www.eclipse.org) have
defined what is in effect a Java DOM. That is, you have a class
SwitchStatement that can give you a list of CaseStatements and
so on. Having that would allow one to

 + Extend the DOM with custom elements.

 + Extend the parser to support those elements.

 + Have some equivalent of XSLT.

 + Output Java source code, feed that to the standard Java compiler.

 + Augment the bytecode afterwards.

(I think it was Bjarne Stroustrup who said it was only a matter of
time before Java evolved into multiple, incompatible versions,
each one with proprietary extensions.)

Anyway, what the above would allow one to use Java as a base and
create doman-specific extensions as needed.

It would also allow us to play around with C# features.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Jakob Praher <jp...@yahoo.de>.
Am Son, 2003-05-11 um 11.07 schrieb Leo Simons:
> since we're OT already....
> 
> here's a nice link:
> 
> http://www.25hoursaday.com/CsharpVsJava.html
> 
> "A COMPARISON OF MICROSOFT'S C# PROGRAMMING LANGUAGE TO SUN 
> MICROSYSTEMS' JAVA PROGRAMMING LANGUAGE"

thanks for the pointer - good technical comparison without marketing.

> 
> > I personally hate the Capital Letters In Method Names too. (;-)).
> 
> +1 to that.
> 
> > And personally I think Java is more sweet from a language point of view.
> 
> So far, I like get{} / set{}, for <blah> in <list>, the event mechanism, 
> and some other things in C# a lot. The reflection api is better (though 
> we have stuff like JClass and BCEL of course now :D). I like java 
> namespaces better, the one-class-per-file setup, the 1-1 mapping between 
> directories and namespaces, and the names chosen for the keywords. And 
> so on and so on :D

> > (though ruby is also great (had to say that)).
> 
> +1 to that, too. If only I had a reason to work with ruby. Remember 
> saying that about python a few years ago :D
> 
hehe - I remember having said that too ;-).

> > So as I interpret your above statement, the following expression
> > evaluates to true:
> > 
> > 	(Java+Avalon).atLeastAsGoodAs( .NET ) ==  true
> 
> patch:
>          (Java+Avalon).potentiallyAtLeastAsGoodAs( .NET ) ==  true
> 
> we've got some work to do :D
propably more realistic - now we have patched it let's make that
statement evaluate to true ;-)

-- Jakob

---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Leo Simons <le...@apache.org>.
since we're OT already....

here's a nice link:

http://www.25hoursaday.com/CsharpVsJava.html

"A COMPARISON OF MICROSOFT'S C# PROGRAMMING LANGUAGE TO SUN 
MICROSYSTEMS' JAVA PROGRAMMING LANGUAGE"

> I personally hate the Capital Letters In Method Names too. (;-)).

+1 to that.

> And personally I think Java is more sweet from a language point of view.

So far, I like get{} / set{}, for <blah> in <list>, the event mechanism, 
and some other things in C# a lot. The reflection api is better (though 
we have stuff like JClass and BCEL of course now :D). I like java 
namespaces better, the one-class-per-file setup, the 1-1 mapping between 
directories and namespaces, and the names chosen for the keywords. And 
so on and so on :D

> (though ruby is also great (had to say that)).

+1 to that, too. If only I had a reason to work with ruby. Remember 
saying that about python a few years ago :D

> So as I interpret your above statement, the following expression
> evaluates to true:
> 
> 	(Java+Avalon).atLeastAsGoodAs( .NET ) ==  true

patch:
         (Java+Avalon).potentiallyAtLeastAsGoodAs( .NET ) ==  true

we've got some work to do :D

- LSD



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [OT] .Net better than Java in some ways

Posted by Alex Karasulu <ao...@bellsouth.net>.
I personally hate the Capital Letters In Method Names too. (;-)).  You can't
tell if you're calling a method or accessing an inner class.  It is a very
disorganized and messy set of APIs as you might expect from any M$ PRODUCT.
It violates the rules making code easy to read.  This however does not mean
that it does not have strengths.  We can gain from understanding this
formidable enemy.

Let's all learn what we can from .NET and C# taking what's good from them
and leaving what's bad, improving upon Java.  In the hands of the JCP and
the Open Source Community there is no limit to where we can take it.  It's
far more powerful in our hands than .NET can ever be even with the billion
dollar budgets put behind it.

Let's face it we're up for a big fight.  M$ is that punk kid that got its
azz whipped by Java.  It went away sniffling with a bloody nose vowing to
come back with a vengeance.  Over the past couple years he's been lifting
weights and working out just to come back and defeat Java first and any
other open source friends it has.  I can hear the "Eye of the Tiger" in the
background as I write this.

We need to respect it but not embrace so long as it is closed.  We need to
do what M$ does with everyone else's good ideas: steal them and make them
better.  We cannot be arrogant nor scared but diligent and aware.  There is
no dishonor in this if our intention is to keep software free and open.

-Alex

-----Original Message-----
From: Jakob Praher [mailto:jpraher@yahoo.de] 
Sent: Friday, May 09, 2003 11:14 PM
To: Avalon Developers List
Subject: Re: [OT] .Net better than Java in some ways

hi Leo,

it's 6 am in the morning, funny but this mail has catched my eyes - I
had to reply. [ perhaps I should take a cup of java first ;-) ]

Am Don, 2003-05-08 um 17.54 schrieb Leo Sutic:
> http://comment.zdnet.co.uk/story/0,,t479-s2134382,00.html
> 
> Basically, .Net is better than java in:
> 

I think all the features that are offered by .NET can be built into
Java. And I think that jar bundling and class loading concept is insofar
interesting as you can build an assembly like behaviour.

Though perhaps there are some things Java could borrow from the CLR, but
I personally hate the Kapital Letters In Method Names. (;-)).

And personally I think Java is more sweet from a language point of view.
(though ruby is also great (had to say that)).

>  + Configuration
>  + Meta data
>  + Assemblies
>  + Remoting
> 
> I thought about Avalon's Configuration, the meta data we are using, 
> the bundle RT and AltRMI reading that.

So as I interpret your above statement, the following expression
evaluates to true:

	(Java+Avalon).atLeastAsGoodAs( .NET ) ==  true 
 
just my 2 cents.

-- Jakob
> 
> /LS
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [OT] .Net better than Java in some ways

Posted by Jakob Praher <jp...@yahoo.de>.
hi Leo,

it's 6 am in the morning, funny but this mail has catched my eyes - I
had to reply. [ perhaps I should take a cup of java first ;-) ]

Am Don, 2003-05-08 um 17.54 schrieb Leo Sutic:
> http://comment.zdnet.co.uk/story/0,,t479-s2134382,00.html
> 
> Basically, .Net is better than java in:
> 

I think all the features that are offered by .NET can be built into
Java. And I think that jar bundling and class loading concept is insofar
interesting as you can build an assembly like behaviour.

Though perhaps there are some things Java could borrow from the CLR, but
I personally hate the Kapital Letters In Method Names. (;-)).

And personally I think Java is more sweet from a language point of view.
(though ruby is also great (had to say that)).

>  + Configuration
>  + Meta data
>  + Assemblies
>  + Remoting
> 
> I thought about Avalon's Configuration, the meta data we are using, 
> the bundle RT and AltRMI reading that.

So as I interpret your above statement, the following expression
evaluates to true:

	(Java+Avalon).atLeastAsGoodAs( .NET ) ==  true 
 
just my 2 cents.

-- Jakob
> 
> /LS
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org