Don't discard the traction gained by the fact Kotlin only just recently reached 
1.0 stable release, and Groovy has existed for many years. I use Groovy as 
mostly a static language, but also use it for its dynamic purposes when 
interfacing with other systems, in unit and integration testing and scripting 
where I have found no other JVM language that can compare to Groovy. I started 
using Groovy in projects when 1.8 came out (I remember because the command 
chain DSL was just coming out) when Kotlin wasn't even a conception yet (as far 
as I know). So, due to age there exists a set of developers out there knowing 
Groovy as well. For the static side, Kotlin is a very interesting language 
compared to Groovy looking at total new projects and teams not strongly trained 
in either, although even in that case my intuition tells me that Groovy would 
be easier to learn as it is more like Java -- none of the developers on my team 
have has issues picking up Groovy especially since essentially most Java syntax 
compiles directly as Groovy. Even as a static language, Kotlin seems a lot more 
strict in that it wants to also enforce nullability in types, while Groovy 
follows Java's semantics. In my mind Kotlin tries to "double down" on 
compile-time analysis even compared to Java.

But, if you have a project with dynamic and static requirements -- as far as I 
know Kotlin has no dynamic capabilities for example to do things like gpath on 
XML files -- now you have a dilemma if you have dynamic languages in your 
toolbelt. In my mind, Kotlin can't do everything Groovy can do although both 
are worthy additions to Java, even if Kotlin is a little smoother on the static 
side. Now the problem is, if I can't discard dynamic -- would I have a project 
mixing dynamic Groovy with static Kotlin and legacy Java? Is such a thing even 
possible? If it was a hard-sell to "train a team" in two languages (Java and 
Groovy), I doubt most organizations would go for Java + Groovy + Kotlin. So now 
I have both existing project that could never (rationally) displace Groovy, and 
even if I was starting a new project, I can't say Kotlin can do everything I'd 
want to do in Groovy but I can say the opposite (except for the unfortunate 
occasional static compiler bugs and occasional IDE limitations) -- that Groovy 
can do static and it can do dynamic and it can do Java++ while Kotlin only does 
2 of those.

So for any team that has embraced the value of a dynamic programming tool in 
their belt, I can't see any room for Kotlin. Having static abilities in Groovy 
then handles the "Java++" component and prevents the case of saying Groovy is 
useful for only a small part of an app, because you can still get static 
benefits of refactoring and compile-time checking if you wish.

Jason

-----Original Message-----
From: Russel Winder [mailto:rus...@winder.org.uk] 
Sent: Sunday, June 26, 2016 12:39 PM
To: users@groovy.apache.org
Subject: Re: Is it possible to enable CompileStatic for an entire project

On Wed, 2016-06-22 at 14:30 +0200, Mr Andersson wrote:
> 
[…]
> I do think that's the biggest problem. Groovy was the second largest 
> JVM language in 2010, but it is not really that big anymore, mostly of 
> competition by static languages such as Scala and Kotlin.

Groovy has no serious traction in the static world. Even with the marketing 
push given by many people, including myself, Groovy has the label "dynamic" 
firmly stuck to it; it is seen in the same grouping as Clojure (and JRuby and 
Jython). When people are no discussing refactoring of codebases then if the 
base language is Java then the choice of language is Kotlin.

> People want to be able to refactor without risking of the code 
> eventually breaking totally, and that's the problem with Groovy.
> Code
> will eventually become stale and stop working if it is put on layway 
> for a while. No compile time checks is a problem for anyone interested 
> in code quality.
> 

This sounds like lazy staff misusing a dynamic language. People using Groovy 
(and Clojure) as dynamic languages tend not to have this problem.

-- 

Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

----------------------------------------------------------------------
This email message and any attachments are for the sole use of the intended 
recipient(s). Any unauthorized review, use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please contact the sender by 
reply email and destroy all copies of the original message and any attachments.

Reply via email to