> I can't comment for anyone coming from a different language, but studies on
> migrating Java->Scala shows that you'll be matching productivity levels
> after 4 weeks, and improving on them thereafter.  This is based on pure
> research as well as feedback from the experiences at EDF trading and
> Twitter.

Can I, using an IDE, do a usages search from Scala or Java, finding
results in both Scala and Java code?  Can I refactor a Java class and
have the changes applied to my Scala code, and vice-versa?  I hope the
answer is yes.

>> 1. In your Scala sample I don't see what that type of items list
>> contains or should contain.
>
> That's the entire point, it doesn't matter!

It would matter if you made YourType.*(Int) fire the missiles instead
of multiply.  Think that's unreasonable?  Consider List("hello",
"world") map (_ + 2)

The IDE needs to make sure you can easily see types when you want to,
and to be able to desugar (_ + 2) into new Function[String, String] {
def apply(x: String) = x + 2 } either as a view or as a change to the
code.

> If it's a list of Ints and must later be changed to a list of Doubles or
> BigInts, why *should* you need to go and change every tiny bit of code that
> uses the list?

Doing that in some cases will prevent bugs caused by refactoring.
When you change x from type Bath to Athlete, .run has a different
meaning.

> What's the equivalent to the Tab key for reading back the code?  Can your
> IDE do that for you?

Yes, IDEA has closure folding for Java code.

> More worrying still is the fact that Java *needs* this kind of IDE support.

Why is it worrying that a language needs an IDE?  My first language,
BASIC on a Spectrum 48k, came with its own IDE, and was quite
pleasant.

> For example; When you look at an example of using Scala actors, you're
> looking at a pure library, actors are absolutely *not* in the language spec.

On the other tack; a syntax error in a heavy Scala DSL, like Specs or
actors, can be quite confusing particularly if you're new to the
language.  When you're less new you can read: 5 mustBe lessThan(6)
(specs, paraphrased) and realise it means 5.mustBe(lessThan(6)), but
as a new Scala programmer if you write 5 mustBe lessThan 6 you will
get a confusing error (it will look in the wrong namespace for
lessThan, iirc)

This isn't really specific to Scala, you could even write Java code
that exhibits this problem, but Scala does rather encourage it.  The
advantages of DSLs are great, but the barrier to entry can be greater.

> You can write rubbish in any language, but that doesn't mean that a language
> can't help you out here.

Indeed.  I hope the Next Best Thing makes certain kinds of rubbish
that Java allows impossible.

-- 
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