I'm reasonably convinced that a minor modification from Scala will be
a definite improvement over Java that even the more conservative Java
users would not object to.

So far, I think that modification would include:

. C# style extension methods instead of implicit conversions.
. Implicit parameters altered to look more like dependency injection
(which they are).
. Absolute rather than relative package names.
. No importing other than from packages.
. Reification as Manifest provides, but without having to write it in
the code explicitly.
. C#'s covariance and contravariance syntax <in T>, <out T> instead of
Scala's [-T], [+T].  I can never remember which the Scala syntax
means.
. No wildcards.
. No casting.  Use type classes (via injection, see above) for things
like equality so that you don't need an equals(Object).
. Closure conversion as in the Java proposals.  I.e., val runnable:
Runnable = () => println("hello") should compile to final Runnable
runnable = new Runnable() { public void run() { println("hello") } };
. No underscores as lambda parameters, i.e., foo.map(_ + 2) has to be
written foo.map(x => x + 2).
. No type inference for non-local members, i.e., only as much type
inference as C# does.
. C#-style type parameter inference.  Java doesn't infer the type
parameter based on the context, only the parameters passed.
. Named parameters, but no default parameters.  Yes, this is an arbitrary one!
. An 'untyped' keyword for those who don't like compiler guarantees.

Of course the harder problem will be coming up with a name for the
language that provides inspiration for naming libraries written for it
(Scala is a dreadful name for this, see Scalala, ScalaTest, SUnit,
ScalaCheck)!

Ricky.

--
Ricky Clarkson
Java and Scala Programmer, AD Holdings
+44 1928 706373
Skype: ricky_clarkson



On Thu, Sep 9, 2010 at 11:20 AM, Casper Bang <[email protected]> wrote:
>> You can get much of the benefit of dynamic typing by using Scala's
>> structural typing:http://codemonkeyism.com/scala-goodness-structural-typing/
>
> Yeah pasting a "schema" on the fly like that allows for easy
> reflection, but not interoperability i.e. talking to Python/Ruby/
> JavaScript or even the underlying native platform as with the
> following C#:
>
> ((dynamic)new PInvoke ("libc")).printf("Dynamic yet native Hello
> world");
>
>> I'm more and more convinced that the "bad taste in the mouth" people
>> complain about is born of ignorance.
>
> I admit there might be an element of that, OTOH there seems to be good
> evidence that Scala really isn't as easy to approach as Java and as
> such, is hardly a candidate for _replacing_ it.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/javaposse?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to