This page is no longer maintained — Please continue to the home page at www.scala-lang.org

new language "Kotlin" from jetbrains

118 replies
odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Re: new language "Kotlin" from jetbrains


On Wed, Jul 20, 2011 at 6:19 PM, Tom Switzer <thomas [dot] switzer [at] gmail [dot] com> wrote:
Rather than named tuples, I'd love to see Scala case classes implement their arity-specific Product variant instead of just Product. That is, if case class Point(x: Int, y: Int) implemented Product2[Int,Int] instead of Product. This would let case-classes be used in the place of "tuple" arguments.
Now that we have sucesfully removed case classes inheriting from case classes that design becomes possible again. I agree we should do it.

Cheers

fanf
Joined: 2009-03-17,
User offline. Last seen 2 years 30 weeks ago.
Re: new language "Kotlin" from jetbrains
OLJ+3dxfJA [at] mail [dot] gmail [dot] com" type="cite"> On Wed, Jul 20, 2011 at 12:57 AM, Francois <fanf42 [at] gmail [dot] com" rel="nofollow">fanf42 [at] gmail [dot] com> wrote:
Scala is now known and used in application deployed for several years, it has started to be an option for new projects... How much time and effort before Kotlin (or any other new Scala-alike language) reaching that state ?

Considering that Scala's mindshare is still minuscule (even smaller than Groovy), I think the space between Java and a more modern language is still largely up for grabs. Also, Kotlin is going in one direction than no other language (Groovy, Fantom, Gosu, Ceylon, Scala) has covered adequately yet: top notch IDE support.


Top notch *IntelliJ* support, at least for some time. OK, every body but me seems to think it's the best IDE around, but it's not the only one, and not the one with the biggest user base (ok, perhaps it's a leadership minded user base, but again that put some delay on the broad adoption).

So,  as you said, we'll see. We are living interesting time.

-- 
Francois ARMAND
http://fanf42.blogspot.com
http://www.normation.com
Cédric Beust ♔
Joined: 2011-06-17,
User offline. Last seen 42 years 45 weeks ago.
Re: new language "Kotlin" from jetbrains

-- Cédric

On Wed, Jul 20, 2011 at 10:44 AM, Francois <fanf42 [at] gmail [dot] com> wrote:
On Wed, Jul 20, 2011 at 12:57 AM, Francois <fanf42 [at] gmail [dot] com> wrote:
Scala is now known and used in application deployed for several years, it has started to be an option for new projects... How much time and effort before Kotlin (or any other new Scala-alike language) reaching that state ?

Considering that Scala's mindshare is still minuscule (even smaller than Groovy), I think the space between Java and a more modern language is still largely up for grabs. Also, Kotlin is going in one direction than no other language (Groovy, Fantom, Gosu, Ceylon, Scala) has covered adequately yet: top notch IDE support.
Top notch *IntelliJ* support, at least for some time. OK, every body but me seems to think it's the best IDE around, but it's not the only one, and not the one with the biggest user base (ok, perhaps it's a leadership minded user base, but again that put some delay on the broad adoption).

Good point. I'm an Eclipse user myself, so Kotlin's IDEA support does little for me. However, the fact that the language is being designed from the ground up in lockstep with the IDE is, hopefully, a guarantee that it will be extremely toolable (e.g. offering a lot of hooks into the compiler's internals). I'm hopeful that Eclipse support will happen quickly (maybe it's already even underway).
-- Cédric
ichoran
Joined: 2009-08-14,
User offline. Last seen 2 years 3 weeks ago.
Re: new language "Kotlin" from jetbrains
On Wed, Jul 20, 2011 at 4:20 AM, martin odersky <martin [dot] odersky [at] epfl [dot] ch> wrote:


On Wed, Jul 20, 2011 at 9:33 AM, Rex Kerr <ichoran [at] gmail [dot] com> wrote:
Another area of scalability is to manage large quantities of runtime data, e.g. with millions of objects.  GC is a pain in such situations, and there, I'd argue that PML is the one that doesn't scale (not unless escape analysis is perfect), because the cost-per-object gets increasingly expensive as the object churn goes up, while extension functions have fewer limits.

It's pretty straightforward to optimize these wrappers away, either in the compiler or in the JVM. I have so far resisted making them a special case (which we could) because I think that a decent general purpose optimizer should be able to eliminate the object creation and call indirection, generating in effect the same code as an extension method. Scala optimizers evolve more slowly than I would like, but it's no reason to give up and instead throw more features into the language.

I'm all for having _compiler_ optimizations instead of language features.  But assuming that the JVM can handle everything is equivalent, for the medium term, to assuming that Scala is going to run on the Sun JVM where those optimizations exist, and hopefully not on Dalvik or elsewhere where they do not.  Of course, optimizations that no JVM can't do, due to lack of information, should have elevated priority.  But that doesn't mean that the others should be entirely neglected.

Besides, I think extension functions are just a generalization of what the language already has, namely multiple parameter lists.  Suppose you could put the parameter name wherever you please:

    def g(a: A)(b: B) = // ...
    g(a)(b)

    def (a: A)g(b: B) = // ...
    (a) g (b)
    a g b

    def (a: A)(b: B)g = // ...
    (a)(b)g

    def ~(a: A) = // ...
    ~ a

    def (a: A)~ = // ...
    a ~

And if you're going to have multiple parameter lists, why not multiple identifiers?  Compare (assuming that Range doesn't already have a by method):

    // Existing way to make DSL for int ranges
    implicit def x(i: Int) = new { def to(j: Int) = Range.inclusive(i,j) }
    implicit def y(r: Range) = new {
      def by(k: Int) = if (r.isInclusive) Range.inclusive(r.start,r.end,k) else Range(r.start,r.end,k)
    }

    // Suggested way to make DSL for int ranges
    def (i: Int) to (j: Int) by (k: Int) = Range.inclusive(i,j,k)

This really doesn't make the _language_ spec much more complex.  It also doesn't make the expressivity of the language any more complex (except for the variant that would allow more-than-one-initial-parameter).  You can already achieve all of this with the existing features, except that it's very clunky to write, has potential performance problems, and leads to strange allowed syntax:

    1 to 7 by 3 by 2   // Huh? Is this 1,4,7 or 1,6 or 1,3,5,7??

Finally, keep in mind that the JVM-applied optimizations so far only make things _better_, not identical to a method call.  For example, I get ~50% slowdown with x.isNaN compared to java.lang.Double.isNaN, and ~8x slowdown with a max b (for doubles) compared to math.max(a,b).

So I'd argue that extension methods are a special case of a modest increase in flexibility of method parameters, and that if PML is intended to replace extension methods entirely, that a compiler optimization not a JVM optimization is called for (since the best optimizing JVM still can't do it completely or very frequently).

  --Rex


Tony Morris 2
Joined: 2009-03-20,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Something akin to newtype/deriving is a better choice than both. There
was a recent related discussion. Leave the wrap/unwrap up to the
compiler ot JVM as Martin says, though this does affect termination
semantics.

On 20/07/11 22:54, Dennis Haupt wrote:
> when everything besides "pimp my lib" is irrelevant, then extension
> functions are the better choice. they are simpler and are
> guaranteed not to add a performance penaltly. when wrapping stuff
> at runtime, you cannot be sure in advance what the vm will optimize
> away and what it won't.
>
> however, implicit conversions are more powerful - wrapping stuff
> temporarily is just one use case that happens to have to same
> effect as extension functions. extension functions can't actually
> wrap/convert an object, so if you want to do that, you'll have to
> do it manually.
>
> -------- Original-Nachricht --------
>> Datum: Wed, 20 Jul 2011 05:28:08 -0700 (PDT) Von: Rob Patro
>> An: scala-debate
>> Betreff: [scala-debate] Re: new
>> language "Kotlin" from jetbrains
>
>> Martin,
>>
>> I was wondering if you could comment a little bit on the
>> performance tradeoff of extension functions vs. implicit
>> conversions. When the Kotlin page claims that Scala wraps values
>> into adapters at runtime
>> (http://confluence.jetbrains.net/display/Kotlin/Extension+functions),
>>
>>
this seems like a bit of a mischaracterization to me. It's true that
>> implicits require a rich wrapper to be created at runtime, but
>> determination of the wrapper, and the actual "wrapping" seem to
>> be happening at compile-time. There's some debate about this
>> happening on reddit
>> (http://www.reddit.com/r/programming/comments/iub22/
>> project_kotlin_a_new_statically_typed_programming/c26rgu0), and I
>> was hoping you might comment on some of the arguments being made
>> there.
>>
>> Cheers, Rob
>>
>> On Jul 20, 3:02 am, martin odersky
>> wrote:
>>> On Wed, Jul 20, 2011 at 4:16 AM, Rex Kerr
>>> wrote:
>>>> On Tue, Jul 19, 2011 at 7:29 PM, Paul Phillips
>> wrote:
>>>
>>>>> Maybe I'm the last guy to hear about things (it happens
>>>>> enough) but there's this language here which looks like a
>>>>> more credible effort to
>> be
>>>>> a better/simpler scala than most:
>>>
>>>>> http://confluence.jetbrains.net/display/Kotlin/Welcome
>>>
>>>>> The "What Kotlin has that Scala has not" list does read
>>>>> like a list
>> of
>>>>> things I would not mind having:
>>>
>>>>> http://confluence.jetbrains.net/display/Kotlin/Comparison+to+Scala
>>>
>>>>>
>>>>>
It makes me sad to see another whole implementation's worth of effort
>>>>> being poured into something new -- come on guys, you won't
>>>>> be enough better than scala. I know everyone wants their
>>>>> own baby, but just imagine what we might accomplish if we
>>>>> didn't all keep re-running the same opening mile. The
>>>>> scenery up here on mile two, it's nice, you should come
>>>>> give it a look.
>>>
>>>>> P.S. First mile is long.
>>>
>>>> They've only gone (or planned) a few hundred yards in a
>>>> direction that Scala hasn't already been.
>>>
>>>> The key ones to my eye are
>>>
>>>> (1) Extension functions. Much cleaner syntax and better
>> performance than
>>>> the Pimp My Library pattern using implicits.
>>>
>>> Extension functions are shortsighted because they only make a
>>> class get
>> new
>>> methods but do not let it implement new interfaces. In any
>>> mature
>> framework,
>>> the primary reason for a method to exist is to implement some
>>> interface. Extension functions don't scale up to that usage.
>>>
>>> Cheers
>>>
>>> -- Martin

d_m
Joined: 2010-11-11,
User offline. Last seen 35 weeks 2 days ago.
Re: new language "Kotlin" from jetbrains

So I've been spending a lot of time trying to optimize the Numeric type
class (see https://github.com/azavea/numeric) and I am of two minds on
the issue of whether it's worth doing specific optimization of wrapper
objects created by implicit decorators.

At Scalathon I started working on a compiler plugin to "cut out the
middle man" and translate things like "new Numeric(a).+(b)" directly
into "numeric.plus(a, b)" to avoid the object creation, and performance
problems I noticed in 2.9 (2-3x slow down).

Beyond the plugin (which isn't working yet) I've been going through a
lot of contortions to try to make sure Numeric is running as fast as
possible. So I definitely agree with Rex that it would be nice for
(relatively) low hanging optimization fruit to be picked--otherwise
users are forced to (each independently) determine which constructs are
the fastest and which to avoid.

But on the other hand, in HEAD the performance of my Numeric type class
is *much* better (based on recent tests), and I'm only seeing about a
(roughly) 4% penalty for using the implicit wrappers in the "normal"
case [1]. I'm not sure whether the compiler has started doing specific
optimizations or if it just happens to produce code that Hotspot has an
easier time optimizing. But it does lend some credence to Martin's
position.

That said, at the end of the day I would like things to be fast, and
will probably end up using whatever it takes to get that performance
(e.g. Arrays, while loops, the scala-CL compiler plugin, custom Numeric
type class, etc).

Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
Re: new language "Kotlin" from jetbrains
Neat.  I really look forward to what comes of this.

On Wed, Jul 20, 2011 at 4:56 PM, Erik Osheim <erik [at] plastic-idolatry [dot] com> wrote:
So I've been spending a lot of time trying to optimize the Numeric type
class (see https://github.com/azavea/numeric) and I am of two minds on
the issue of whether it's worth doing specific optimization of wrapper
objects created by implicit decorators.

At Scalathon I started working on a compiler plugin to "cut out the
middle man" and translate things like "new Numeric(a).+(b)" directly
into "numeric.plus(a, b)" to avoid the object creation, and performance
problems I noticed in 2.9 (2-3x slow down).

Beyond the plugin (which isn't working yet) I've been going through a
lot of contortions to try to make sure Numeric is running as fast as
possible. So I definitely agree with Rex that it would be nice for
(relatively) low hanging optimization fruit to be picked--otherwise
users are forced to (each independently) determine which constructs are
the fastest and which to avoid.

But on the other hand, in HEAD the performance of my Numeric type class
is *much* better (based on recent tests), and I'm only seeing about a
(roughly) 4% penalty for using the implicit wrappers in the "normal"
case [1]. I'm not sure whether the compiler has started doing specific
optimizations or if it just happens to produce code that Hotspot has an
easier time optimizing. But it does lend some credence to Martin's
position.

That said, at the end of the day I would like things to be fast, and
will probably end up using whatever it takes to get that performance
(e.g. Arrays, while loops, the scala-CL compiler plugin, custom Numeric
type class, etc).

phlegmaticprogrammer
Joined: 2010-07-23,
User offline. Last seen 2 years 15 weeks ago.
Re: new language "Kotlin" from jetbrains

Don't worry about "Kotlin", embrace "Babel-17" (http://www.babel-17.com) instead :-) It also has rudimentary tool support, and its newest incarnation v0.3.1 even has support for lenses!

By the way, a small tip how to get a MASSIVE boost for Scala: provide a Scala to Javascript compiler.

- Steven Obua

On 20.07.2011, at 01:29, Paul Phillips wrote:

> Maybe I'm the last guy to hear about things (it happens enough) but
> there's this language here which looks like a more credible effort to be
> a better/simpler scala than most:
>
> http://confluence.jetbrains.net/display/Kotlin/Welcome
>
> The "What Kotlin has that Scala has not" list does read like a list of
> things I would not mind having:
>
> http://confluence.jetbrains.net/display/Kotlin/Comparison+to+Scala
>
> It makes me sad to see another whole implementation's worth of effort
> being poured into something new -- come on guys, you won't be enough
> better than scala. I know everyone wants their own baby, but just
> imagine what we might accomplish if we didn't all keep re-running the
> same opening mile. The scenery up here on mile two, it's nice, you
> should come give it a look.
>
> P.S. First mile is long.

Ben Hutchison 3
Joined: 2009-11-02,
User offline. Last seen 42 years 45 weeks ago.
Re: new language "Kotlin" from jetbrains

On Thu, Jul 21, 2011 at 12:54 AM, Josh Suereth wrote:
> I would just be happy if the compiler had sugar for easier typeclass
> creation/definition and under the covers it still used implicits.   With the
> T : M syntax, if we also had a way to make methoda on M[T] that take a T as
> their first parameter appear to be methods on T without boilerplate, then
> most uses of implicit views are unecessary for me.

+1

That was one of two pieces of typeclass syntactic-sugar I was
advocating here: http://www.scala-lang.org/node/9757

-Ben

Sebastien Bocq
Joined: 2008-12-18,
User offline. Last seen 42 years 45 weeks ago.
Re: new language "Kotlin" from jetbrains
2011/7/20 Erik Osheim <erik [at] plastic-idolatry [dot] com>
But on the other hand, in HEAD the performance of my Numeric type class
is *much* better (based on recent tests), and I'm only seeing about a
(roughly) 4% penalty for using the implicit wrappers in the "normal"
case [1]. I'm not sure whether the compiler has started doing specific
optimizations or if it just happens to produce code that Hotspot has an
easier time optimizing.

If your observation is correct then I would be relieved if compiler folks could reproduce and confirm that these are not conjectures anymore and that they have it well under control. It would be a pity that this change gets lost in a future release of the compiler. Me too, I can't help it, but my left imperative brain cringes when an implicit conversion occurs in the back for a simple infix operation.

Thanks,
Sébastien
sergei
Joined: 2011-03-29,
User offline. Last seen 1 year 20 weeks ago.
Re: new language "Kotlin" from jetbrains
I honestly tried couple times in my life to get deeper into the IntelliJ and to make it the primary tool for a new project. Both times I rolled back to either Eclipse or NetBeans, unsatisfied. Now that I think about it, the main attraction of IntelliJ appears to be the wide variety of refactoring actions and relatively flat "in your face" menu structure, giving appearance of rich functionality. 
Yet I realized that I no longer refactor as much as I used to in my early programming days. I take more time to think about the high-level outline of the program and basically just copy it from my mind into IDE, enriching it with code details along the way. I used to just start coding right after I got *some* idea about it, which would inevitably require multiple refactoring passes later on. As to the IntelliJ's flattened menu structure and numerous keyboard shortcuts, some people find it appealing, but I personally do not. I guess it is a matter of taste.
So, at a risk of sounding snobbish, I would assert that IntelliJ is mostly a premium IDE for beginner programmers. Yes, some people start with it and stay with it long past their "coming of age" phase, yet I would argue that NetBeans was more productive for more experienced guys like me, and Eclipse is just an overall best-rounded platform that accommodates the widest range of programming styles. Just my personal opinion, based on first-hand experience.
Now, we need to realize that Eclipse started as a Java rewrite of IBM's venerable VisualAge for C++, the most advanced IDE at the time, significant chunks of which were written in Prolog, which helped codify the insane complexity of C++ and thus enabled the killer VisualAge feature - semantic referential search. 
IBM did not stop at donating his crown jewel to the Java ecosystem, it kept supporting it for years on end with the effort on order of fifty man-years per year. The apparent target was of course Microsoft's Visual Studio, yet Eclipse also effectively killed off multiple commercial Java IDE hopefuls, and presently is squeezing IntelliJ really hard.
I personally do not believe that Kotlin is primarily a reaction to Scala's complexity. I think it is an answer to the huge competitive threat that the Scala/Eclipse/Typesafe presents to Java/IntelliJ/JetBrains. Martin and Typesafe team have to be mentally and operationally prepared for former friends becoming competitors and even enemies now that the lines in the Scala game of domination are drawn much more clearly.
Once the situation is looked at from that angle, the executive opinions regarding the best course of action are bound to shift. For instance, instead of keeping polishing Scala the language, perhaps more attention is going to be paid to expanding Scala the platform - for instance, taking the LLVM one-man project and boosting it into an effort capable to quickly deliver "native" iOS Scala.
Or maybe to drastically accelerating the work on Scala translation onto parallel hardware code. The opportunity is there as the remainder of the enormous fiscal stimulus money is still slushing in VC coffers. Yet it could be gone in a blink of an eye with all those new sovereign defaults springing to public attention every week. The stimulus money given to the financiers may in effect be "called back" to save the governments. While not too late, please boost the Typesafe's valuation, quickly and shamelessly, and raise enough money (~$50,000,000) to expand the Scala platform beyond the threshold of self-sustainabilty.  

2011/7/20 Cédric Beust ♔ <cedric [at] beust [dot] com>

-- Cédric

On Wed, Jul 20, 2011 at 10:44 AM, Francois <fanf42 [at] gmail [dot] com> wrote:
On Wed, Jul 20, 2011 at 12:57 AM, Francois <fanf42 [at] gmail [dot] com> wrote:
Scala is now known and used in application deployed for several years, it has started to be an option for new projects... How much time and effort before Kotlin (or any other new Scala-alike language) reaching that state ?

Considering that Scala's mindshare is still minuscule (even smaller than Groovy), I think the space between Java and a more modern language is still largely up for grabs. Also, Kotlin is going in one direction than no other language (Groovy, Fantom, Gosu, Ceylon, Scala) has covered adequately yet: top notch IDE support.
Top notch *IntelliJ* support, at least for some time. OK, every body but me seems to think it's the best IDE around, but it's not the only one, and not the one with the biggest user base (ok, perhaps it's a leadership minded user base, but again that put some delay on the broad adoption).

Good point. I'm an Eclipse user myself, so Kotlin's IDEA support does little for me. However, the fact that the language is being designed from the ground up in lockstep with the IDE is, hopefully, a guarantee that it will be extremely toolable (e.g. offering a lot of hooks into the compiler's internals). I'm hopeful that Eclipse support will happen quickly (maybe it's already even underway).
-- Cédric

fanf
Joined: 2009-03-17,
User offline. Last seen 2 years 30 weeks ago.
Re: new language "Kotlin" from jetbrains

On 21/07/2011 00:31, Steven Obua wrote:
> [...]
> By the way, a small tip how to get a MASSIVE boost for Scala: provide a Scala to Javascript compiler.

My little finer says that that wish may become reality in a not so far
future...

Srirangan
Joined: 2011-01-22,
User offline. Last seen 12 weeks 1 day ago.
Re: new language "Kotlin" from jetbrains
Please! This would be great! CoffeeScript is killing me! =)
On Thu, Jul 21, 2011 at 1:51 PM, Francois <fanf42 [at] gmail [dot] com> wrote:
On 21/07/2011 00:31, Steven Obua wrote:
[...]
By the way, a small tip how to get a MASSIVE boost for Scala: provide a Scala to Javascript compiler.

My little finer says that that wish may become reality in a not so far future...

fanf
Joined: 2009-03-17,
User offline. Last seen 2 years 30 weeks ago.
Re: new language "Kotlin" from jetbrains
yW_FH0zGXgCZm03sSeQB7_Ewe0j46r31Rv_FD7tw [at] mail [dot] gmail [dot] com" type="cite">Please! This would be great! CoffeeScript is killing me! =)

Just to be clear : I'm in no way involved with Scala compiler development, nor any kind of Scala to javascript compiler. It's just that I infered ideas from things read on the big internet (and of course, every thing published on Internet is REAL), that's it.


-- 
Francois ARMAND
http://fanf42.blogspot.com
http://www.normation.com
phlegmaticprogrammer
Joined: 2010-07-23,
User offline. Last seen 2 years 15 weeks ago.
Re: new language "Kotlin" from jetbrains

On 21.07.2011, at 10:21, Francois wrote:
On 21/07/2011 00:31, Steven Obua wrote:
[...]
By the way, a small tip how to get a MASSIVE boost for Scala: provide a Scala to Javascript compiler.

My little finer says that that wish may become reality in a not so far future...


Now that you say that I looked up this one the net:http://www.j2js.com/scala-demo/index.html
Is there already any (in)official action going on to make Javascript a standard target for Scala? That would be HUGE.
- Steven
Andrew
Joined: 2011-03-14,
User offline. Last seen 42 years 45 weeks ago.
Re: new language "Kotlin" from jetbrains

Hey all,

> So, at a risk of sounding snobbish, I would assert that IntelliJ is mostly a
> premium IDE for beginner programmers. Yes, some people start with it and
> stay with it long past their "coming of age" phase, yet I would argue that
> NetBeans was more productive for more experienced guys like me, and Eclipse
> is just an overall best-rounded platform that accommodates the widest range
> of programming styles. Just my personal opinion, based on first-hand
> experience.
>

That does, unfortunately, sound snobbish. I use IntelliJ as my primary
IDE, having previously used both Netbeans and Eclipse. I think you are
trying to make a general rule out of your personal opinion. Netbeans
may work for your style, IntelliJ works for others. We are not
beginners, we merely have a different programming style.

> IBM did not stop at donating his crown jewel to the Java ecosystem, it kept
> supporting it for years on end with the effort on order of fifty man-years
> per year. The apparent target was of course Microsoft's Visual Studio, yet
> Eclipse also effectively killed off multiple commercial Java IDE hopefuls,
> and presently is squeezing IntelliJ really hard.
>

Actually, judging by the fact that they have just released a bunch of
new IDEs for dynamic languages, they have a whole range of .Net
products, and have just brought out a competitor to XCode for
objective-c programming on the Mac, I would say they are doing pretty
well...

> I personally do not believe that Kotlin is primarily a reaction to Scala's
> complexity. I think it is an answer to the huge competitive threat that the
> Scala/Eclipse/Typesafe presents to Java/IntelliJ/JetBrains. Martin and
> Typesafe team have to be mentally and operationally prepared for former
> friends becoming competitors and even enemies now that the lines in the
> Scala game of domination are drawn much more clearly.
>

Really? I just think they are diversifying.

Stefan Langer
Joined: 2009-10-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

Hello,

I think I have read most of the thread skimming some longer posts and
I must say we have diverted from the path of seeing what Kotlin does
good and how we can encoporate this into Scala to what is better to
which IDE do we use and what is better.

In the long run only time will tell weather Kotlin will succeed or not
but I wouldn't bet my job on it. If it is the next dominant language I
will be sure to adapt and learn as it shouldn't be a problem once you
have understood the fundamental principles. Experience and some
statistics show that the actual language used doesn't have so much to
do with successful projects in the enterprise sector. It's more about
people and the social aspects but that is a different story.

Then again I'm not a tooling freak I like working with Eclipse but I
also use Emacs, Vim etc...
I like Scala and that is the reason why I use it. I like Ruby but
somehow I'm more into Scala lately.
I code Java because that is the way I make a living.
In the long run I hope that the language I like will be a language I
can make a living off. If not, so be it.

Summarized I do not care whether Kotlin is more or less complex then
Scala and I think this is an open ended debate that doesn't bare any
fruits. On the contrary the discussion how we can incorporate what is
good in Kotlin into Scala in a Scalaishway is a discussion which will
profit everybody.
Stop being afraid and adapt or you will be left behind cause the next
big thing is lurking around the corner.

-
Stefan

P.S.: Kotlin is a very weird name for me as a German. Reminds me
somehow of Quell Kot

phlegmaticprogrammer
Joined: 2010-07-23,
User offline. Last seen 2 years 15 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

> In the long run I hope that the language I like will be a language I
> can make a living off. If not, so be it.
>

That's a very pragmatic and probably also very smart view of things. But none I could ever subscribe to :-)

- Steven

Stefan Langer
Joined: 2009-10-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

2011/7/21 Steven Obua :
>> In the long run I hope that the language I like will be a language I
>> can make a living off. If not, so be it.
>>
>
> That's a very pragmatic and probably also very smart view of things. But none I could ever subscribe to :-)
It's not like I want to but having family makes you pragmatic cause
the little ones want to eat and play and go have fun.
: )

phlegmaticprogrammer
Joined: 2010-07-23,
User offline. Last seen 2 years 15 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

On 21.07.2011, at 12:40, Stefan Langer wrote:

> 2011/7/21 Steven Obua :
>>> In the long run I hope that the language I like will be a language I
>>> can make a living off. If not, so be it.
>>>
>>
>> That's a very pragmatic and probably also very smart view of things. But none I could ever subscribe to :-)
> It's not like I want to but having family makes you pragmatic cause
> the little ones want to eat and play and go have fun.
> : )

I totally understand that, it depends on your personal priorities and life choices so far. I think I can rephrase your statement so that it becomes true for me:

In the long run I hope that choosing the work I do in the way I do will make enough money for a family and little ones. If not, so be it.

- Steven

phlegmaticprogrammer
Joined: 2010-07-23,
User offline. Last seen 2 years 15 weeks ago.
Re: new language "Kotlin" from jetbrains
I just found this interview via lambda the ultimate: http://drdobbs.com/architecture-and-design/231001802?pgno=2
So yes, there seem to be plans for a Scala to Javascript compiler. :-) But one year is a long time.
- Steven
On 21.07.2011, at 10:33, Francois wrote:
yW_FH0zGXgCZm03sSeQB7_Ewe0j46r31Rv_FD7tw [at] mail [dot] gmail [dot] com" type="cite">Please! This would be great! CoffeeScript is killing me! =)

Just to be clear : I'm in no way involved with Scala compiler development, nor any kind of Scala to javascript compiler. It's just that I infered ideas from things read on the big internet (and of course, every thing published on Internet is REAL), that's it.


-- 
Francois ARMAND
http://fanf42.blogspot.com
http://www.normation.com

rytz
Joined: 2008-07-01,
User offline. Last seen 45 weeks 5 days ago.
Re: new language "Kotlin" from jetbrains
There's also http://scalagwt.gogoego.com/Take a look at the "Source Code" tab in
http://dl.dropbox.com/u/12870350/scalagwt/Showcase.html#CwMenuBar


On Thu, Jul 21, 2011 at 15:23, Steven Obua <steven [dot] obua [at] googlemail [dot] com> wrote:
I just found this interview via lambda the ultimate: http://drdobbs.com/architecture-and-design/231001802?pgno=2
So yes, there seem to be plans for a Scala to Javascript compiler. :-) But one year is a long time.
- Steven
On 21.07.2011, at 10:33, Francois wrote:
Please! This would be great! CoffeeScript is killing me! =)

Just to be clear : I'm in no way involved with Scala compiler development, nor any kind of Scala to javascript compiler. It's just that I infered ideas from things read on the big internet (and of course, every thing published on Internet is REAL), that's it.


-- 
Francois ARMAND
http://fanf42.blogspot.com
http://www.normation.com


dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: new language "Kotlin" from jetbrains

On Wed, Jul 20, 2011 at 04:28, Naftoli Gugenheim wrote:
>>
>>
>> The things it has on top of Scala (nullablity and delegation) both seem to
>> be designed well. But everything adds to the language footprint.
>>
>> Cheers
>>
>>  -- Martin
>>
>
> What precisely is the value or purpose of a small language footprint?

Not turning into C++.

C++ is a showcase example of the problems of a large language
footprint -- very hard to implement to spec, unexpected interaction
between features, difficulty in learning the language in full, etc.

H-star Development
Joined: 2010-04-14,
User offline. Last seen 2 years 26 weeks ago.
Re: new language "Kotlin" from jetbrains

apart from unexpected interactions, i don't see a real problem

-------- Original-Nachricht --------
> Datum: Thu, 21 Jul 2011 11:00:22 -0300
> Von: Daniel Sobral
> An: Naftoli Gugenheim
> CC: scala-debate
> Betreff: Re: [scala-debate] new language "Kotlin" from jetbrains

> On Wed, Jul 20, 2011 at 04:28, Naftoli Gugenheim
> wrote:
> >>
> >>
> >> The things it has on top of Scala (nullablity and delegation) both seem
> to
> >> be designed well. But everything adds to the language footprint.
> >>
> >> Cheers
> >>
> >>  -- Martin
> >>
> >
> > What precisely is the value or purpose of a small language footprint?
>
> Not turning into C++.
>
> C++ is a showcase example of the problems of a large language
> footprint -- very hard to implement to spec, unexpected interaction
> between features, difficulty in learning the language in full, etc.
>
>

d_m
Joined: 2010-11-11,
User offline. Last seen 35 weeks 2 days ago.
Re: new language "Kotlin" from jetbrains

On Thu, Jul 21, 2011 at 01:57:41AM +0200, Sébastien Bocq wrote:
> If your observation is correct then I would be relieved if compiler folks
> could reproduce and confirm that these are not conjectures anymore and that
> they have it well under control. It would be a pity that this change gets
> lost in a future release of the compiler. Me too, I can't help it, but my
> left imperative brain cringes when an implicit conversion occurs in the back
> for a simple infix operation.

Paul Phillips talked at Scalathon about how there wasn't enough
performance testing being done on the Scala libraries. Maybe the thing
to do is to try to write up my usecase and submit a patch that adds it
as a performance test (along with the performance numbers I see) so
people working on the compiler and libraries can try to preserve that
performance.

You're right that whatever change(s) improved things may have done so
unintentionally, and that it would be unfortunate if it later vanished
without warning.

Sebastien Bocq
Joined: 2008-12-18,
User offline. Last seen 42 years 45 weeks ago.
Re: new language "Kotlin" from jetbrains


2011/7/21 Erik Osheim <erik [at] plastic-idolatry [dot] com>
On Thu, Jul 21, 2011 at 01:57:41AM +0200, Sébastien Bocq wrote:
> If your observation is correct then I would be relieved if compiler folks
> could reproduce and confirm that these are not conjectures anymore and that
> they have it well under control. It would be a pity that this change gets
> lost in a future release of the compiler. Me too, I can't help it, but my
> left imperative brain cringes when an implicit conversion occurs in the back
> for a simple infix operation.

Paul Phillips talked at Scalathon about how there wasn't enough
performance testing being done on the Scala libraries. Maybe the thing
to do is to try to write up my usecase and submit a patch that adds it
as a performance test (along with the performance numbers I see) so
people working on the compiler and libraries can try to preserve that
performance.

You're right that whatever change(s) improved things may have done so
unintentionally, and that it would be unfortunate if it later vanished
without warning.

dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: new language "Kotlin" from jetbrains

By the way, to those wanting String templates, there has been a plugin
providing that for Scala for a while now. I'm not sure if it works
with 2.9.0, but, anyway,

http://jrudolph.github.com/scala-enhanced-strings/Overview.scala.html

On Tue, Jul 19, 2011 at 20:29, Paul Phillips wrote:
> Maybe I'm the last guy to hear about things (it happens enough) but
> there's this language here which looks like a more credible effort to be
> a better/simpler scala than most:
>
>  http://confluence.jetbrains.net/display/Kotlin/Welcome
>
> The "What Kotlin has that Scala has not" list does read like a list of
> things I would not mind having:
>
>  http://confluence.jetbrains.net/display/Kotlin/Comparison+to+Scala
>
> It makes me sad to see another whole implementation's worth of effort
> being poured into something new -- come on guys, you won't be enough
> better than scala.  I know everyone wants their own baby, but just
> imagine what we might accomplish if we didn't all keep re-running the
> same opening mile.  The scenery up here on mile two, it's nice, you
> should come give it a look.
>
> P.S. First mile is long.
>

sergei
Joined: 2011-03-29,
User offline. Last seen 1 year 20 weeks ago.
Re: Re: new language "Kotlin" from jetbrains
On Thu, Jul 21, 2011 at 2:08 AM, Andrew <andrew [dot] webb [at] gmail [dot] com> wrote:
I think you are
trying to make a general rule out of your personal opinion. Netbeans
may work for your style, IntelliJ works for others. We are not
beginners, we merely have a different programming style.

Apologies for not being clear enough. I thought I said exactly the opposite - that this is my personal opinion. I said it to counteract the notion that somehow IntelliJ is "the best" or "most advanced" IDE period. I think I also stated that it is not just the beginners that use it, yet it is especially attractive to those beginners who like to refactor a lot. I would extend that attractiveness to those "bright, devoted professionals" who have to refactor lots of code written by relative beginners. Maybe you are one of those professionals ;-) I think we are in agreement here.  
Really? I just think they are diversifying.

Maybe so. I don't think it is a good business strategy though. Here we disagree. For a business, it is extremely important to focus, that is, to decide what not to do. Decision to have a finger in every pie is fraught with many fingers being cut off by other players, each focusing on having the whole specific pie.
Cédric Beust ♔
Joined: 2011-06-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains
On Thu, Jul 21, 2011 at 10:43 AM, Sergei <hello [dot] sergei [at] gmail [dot] com> wrote:
Maybe so. I don't think it is a good business strategy though. Here we disagree. For a business, it is extremely important to focus, that is, to decide what not to do. Decision to have a finger in every pie is fraught with many fingers being cut off by other players, each focusing on having the whole specific pie.

I think it's a good move by JetBrains, for a couple of reasons:
  • No matter how good you are (and IDEA is a great IDE), it's hard to compete with free products, especially when these free products are as good as you are. It's a testament to the quality of the JetBrains team that they manage to stay in business despite this fierce competition. For this reason, the only way you can keep selling licenses is with differentiation. Creating your own language so you can build a specific IDE on top of it is definitely a reasonable response to this problem.

  • Should Kotlin be successful, this could be another opportunity for JetBrains to create a new suite of tools on top of the language.
So the decision to create a new language, no matter how techy it sounds, is actually a sound business decision for an IDE company. I wish them the best of luck, even though I'm an Eclipse person myself.
-- Cédric
Jim Powers
Joined: 2011-01-24,
User offline. Last seen 36 weeks 2 days ago.
Re: Re: new language "Kotlin" from jetbrains
2011/7/21 Cédric Beust ♔ <cedric [at] beust [dot] com>
I think it's a good move by JetBrains, for a couple of reasons:

Strangely I read this as:
I think it's a good move to buy JetBrains, for a couple of reasons:

Think TypeSafe can get access to the financial resources necessary to make this happen?  Then the efforts/resources being put into Kotlin can simply be moved over to Scala. And we get Intelli/S Notion really really fast ;-).

--
Jim Powers
nivanov
Joined: 2009-09-15,
User offline. Last seen 37 weeks 5 days ago.
Re: Re: new language "Kotlin" from jetbrains
Market cap of JetBrains is about 10x larger than $10M of Typesafe. Not going to happen and JetBrains is almost a life-style business for its founders. 
Not going to happen :)
I've talked extensively to Scala plugin team from JetBrains at Scalathon and they are pretty close to have all major issues resolved. Once their type aware highlighting is ironed out (for which GridGain is being used as a good test bed) - we'll have pretty much all we need (and can ask for in IDEA) for Scala...
--Nikita Ivanov, CEOGridGain Systemswww.gridgain.com



On Thu, Jul 21, 2011 at 2:33 PM, Jim Powers <jim [at] casapowers [dot] com> wrote:
2011/7/21 Cédric Beust ♔ <cedric [at] beust [dot] com>
I think it's a good move by JetBrains, for a couple of reasons:

Strangely I read this as:
I think it's a good move to buy JetBrains, for a couple of reasons:

Think TypeSafe can get access to the financial resources necessary to make this happen?  Then the efforts/resources being put into Kotlin can simply be moved over to Scala. And we get Intelli/S Notion really really fast ;-).

--
Jim Powers

Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains
+1

On Thu, Jul 21, 2011 at 2:33 PM, Jim Powers <jim [at] casapowers [dot] com> wrote:
2011/7/21 Cédric Beust ♔ <cedric [at] beust [dot] com>
I think it's a good move by JetBrains, for a couple of reasons:

Strangely I read this as:
I think it's a good move to buy JetBrains, for a couple of reasons:

Think TypeSafe can get access to the financial resources necessary to make this happen?  Then the efforts/resources being put into Kotlin can simply be moved over to Scala. And we get Intelli/S Notion really really fast ;-).

--
Jim Powers



--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SWSeattle, WA 98136

+1 206.650.3740

http://biosimilarity.blogspot.com
Jan Kotek 2
Joined: 2011-04-09,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains
I think 10M injection into Typesafe may be actually trigger for Kotlin. It showed that  'next gen java' market is serious and can attract money. 
Also Kotlin language seems to be pretty well designed. And somebody had finally courage to remove stuff which was kind of obsolete and often misused (octal strings, bitwise operators, 'l' letter used to denote Long..)
And I am happy that Scala will finally get some serious competition. 
Jan

On Fri, Jul 22, 2011 at 12:17 AM, Meredith Gregory <lgreg [dot] meredith [at] gmail [dot] com> wrote:
+1

On Thu, Jul 21, 2011 at 2:33 PM, Jim Powers <jim [at] casapowers [dot] com> wrote:
2011/7/21 Cédric Beust ♔ <cedric [at] beust [dot] com>
I think it's a good move by JetBrains, for a couple of reasons:

Strangely I read this as:
I think it's a good move to buy JetBrains, for a couple of reasons:

Think TypeSafe can get access to the financial resources necessary to make this happen?  Then the efforts/resources being put into Kotlin can simply be moved over to Scala. And we get Intelli/S Notion really really fast ;-).

--
Jim Powers



--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SWSeattle, WA 98136

+1 206.650.3740

http://biosimilarity.blogspot.com

Cédric Beust ♔
Joined: 2011-06-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains
On Thu, Jul 21, 2011 at 4:53 PM, Jan Kotek <kjan80 [at] gmail [dot] com> wrote:

I think 10M injection into Typesafe

FYI, it's $3M.
-- Cédric
Stefan Langer
Joined: 2009-10-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

bitwise operators are obsolete? I hope you are not seriouse on this.

-Stefan

2011/7/22 Jan Kotek :
> I think 10M injection into Typesafe may be actually trigger for Kotlin. It
> showed that  'next gen java' market is serious and can attract money.
> Also Kotlin language seems to be pretty well designed. And somebody had
> finally courage to remove stuff which was kind of obsolete and often misused
> (octal strings, bitwise operators, 'l' letter used to denote Long..)
> And I am happy that Scala will finally get some serious competition.
> Jan
>
> On Fri, Jul 22, 2011 at 12:17 AM, Meredith Gregory
> wrote:
>>
>> +1
>>
>> On Thu, Jul 21, 2011 at 2:33 PM, Jim Powers wrote:
>>>
>>> 2011/7/21 Cédric Beust ♔
>>>>
>>>> I think it's a good move by JetBrains, for a couple of reasons:
>>>
>>> Strangely I read this as:
>>>
>>> I think it's a good move to buy JetBrains, for a couple of reasons:
>>>
>>> Think TypeSafe can get access to the financial resources necessary to
>>> make this happen?  Then the efforts/resources being put into Kotlin can
>>> simply be moved over to Scala. And we get Intelli/S Notion really really
>>> fast ;-).
>>>
>>> --
>>> Jim Powers
>>
>>
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 7329 39th Ave SW
>> Seattle, WA 98136
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>
>

jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

http://confluence.jetbrains.net/display/Kotlin/Basic+types

"As of bitwise operations, there're no special characters for them,
but just named functions that can be called in infix form"

On Fri, Jul 22, 2011 at 12:45 AM, Stefan Langer
wrote:
> bitwise operators are obsolete? I hope you are not seriouse on this.
>
> -Stefan
>
> 2011/7/22 Jan Kotek :
>> I think 10M injection into Typesafe may be actually trigger for Kotlin. It
>> showed that  'next gen java' market is serious and can attract money.
>> Also Kotlin language seems to be pretty well designed. And somebody had
>> finally courage to remove stuff which was kind of obsolete and often misused
>> (octal strings, bitwise operators, 'l' letter used to denote Long..)
>> And I am happy that Scala will finally get some serious competition.
>> Jan
>>
>> On Fri, Jul 22, 2011 at 12:17 AM, Meredith Gregory
>> wrote:
>>>
>>> +1
>>>
>>> On Thu, Jul 21, 2011 at 2:33 PM, Jim Powers wrote:
>>>>
>>>> 2011/7/21 Cédric Beust ♔
>>>>>
>>>>> I think it's a good move by JetBrains, for a couple of reasons:
>>>>
>>>> Strangely I read this as:
>>>>
>>>> I think it's a good move to buy JetBrains, for a couple of reasons:
>>>>
>>>> Think TypeSafe can get access to the financial resources necessary to
>>>> make this happen?  Then the efforts/resources being put into Kotlin can
>>>> simply be moved over to Scala. And we get Intelli/S Notion really really
>>>> fast ;-).
>>>>
>>>> --
>>>> Jim Powers
>>>
>>>
>>>
>>> --
>>> L.G. Meredith
>>> Managing Partner
>>> Biosimilarity LLC
>>> 7329 39th Ave SW
>>> Seattle, WA 98136
>>>
>>> +1 206.650.3740
>>>
>>> http://biosimilarity.blogspot.com
>>
>>
>

Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: new language "Kotlin" from jetbrains

On 21/07/2011 12:32, Stefan Langer wrote:
> P.S.: Kotlin is a very weird name for me as a German. Reminds me
> somehow of Quell Kot

I guess it comes from http://en.wikipedia.org/wiki/Kotlin_Island
Which might be related to the East European origin of JetBrains...

Chris Marshall
Joined: 2009-06-17,
User offline. Last seen 44 weeks 3 days ago.
RE: Re: new language "Kotlin" from jetbrains
I would utterly aghast at any business which would make a language decision which would tie them into a tool vendor (MS notwithstanding). I imagine JetBrains will support & encourage (and possibly even author) an Eclipse plugin for Kotlin.
Chris

From: cedric [at] beust [dot] com
Date: Thu, 21 Jul 2011 11:08:36 -0700
Subject: Re: [scala-debate] Re: new language "Kotlin" from jetbrains
To: hello [dot] sergei [at] gmail [dot] com
CC: andrew [dot] webb [at] gmail [dot] com; scala-debate [at] googlegroups [dot] com

On Thu, Jul 21, 2011 at 10:43 AM, Sergei <hello [dot] sergei [at] gmail [dot] com> wrote:
Maybe so. I don't think it is a good business strategy though. Here we disagree. For a business, it is extremely important to focus, that is, to decide what not to do. Decision to have a finger in every pie is fraught with many fingers being cut off by other players, each focusing on having the whole specific pie.

I think it's a good move by JetBrains, for a couple of reasons:
  • No matter how good you are (and IDEA is a great IDE), it's hard to compete with free products, especially when these free products are as good as you are. It's a testament to the quality of the JetBrains team that they manage to stay in business despite this fierce competition. For this reason, the only way you can keep selling licenses is with differentiation. Creating your own language so you can build a specific IDE on top of it is definitely a reasonable response to this problem.

  • Should Kotlin be successful, this could be another opportunity for JetBrains to create a new suite of tools on top of the language.
So the decision to create a new language, no matter how techy it sounds, is actually a sound business decision for an IDE company. I wish them the best of luck, even though I'm an Eclipse person myself.
-- Cédric
Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: new language "Kotlin" from jetbrains

On 22/07/2011 01:53, Jan Kotek wrote:
> Also Kotlin language seems to be pretty well designed. And somebody had finally courage to
> remove stuff which was kind of obsolete and often misused (octal strings, bitwise
> operators, 'l' letter used to denote Long..)

Octal strings? You mean octal numeric literal, perhaps? I fully agree they are a thing of
the past, I wonder why they survived from C to other C-like languages like Java.
I don't see bitwise operators as obsolete, though. I use them almost daily...

Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: new language "Kotlin" from jetbrains

From a quick look at the site, it looks like the language specification isn't set in
stone, yet... Like Ceylon, there is no (publicly available) compiler yet.

I believe they missed an opportunity to distinguish more from Scala/Java/other
concurrents, to support metaprogramming, via type-safe and scope-safe macros.
I found the idea made elegantly in Nemerle (I don't know enough Lisp to comment on it, but
I believe it is the same idea).

I like the idea because it allows easy extension of syntax (even if Scala do a decent job
with partial functions and its nice syntax) and code generation.
Somehow, if such macro facility was in Scala, it would void the need for code generated by
external tools (as I suppose Tuple, among others, it done) and for compiler plugins
(which need extra installation just to compile some source, if I understood correctly).
Such macro system would also allow to have type-safe string interpolation, for example: a
literal string with placeholders can be parsed at compile time and checked against
parameters, and efficiently transformed to string-concatenation code.

Perhaps I am not aware of some drawbacks of such macro system, as I don't see the idea
adopted (from my limited knowledge) in new JVM languages (Gosu, Ceylon, Mirah, Kotlin,
etc.). Well, I suppose Clojure has it, at least...

Jim Powers
Joined: 2011-01-24,
User offline. Last seen 36 weeks 2 days ago.
Re: Re: new language "Kotlin" from jetbrains
On Fri, Jul 22, 2011 at 8:27 AM, Philippe Lhoste <PhiLho [at] gmx [dot] net> wrote:
I believe they missed an opportunity to distinguish more from Scala/Java/other concurrents, to support metaprogramming, via type-safe and scope-safe macros.
I found the idea made elegantly in Nemerle (I don't know enough Lisp to comment on it, but I believe it is the same idea).

+<positive infinity>
--  Jim Powers
ichoran
Joined: 2009-08-14,
User offline. Last seen 2 years 3 weeks ago.
Re: Re: new language "Kotlin" from jetbrains
On Fri, Jul 22, 2011 at 8:27 AM, Philippe Lhoste <PhiLho [at] gmx [dot] net> wrote:
I believe they missed an opportunity to distinguish more from Scala/Java/other concurrents, to support metaprogramming, via type-safe and scope-safe macros.
I found the idea made elegantly in Nemerle (I don't know enough Lisp to comment on it, but I believe it is the same idea).

That would be fantastic.  Maybe Scala 3?

It's not that hard to write code generators in Scala, but a depressing fraction of my code is now the output of code generators.

  --Rex

Kris Nuttycombe
Joined: 2009-01-16,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

On Fri, Jul 22, 2011 at 8:26 AM, Rex Kerr wrote:
> On Fri, Jul 22, 2011 at 8:27 AM, Philippe Lhoste wrote:
>>
>> I believe they missed an opportunity to distinguish more from
>> Scala/Java/other concurrents, to support metaprogramming, via type-safe and
>> scope-safe macros.
>> I found the idea made elegantly in Nemerle (I don't know enough Lisp to
>> comment on it, but I believe it is the same idea).
>
> That would be fantastic.  Maybe Scala 3?
>
> It's not that hard to write code generators in Scala, but a depressing
> fraction of my code is now the output of code generators.

+100 - being able to abstract over names and arity would cut
essentially all the remaining boilerplate from my code.

Viktor Klang
Joined: 2008-12-17,
User offline. Last seen 1 year 27 weeks ago.
Re: Re: new language "Kotlin" from jetbrains


On Fri, Jul 22, 2011 at 4:48 PM, Kris Nuttycombe <kris [dot] nuttycombe [at] gmail [dot] com> wrote:
On Fri, Jul 22, 2011 at 8:26 AM, Rex Kerr <ichoran [at] gmail [dot] com> wrote:
> On Fri, Jul 22, 2011 at 8:27 AM, Philippe Lhoste <PhiLho [at] gmx [dot] net> wrote:
>>
>> I believe they missed an opportunity to distinguish more from
>> Scala/Java/other concurrents, to support metaprogramming, via type-safe and
>> scope-safe macros.
>> I found the idea made elegantly in Nemerle (I don't know enough Lisp to
>> comment on it, but I believe it is the same idea).
>
> That would be fantastic.  Maybe Scala 3?
>
> It's not that hard to write code generators in Scala, but a depressing
> fraction of my code is now the output of code generators.

+100 - being able to abstract over names and arity would cut
essentially all the remaining boilerplate from my code.

+101

--
Viktor Klang

Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang
phlegmaticprogrammer
Joined: 2010-07-23,
User offline. Last seen 2 years 15 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

> +100 - being able to abstract over names and arity would cut
> essentially all the remaining boilerplate from my code.

Something that I find very interesting and which I don't fully understand yet is: when are macros necessary in a dynamically typed language? It seems like the use case you mention above is a case of "not necessary", at least when you are in a dynamically typed language. A case when a macro facility seems to be necessary is when you actually want to examine and use the syntactical nature of your argument expressions, like transforming 'addVC (v.right <= w.left)' into 'addVisualConstraint (v, "right", w, "left", "LessThanOrEqual")'.

- Steven

Maxime Lévesque
Joined: 2009-08-18,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

  http://infoscience.epfl.ch/record/150347/files/gpce63-rompf.pdf

2011/7/22 Kris Nuttycombe <kris [dot] nuttycombe [at] gmail [dot] com>
On Fri, Jul 22, 2011 at 8:26 AM, Rex Kerr <ichoran [at] gmail [dot] com> wrote:
> On Fri, Jul 22, 2011 at 8:27 AM, Philippe Lhoste <PhiLho [at] gmx [dot] net> wrote:
>>
>> I believe they missed an opportunity to distinguish more from
>> Scala/Java/other concurrents, to support metaprogramming, via type-safe and
>> scope-safe macros.
>> I found the idea made elegantly in Nemerle (I don't know enough Lisp to
>> comment on it, but I believe it is the same idea).
>
> That would be fantastic.  Maybe Scala 3?
>
> It's not that hard to write code generators in Scala, but a depressing
> fraction of my code is now the output of code generators.

+100 - being able to abstract over names and arity would cut
essentially all the remaining boilerplate from my code.

Cédric Beust ♔
Joined: 2011-06-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: new language "Kotlin" from jetbrains
On Fri, Jul 22, 2011 at 8:00 AM, Steven Obua <steven [dot] obua [at] googlemail [dot] com> wrote:


> +100 - being able to abstract over names and arity would cut
> essentially all the remaining boilerplate from my code.

Something that I find very interesting and which I don't fully understand yet is: when are macros necessary in a dynamically typed language?

The need doesn't go away just because it's a dynamically typed language, but it's usually referred to as "monkey patching". Rightfully so, in my opinion.
I'm of two minds about statically typed macros. They can be tremendously useful and they can lead to very elegant DSL's and constructs, but the potential to come across code that you're having a hard time parsing even though you know the language it's written in is very high.
Groovy has made some interesting steps in this direction by offering hooks that seem to be halfway between compiler plug-ins and full blown macros.
-- Cédric
phlegmaticprogrammer
Joined: 2010-07-23,
User offline. Last seen 2 years 15 weeks ago.
Re: Re: new language "Kotlin" from jetbrains

On 22.07.2011, at 17:07, Cédric Beust ♔ wrote:
On Fri, Jul 22, 2011 at 8:00 AM, Steven Obua <steven [dot] obua [at] googlemail [dot] com> wrote:


> +100 - being able to abstract over names and arity would cut
> essentially all the remaining boilerplate from my code.

Something that I find very interesting and which I don't fully understand yet is: when are macros necessary in a dynamically typed language?

The need doesn't go away just because it's a dynamically typed language, but it's usually referred to as "monkey patching". Rightfully so, in my opinion.

Monkey Patching doesn't seem to be the same as coding macros. Rather, monkey patching seems to be what you do in certain situations if you DON'T have a good macro system.


I'm of two minds about statically typed macros. They can be tremendously useful and they can lead to very elegant DSL's and constructs, but the potential to come across code that you're having a hard time parsing even though you know the language it's written in is very high.
Groovy has made some interesting steps in this direction by offering hooks that seem to be halfway between compiler plug-ins and full blown macros.

Thx for the pointer, I am going to check this out.
- Steven
nivanov
Joined: 2009-09-15,
User offline. Last seen 37 weeks 5 days ago.
Re: Re: new language "Kotlin" from jetbrains
Investment to Typesafe was $3M on $10M post-money valuation (or close to that). But that's irrelevant. Typesafe shouldn't be buying JetBrains as this has no business rational what-so-ever. 
As far as I know the goal for Typesafe for the next 24 months is to increase Scala adoption as much as possible and this can be (and should be) achieved by different means. 
Work on Kotlin has started long before formation of Typesafe...
--Nikita Ivanov, CEOGridGain Systemswww.gridgain.com



On Thu, Jul 21, 2011 at 4:53 PM, Jan Kotek <kjan80 [at] gmail [dot] com> wrote:
I think 10M injection into Typesafe may be actually trigger for Kotlin. It showed that  'next gen java' market is serious and can attract money. 
Also Kotlin language seems to be pretty well designed. And somebody had finally courage to remove stuff which was kind of obsolete and often misused (octal strings, bitwise operators, 'l' letter used to denote Long..)
And I am happy that Scala will finally get some serious competition. 
Jan

On Fri, Jul 22, 2011 at 12:17 AM, Meredith Gregory <lgreg [dot] meredith [at] gmail [dot] com> wrote:
+1

On Thu, Jul 21, 2011 at 2:33 PM, Jim Powers <jim [at] casapowers [dot] com> wrote:
2011/7/21 Cédric Beust ♔ <cedric [at] beust [dot] com>
I think it's a good move by JetBrains, for a couple of reasons:

Strangely I read this as:
I think it's a good move to buy JetBrains, for a couple of reasons:

Think TypeSafe can get access to the financial resources necessary to make this happen?  Then the efforts/resources being put into Kotlin can simply be moved over to Scala. And we get Intelli/S Notion really really fast ;-).

--
Jim Powers



--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SWSeattle, WA 98136

+1 206.650.3740

http://biosimilarity.blogspot.com


xeno.by
Joined: 2011-07-18,
User offline. Last seen 42 years 45 weeks ago.
Re: new language "Kotlin" from jetbrains

I also wonder whether there are plans to introduce metaprogramming
facilities in Scala. Would be lovely to receive comments from Scala
dev team regarding that.

However, we must keep in mind that Scala already provides experimental
support for a certain flavor of metaprogramming. To some extent,
metaprogramming can be implemented by language virtualization via
lightweight modular staging (http://infoscience.epfl.ch/record/150347/
files/gpce63-rompf.pdf). Personally to me, this approach seems simpler
to implement and use than traditional macros.

Language virtualization is an active area of research (check out
https://github.com/stanford-ppl/delite for more information). Though,
at the moment, there are certain language constructs that cannot be
virtualized. Currently unsupported constructs include all definition
constructs (though, Delite team plans to virtualize datastructures
somehow), pattern matching (Adriaan hinted that this is also a work in
progress) and, maybe, some other stuff that I forgot (e.g. there are
certain problem with casts).

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland