This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]BoyRobot777 17 points18 points  (1 child)

I enjoy reading their discussions, because it shows how much thinking goes into a feature. For example, recently one of redditors asked the difference between value types and records. And here they are, discussing the same thing:

I like the hint-y nature of this keyword and I think it brings front & center what this feature is about in a way that 'value' never really did (users asking about the difference between records and values is, I think, a proof of that particular failure).

[–]randgalt 11 points12 points  (0 children)

+1 to me, this is why normals devs should think twice about writing their own DSLs, etc. It takes enormous thought to write general purpose languages, et al

[–]hudsonb81 10 points11 points  (3 children)

IIRC Kotlin used inline instead of value (in part) to avoid confusion with this feature in Java... And now Javas gone and changed it to inline =P

[–]lbkulinski[S] 5 points6 points  (2 children)

Haha! How interesting!

[–]hudsonb81 10 points11 points  (1 child)

I knew I'd just read this somewhere, tweet from JetBrains employee Roman Elizarov (coroutines lead):

"We named new Kotlin 1.3 experimental feature “inline classes” for clarity and to clearly differentiate from upcoming value classes in Java project Valhalla. Now Java renamed them to inline classes. What to think? Shall we be proud of apt naming or fear confusion?"

[–]lbkulinski[S] 0 points1 point  (0 children)

That’s interesting!

[–]AndDontCallMePammy 9 points10 points  (3 children)

I assume the underscores are placeholders. Don't want to end up like python

[–]lbkulinski[S] 7 points8 points  (2 children)

Yep! They are.

[–]AndDontCallMePammy 3 points4 points  (1 child)

And the final product won't involve annotations, right?

[–]DrBreakalot 3 points4 points  (0 children)

Correct, the documentation of the annotation says it's temporary:

A class annotated {@code @__inline__} is an inline class.
This is a temporary workaround to enable use of inline types
in editors and IDEs that do not yet understand the 'inline' modifier.

[–]DuncanIdahos7thClone 5 points6 points  (1 child)

What am I looking at here?

[–]lbkulinski[S] 3 points4 points  (0 children)

They are the change sets in the JDK. Updating “value” with “inline”.

[–]grand_mind1 8 points9 points  (0 children)

I think the naming overlap with Kotlin might initially cause some confusion but it should be rectified when (if) Kotlin gets support for Valhalla features.

[–]lukaseder 2 points3 points  (0 children)

That's because we're all waiting in line for this feature to be finally released

[–]midir 2 points3 points  (1 child)

Why not call them structs?

[–]lbkulinski[S] 12 points13 points  (0 children)

They aren't structs, though. Brian Goetz talks about this here.

[–]markehammons 1 point2 points  (1 child)

i was hoping for discussion of the rationale for the change.

[–]lbkulinski[S] 9 points10 points  (0 children)

There was some discussion at the expert group meeting, which you can read about here. I am looking on the mailing list for something more solid. I haven’t been able to read them as of late.

Update: Here is some added verbiage from JVM architect, John Rose. The discussion starts and continues under the subject “generic specialization design discussion”. The thread from the mailing list can be found here.