Stab has delegates and lambdas. In the lambda example it is
referencing a local variable that is in the outer scope of the method
containing the lambda expression.

The reason it achieve a high degree of Java interoperability is that
it doesn't try to be a strict CLR conforming C#, but instead a C# like
language that adheres to the types, class libraries, etc., of the JVM.
It's getter/setter feature generates Java Bean compliant methods. It's
indexer feature generates getItem()/setItem() methods. When writing
the APIs of a library that is intended to be easily consumable by
regular Java, then annotations can be used to sprinkle on checked
exceptions. The using statement is equivalent to try/finally, but of
course is more concise. The implicitly typed variables are great for
reducing the boiler plate of type declarations involving the use of
generics. Type aliasing is another way to devise nice names for
unwieldy and verbose type declarations. Stab is simply a JVM language
that cleans up all those things that we wished could be cleaned up
about Java.

It's really a shame that this particular approach wasn't taken about 3
or 4 years ago.

On Jul 26, 6:31 pm, Reinier Zwitserloot <[email protected]> wrote:
> Java 7 brings closures, or, if you're a dictionary thumper, more
> easily written code blocks. If you don't see how that's going to help
> with concurrency, you should probably read a lot more about it.
>
> I can knock out a stab-like language in a week. Heck, Roel (follow
> Lombok contributor and I) produced a fully working java parser in a
> few nights which added up to no more than a solid weekend. Big whoop.
> Show me tool support. Show me refinement and elegance in the language
> design. Show how this somehow all works well with existing code.
> Library interop is a decent start though there are plenty of java
> library quirks that make it difficult to make seamless library interop
> (i.e. - no way to tell the difference, vs. you can interoperate, but
> you'll almost immediately notice because you can't use half of the
> language features). For example, named parameters doesn't really
> interop with java. Exactly how do I call a method with defaults? You
> can overload to an extent but if I have something like: foo(String x
> default "hello", String y default "world"), you can't do that.
>
> Get all that going and I'll take it seriously. Phantom came with very
> similar promises and that's going exactly nowhere.
>
> On Jul 25, 5:24 pm, RogerV <[email protected]> wrote:
>
>
>
> > On Jul 25, 1:40 am, Casper Bang <[email protected]> wrote:
>
> > > Oh wow, complete with LINQ like features. But doesn't it look like it
> > > kinda fails at solving the concurrency issues C#, Fantom and Scala are
> > > currently revolving around?
>
> > One more comment on this point is that Java 7 isn't going to be
> > bringing anything really new to the concurrency table either, say,
> > like incorporating an actor model.
>
> > I look at Stab as more an alternative to the language of Java 7 vs an
> > alternative to some other very different kind of language such as
> > Closure or Scala.
>
> > Of course Stab is more a square on alternative to a language like
> > Groovy too, other than Groovy is a dynamic type language whereas Stab
> > is compile time static type language like Java. Perhaps Stab vs Groovy+
> > + is the better comparison point.
>
> > Stab improves over Java language too but does so in a way that's very
> > familiar to us C# coders, while still having a very nice inter-
> > operable story (Groovy doesn't really have any advantage on
> > interoperability relative to Stab).

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