Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #13664 > unrolled thread

no more primitive data types in Java (JDK 10+). What do you think?

Started by"Nasser M. Abbasi" <nma@12000.org>
First post2012-04-19 18:27 -0500
Last post2012-04-20 19:04 -0400
Articles 20 on this page of 78 — 21 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  no more primitive data types in Java (JDK 10+). What do you think? "Nasser M. Abbasi" <nma@12000.org> - 2012-04-19 18:27 -0500
    Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-19 20:02 -0400
      Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-19 17:31 -0700
        Re: no more primitive data types in Java (JDK 10+). What do you think? Robert Klemme <shortcutter@googlemail.com> - 2012-04-20 15:45 +0200
          Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-20 15:05 +0000
            Re: no more primitive data types in Java (JDK 10+). What do you think? Robert Klemme <shortcutter@googlemail.com> - 2012-04-20 19:32 +0200
          Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-20 20:47 -0700
      Re: no more primitive data types in Java (JDK 10+). What do you think? Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-04-19 17:45 -0700
        Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-19 21:22 -0400
        Re: no more primitive data types in Java (JDK 10+). What do you think? "Nasser M. Abbasi" <nma@12000.org> - 2012-04-19 21:16 -0500
          Re: no more primitive data types in Java (JDK 10+). What do you think? Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-04-19 23:11 -0700
    Re: no more primitive data types in Java (JDK 10+). What do you think? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-19 21:35 -0300
      Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-19 21:31 -0400
      Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-19 19:22 -0700
        Re: no more primitive data types in Java (JDK 10+). What do you think? Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-04-19 23:15 -0700
          Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-20 07:45 -0700
            Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-20 08:20 -0700
              Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-20 19:57 -0700
                Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 04:25 -0700
                  Re: no more primitive data types in Java (JDK 10+). What do you think? Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-21 07:05 -0500
                    Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 07:42 -0700
                      Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 12:55 -0700
                        Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 13:27 -0700
                          Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 13:34 -0700
                            Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 14:01 -0700
                            Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-21 23:48 +0000
                              Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 17:46 -0700
          Re: no more primitive data types in Java (JDK 10+). What do you think? Gene Wirchenko <genew@ocis.net> - 2012-04-20 08:08 -0700
            Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-20 16:46 +0000
              Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-20 12:52 -0700
          Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-20 08:17 -0700
            Re: no more primitive data types in Java (JDK 10+). What do you think? Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-04-20 09:02 -0700
              Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-20 12:48 -0700
              Re: no more primitive data types in Java (JDK 10+). What do you think? David Lamb <dalamb@cs.queensu.ca> - 2012-04-20 21:08 -0400
                Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-21 01:55 +0000
                  Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 04:28 -0700
    Re: no more primitive data types in Java (JDK 10+). What do you think? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-04-19 19:36 -0500
    Re: no more primitive data types in Java (JDK 10+). What do you think? Tsukino Usagi <usagi@tsukino.ca> - 2012-04-20 15:27 +0900
      Re: no more primitive data types in Java (JDK 10+). What do you think? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-20 07:04 -0300
        Re: no more primitive data types in Java (JDK 10+). What do you think? Tsukino Usagi <usagi@tsukino.ca> - 2012-04-20 22:17 +0900
          Re: no more primitive data types in Java (JDK 10+). What do you think? Robert Klemme <shortcutter@googlemail.com> - 2012-04-20 15:59 +0200
        Re: no more primitive data types in Java (JDK 10+). What do you think? Thufir <hawat.thufir@gmail.com> - 2012-04-20 14:21 -0700
        Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:11 -0400
      Re: no more primitive data types in Java (JDK 10+). What do you think? Tsukino Usagi <usagi@tsukino.ca> - 2012-04-20 22:16 +0900
        Re: no more primitive data types in Java (JDK 10+). What do you think? Robert Klemme <shortcutter@googlemail.com> - 2012-04-20 15:55 +0200
      Re: no more primitive data types in Java (JDK 10+). What do you think? Patricia Shanahan <pats@acm.org> - 2012-04-20 07:49 -0700
        Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:19 -0400
          Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 07:58 -0700
      Re: no more primitive data types in Java (JDK 10+). What do you think? rossum <rossum48@coldmail.com> - 2012-04-20 20:08 +0100
        Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-20 12:54 -0700
          Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-20 21:48 +0000
            Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-20 16:45 -0700
              Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-21 01:56 +0000
                Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 04:35 -0700
        Re: no more primitive data types in Java (JDK 10+). What do you think? Jim Janney <jjanney@shell.xmission.com> - 2012-04-20 16:24 -0600
      Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:08 -0400
      Re: no more primitive data types in Java (JDK 10+). What do you think? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-04-20 18:14 -0500
        Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:22 -0400
        Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 20:36 -0400
    Re: no more primitive data types in Java (JDK 10+). What do you think? Roedy Green <see_website@mindprod.com.invalid> - 2012-04-20 05:33 -0700
      Re: no more primitive data types in Java (JDK 10+). What do you think? Bernd Nawothnig <Bernd.Nawothnig@t-online.de> - 2012-04-20 20:53 +0200
        Re: no more primitive data types in Java (JDK 10+). What do you think? Gene Wirchenko <genew@ocis.net> - 2012-04-20 13:36 -0700
          Re: no more primitive data types in Java (JDK 10+). What do you think? Bernd Nawothnig <Bernd.Nawothnig@t-online.de> - 2012-04-21 10:20 +0200
            Re: no more primitive data types in Java (JDK 10+). What do you think? Gene Wirchenko <genew@ocis.net> - 2012-04-23 10:24 -0700
              Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-24 14:39 -0700
                Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-24 15:06 -0700
                  Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-24 17:07 -0700
                    Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-25 00:48 -0700
                      Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-25 08:20 -0700
                        Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-25 08:59 -0700
                          Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-25 10:32 -0700
                Re: no more primitive data types in Java (JDK 10+). What do you think? Tsukino Usagi <usagi@tsukino.ca> - 2012-04-29 23:03 +0900
                  Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-29 10:28 -0700
        Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 08:55 -0700
          Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 12:56 -0700
            Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 13:41 -0700
    Re: no more primitive data types in Java (JDK 10+). What do you think? Silvio Bierman <silvio@moc.com> - 2012-04-20 16:50 +0200
      Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:04 -0400

Page 1 of 4  [1] 2 3 4  Next page →


#13664 — no more primitive data types in Java (JDK 10+). What do you think?

From"Nasser M. Abbasi" <nma@12000.org>
Date2012-04-19 18:27 -0500
Subjectno more primitive data types in Java (JDK 10+). What do you think?
Message-ID<jmq71h$su0$1@speranza.aioe.org>
According to

"To Java SE 8, and Beyond! Simon Ritter Technology Evangelist, Oracle"

(Google the string "To Java SE 8 and Beyond!" and click on
the PDF file, about the 5th link down the page)

On page 42, it says:

    "Unified type system (JDK 10+)
     No more primitives, make everything objects"

I've seen very little discussion on this very important
subject.

What do the experts here think of the idea?

For me, and I am no expert, I think it will be good to have
a consistent type model (everything is an object), but I am
worried that the performance will take a hit (computational finite
elements methods, large meshes, etc...), unless PC's and computers
will become 1000 times faster by the time JDK 10+ comes in few years
from now, which might be possible.

Any one knows more information about this item?
Any truth to it? Do you think it will really happen?

--Nasser

[toc] | [next] | [standalone]


#13665

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-04-19 20:02 -0400
Message-ID<4f90a788$0$286$14726298@news.sunsite.dk>
In reply to#13664
On 4/19/2012 7:27 PM, Nasser M. Abbasi wrote:
> According to
>
> "To Java SE 8, and Beyond! Simon Ritter Technology Evangelist, Oracle"
>
> (Google the string "To Java SE 8 and Beyond!" and click on
> the PDF file, about the 5th link down the page)
>
> On page 42, it says:
>
> "Unified type system (JDK 10+)
> No more primitives, make everything objects"
>
> I've seen very little discussion on this very important
> subject.
>
> What do the experts here think of the idea?
>
> For me, and I am no expert, I think it will be good to have
> a consistent type model (everything is an object), but I am
> worried that the performance will take a hit (computational finite
> elements methods, large meshes, etc...), unless PC's and computers
> will become 1000 times faster by the time JDK 10+ comes in few years
> from now, which might be possible.
>
> Any one knows more information about this item?
> Any truth to it? Do you think it will really happen?

C# has it that way. No performance problem. It should
certainly be possible to implement.

(note: everything object does not imply everything
a reference type)

I don't know if it will actually happen.

And I don't think the practical impact will be big
if it does happen (neither performance nor the way Java code
is written).

Arne

[toc] | [prev] | [next] | [standalone]


#13667

FromLew <lewbloch@gmail.com>
Date2012-04-19 17:31 -0700
Message-ID<30566772.52.1334881887716.JavaMail.geo-discussion-forums@pbts20>
In reply to#13665
Arne Vajhøj wrote:
>  Nasser M. Abbasi wrote:
>> According to
>>
>> "To Java SE 8, and Beyond! Simon Ritter Technology Evangelist, Oracle"
>>
>> (Google the string "To Java SE 8 and Beyond!" and click on
>> the PDF file, about the 5th link down the page)
>>
>> On page 42, it says:
>>
>> "Unified type system (JDK 10+)
>> No more primitives, make everything objects"
>>
>> I've seen very little discussion on this very important
>> subject.
>>
>> What do the experts here think of the idea?
>>
>> For me, and I am no expert, I think it will be good to have
>> a consistent type model (everything is an object), but I am
>> worried that the performance will take a hit (computational finite
>> elements methods, large meshes, etc...), unless PC's and computers
>> will become 1000 times faster by the time JDK 10+ comes in few years
>> from now, which might be possible.
>>
>> Any one knows more information about this item?
>> Any truth to it? Do you think it will really happen?
> 
> C# has it that way. No performance problem. It should
> certainly be possible to implement.
> 
> (note: everything object does not imply everything
> a reference type)

And reference type doesn't inherently imply a performance hit. Java's Hotspot famously enregisters and stack-allocates objects under the hood when it deems it felicitous.

> I don't know if it will actually happen.
> 
> And I don't think the practical impact will be big
> if it does happen (neither performance nor the way Java code
> is written).

And it is quite likely that computers will be enough faster, if not 1000 times so, before Java 10 comes out. How much longer for even Java 8, and how long was it between 6 and 7? Java usually has had about two years between versions, meaning that Java 10 might be out in 2017. The very paradigm for computing might render the notion of "primitives" irrelevant by then. Even assuming current computing models, Moore's Law hints that we might see an eightfold increase in computer power by then.

There is a movement in the Java community for value objects, as opposed to references, in support of Arne's point. 

There's also the point that source distinctions might look different in bytecode or machine code. What we might think of as an 'int' object at the source level might be treated as an ordinary machine integer at the lower level.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#13689

FromRobert Klemme <shortcutter@googlemail.com>
Date2012-04-20 15:45 +0200
Message-ID<9vd7jjFn9sU1@mid.individual.net>
In reply to#13667
On 04/20/2012 02:31 AM, Lew wrote:

> There's also the point that source distinctions might look different in bytecode or machine code. What we might think of as an 'int' object at the source level might be treated as an ordinary machine integer at the lower level.

As an additional data point: Ruby MRI works like that.  Basically 
integers (instances of class Fixnum) look like ordinary objects but 
under the hood the value is encoded in the reference and there is no 
object on the heap.  You get a nice consistent model for the language 
user but avoid the overhead of GC.  Ruby is still not a racing car 
compared with other PL - usual trade offs apply.  The concept is 
described here:
http://en.wikipedia.org/wiki/Tagged_pointer

It could require a signicifant (nice typo, sounds like an animal) change 
in the JVM definition though.

Kind regards

	robert

[toc] | [prev] | [next] | [standalone]


#13696

Fromglen herrmannsfeldt <gah@ugcs.caltech.edu>
Date2012-04-20 15:05 +0000
Message-ID<jmru01$nn4$3@speranza.aioe.org>
In reply to#13689
Robert Klemme <shortcutter@googlemail.com> wrote:
> On 04/20/2012 02:31 AM, Lew wrote:

(snip)
> As an additional data point: Ruby MRI works like that.  Basically 
> integers (instances of class Fixnum) look like ordinary objects but 
> under the hood the value is encoded in the reference and there is no 
> object on the heap.  You get a nice consistent model for the language 
> user but avoid the overhead of GC.  

I have used arrays dimensioned [1] in Java where I needed a 
primitive type as an object. I believed at the time that it was
faster than the other ways to do it.

-- glen

[toc] | [prev] | [next] | [standalone]


#13704

FromRobert Klemme <shortcutter@googlemail.com>
Date2012-04-20 19:32 +0200
Message-ID<9vdku8Fr5eU1@mid.individual.net>
In reply to#13696
On 20.04.2012 17:05, glen herrmannsfeldt wrote:
> I have used arrays dimensioned [1] in Java where I needed a
> primitive type as an object.

That was often the approach if one wanted to modify a value in the 
caller's or other scope.  I'd rather have a mutable integer object.

> I believed at the time that it was
> faster than the other ways to do it.

And, was it?

Cheers

	robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

[toc] | [prev] | [next] | [standalone]


#13733

FromBGB <cr88192@hotmail.com>
Date2012-04-20 20:47 -0700
Message-ID<jmtanb$q1e$1@news.albasani.net>
In reply to#13689
On 4/20/2012 6:45 AM, Robert Klemme wrote:
> On 04/20/2012 02:31 AM, Lew wrote:
>
>> There's also the point that source distinctions might look different
>> in bytecode or machine code. What we might think of as an 'int' object
>> at the source level might be treated as an ordinary machine integer at
>> the lower level.
>
> As an additional data point: Ruby MRI works like that. Basically
> integers (instances of class Fixnum) look like ordinary objects but
> under the hood the value is encoded in the reference and there is no
> object on the heap. You get a nice consistent model for the language
> user but avoid the overhead of GC. Ruby is still not a racing car
> compared with other PL - usual trade offs apply. The concept is
> described here:
> http://en.wikipedia.org/wiki/Tagged_pointer
>
> It could require a signicifant (nice typo, sounds like an animal) change
> in the JVM definition though.
>

AFAIK, in development versions of the JVM this is apparently already 
being worked on (I remember seeing it being talked about a few months 
back on one of the JVM development mailing lists). I am not really sure 
about the implementation specifics though.


my own VM also has fixnums, although they don't use tagged pointers.


the VM uses inaccessible address-ranges as types.

on 32-bit x86 targets, this generally means the space between 0xC0000000 
and 0xFFFFFFFF. on x86-64, a much bigger chunk of address space is used 
(currently a roughly 56-bit wide region, but on current HW this could be 
pushed actually to about 60 or 62 bits, given the actual accessible part 
of the space is relatively tiny).

as-is, this currently means 28 bit fixnums on x86, and 48 bit fixnums on 
x86-64, rather than the 30 and 62 bits possible via tagged pointers.

an advantage, however, is that this does not interfere with my ability 
to make use of unaligned pointers: I wanted a system where I could point 
a character pointer anywhere in a string, and still have the 
type-checking able to figure out that it was a string, and more so, also 
be able to tell me the address of the start of the string and the 
relative offset therein.

it all works fairly well, although type-checking is potentially a little 
more costly, given that most such operations need to identify the base 
of the heap-object in question. luckily, these lookups are 
"approximately" constant time (it is not really constant, but roughly 
ranges from O(1) to O(log2 n) depending on various factors).


or such...

[toc] | [prev] | [next] | [standalone]


#13670

FromPeter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com>
Date2012-04-19 17:45 -0700
Message-ID<wvl26olxh7pm$.1jmw7dsgub26$.dlg@40tude.net>
In reply to#13665
On Thu, 19 Apr 2012 20:02:12 -0400, Arne Vajhøj wrote:

> On 4/19/2012 7:27 PM, Nasser M. Abbasi wrote:
>> According to
>>
>> "To Java SE 8, and Beyond! Simon Ritter Technology Evangelist, Oracle"
>>
>> (Google the string "To Java SE 8 and Beyond!" and click on
>> the PDF file, about the 5th link down the page)

WTF?  If you downloaded the doc yourself (and so obviously must have the
link), just provide the damn link here.

(And no, I was unable to track down the PDF using either Google or Bing...I
did try for a few minutes to follow your ridiculous instructions, to no
avail).

>> On page 42, it says:
>>
>> "Unified type system (JDK 10+)
>> No more primitives, make everything objects"
>>
>> I've seen very little discussion on this very important
>> subject.
>>
>> What do the experts here think of the idea?

It depends on what they mean by "no more primitives, make everything
objects".

> [...]
>> Any one knows more information about this item?
>> Any truth to it? Do you think it will really happen?
> 
> C# has it that way. No performance problem. It should
> certainly be possible to implement.

I haven't seen the context, so I don't know if they elaborate or not.
Certainly the statement quoted does not provide enough detail to know
whether they mean a C#-style design or not.

Note that while C# (actually, .NET...the same type system is shared by all
the .NET languages) unifies the types through a common base System.Object
type, that's not the same as having a completely unified type system.
Value types are still fundamentally different from reference types, and
there are most certainly real differences between primitive types in .NET
(which do exist in spite of the unified type system) and user-defined value
types, as well of course between all value types primitive or otherwise and
reference types.

If the original reference simply means introducing something like what .NET
has, then I'd agree it shouldn't cause any sort of performance problem, nor
should be all that disruptive to the Java community itself.

But if the original reference means going further than that, where every
single type is fundamentally the same, where there are genuinely no types
that can be considered "primitive" (i.e. handled in ways by the compiler
that are special to those types and unavailable to user-defined types),
then doing that without sacrificing some performance could in fact be
harder or even impossible.

That said, looking at how long it took for them to get around to deciding
on some sort of closure implementation, I have a hard time imagining that
Java will ever unify its type system even in the way that .NET has, never
mind in a way that could be more disruptive.

It's very hard to predict the future though.  I would not bet good money
against it happening.  Just because I'm not imaginative enough to be able
to visualize it happening, that doesn't mean it couldn't or wouldn't
happen.  :)

Pete

[toc] | [prev] | [next] | [standalone]


#13671

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-04-19 21:22 -0400
Message-ID<4f90ba4e$0$288$14726298@news.sunsite.dk>
In reply to#13670
On 4/19/2012 8:45 PM, Peter Duniho wrote:
> On Thu, 19 Apr 2012 20:02:12 -0400, Arne Vajhøj wrote:
>> On 4/19/2012 7:27 PM, Nasser M. Abbasi wrote:
>>> According to
>>>
>>> "To Java SE 8, and Beyond! Simon Ritter Technology Evangelist, Oracle"
>>>
>>> (Google the string "To Java SE 8 and Beyond!" and click on
>>> the PDF file, about the 5th link down the page)
>
> WTF?  If you downloaded the doc yourself (and so obviously must have the
> link), just provide the damn link here.
>
> (And no, I was unable to track down the PDF using either Google or Bing...I
> did try for a few minutes to follow your ridiculous instructions, to no
> avail).

http://qconlondon.com/dl/qcon-london-2012/slides/SimonRitter_TheFutureOfTheJavaPlatformJavaSE8Beyond.pdf

>>> On page 42, it says:
>>>
>>> "Unified type system (JDK 10+)
>>> No more primitives, make everything objects"
>>>
>>> I've seen very little discussion on this very important
>>> subject.
>>>
>>> What do the experts here think of the idea?
>
> It depends on what they mean by "no more primitives, make everything
> objects".
>
>> [...]
>>> Any one knows more information about this item?
>>> Any truth to it? Do you think it will really happen?
>>
>> C# has it that way. No performance problem. It should
>> certainly be possible to implement.
>
> I haven't seen the context, so I don't know if they elaborate or not.
> Certainly the statement quoted does not provide enough detail to know
> whether they mean a C#-style design or not.
>
> Note that while C# (actually, .NET...the same type system is shared by all
> the .NET languages) unifies the types through a common base System.Object
> type, that's not the same as having a completely unified type system.
> Value types are still fundamentally different from reference types, and
> there are most certainly real differences between primitive types in .NET
> (which do exist in spite of the unified type system) and user-defined value
> types, as well of course between all value types primitive or otherwise and
> reference types.
>
> If the original reference simply means introducing something like what .NET
> has, then I'd agree it shouldn't cause any sort of performance problem, nor
> should be all that disruptive to the Java community itself.
>
> But if the original reference means going further than that, where every
> single type is fundamentally the same, where there are genuinely no types
> that can be considered "primitive" (i.e. handled in ways by the compiler
> that are special to those types and unavailable to user-defined types),
> then doing that without sacrificing some performance could in fact be
> harder or even impossible.

Let me copy a bit more from page 42:

<quote>
* Unified type system (JDK 10+)
   * No more primitives, make everything objects
* Other type reification (JDK 10+)
   * True generics
   * Function types
* Data structure optimizations (JDK 10+)
   * Structs, multi-dimensional arrays, etc
</quote>

It sounds as if it could be relative close to the C# way.

Arne

[toc] | [prev] | [next] | [standalone]


#13673

From"Nasser M. Abbasi" <nma@12000.org>
Date2012-04-19 21:16 -0500
Message-ID<jmqgts$fnj$1@speranza.aioe.org>
In reply to#13670
On 4/19/2012 7:45 PM, Peter Duniho wrote:
> On Thu, 19 Apr 2012 20:02:12 -0400, Arne Vajhøj wrote:
>
>> On 4/19/2012 7:27 PM, Nasser M. Abbasi wrote:
>>> According to
>>>
>>> "To Java SE 8, and Beyond! Simon Ritter Technology Evangelist, Oracle"
>>>
>>> (Google the string "To Java SE 8 and Beyond!" and click on
>>> the PDF file, about the 5th link down the page)
>
> WTF?  If you downloaded the doc yourself (and so obviously must have the
> link), just provide the damn link here.
>

Hello Peter,

The reason I did not put the link, is because Google has some way of
making some links so very long (it seems to encode them somehow?),
so that the link was very long.  If I have put the link I was
using at the time, people here would have screamed at me, and the link
would also have broken anyway, since my Thunderbird news reader that I use
does not allow more than 132 long lines.

Here is the link I was looking at

http://www.google.com/url?sa=t&rct=j&q=%22to%20java%20se%208%20and%20
beyond!%22%20&source=web&cd=5&ved=0CEQQFjAE&url=http%3A%2F%2
Fqconlondon.com%2Fdl%2Fqcon-london
2012%2Fslides%2FSimonRitter_TheFutureOfTheJavaPlatformJavaSE8Beyond.pdf
&ei=K8WQT43LI9Octweh-ZnqBA&usg=AFQjCNF8M1Xi7sGluyZu-lMDVQksqqm1sg&cad=rja

Googling a string is just as easy. I am not sure where you could
not find it. Here is a screen shot when I Google the string, and
you can see the PDF file is right there, the 5th link as I said

http://12000.org/tmp/april_19_2012/screen_shot.png

Sorry for any trouble that my instructions have caused you,
but I hope you understand more now why.

--Nasser

[toc] | [prev] | [next] | [standalone]


#13678

FromPeter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com>
Date2012-04-19 23:11 -0700
Message-ID<1nenv0jo849ai.1vbzqsjpap3gb.dlg@40tude.net>
In reply to#13673
On Thu, 19 Apr 2012 21:16:27 -0500, Nasser M. Abbasi wrote:

> [...]
> Sorry for any trouble that my instructions have caused you,
> but I hope you understand more now why.

No, I do not understand why.  As Arne's demonstrated, it is not hard to
post _just_ the actual part of the link that matters, rather than the
entire Google redirection.  Even if you can't figure that out, there are
link-shortening services that can address the length issue.  And even if
you can't figure _that_ out, you can just post the whole link.  It's easier
to reassemble a line-broken link than to try to get one person's search
results to match another person's search results exactly.

Don't forget: both Bing and Google customize their results according to the
user, and can even adjust the search results dynamically according to what
else is happening on the Internet at that moment.  Just because something
shows up in a particular place when you search for a specific string, that
doesn't mean it will when someone else does.

I don't have a specific explanation for why the link does not show up in my
results, but the fact remains that it does not, nor should you have had any
reason to assume it would, nor was there any reason you couldn't have just
posted _some_ link, even if not the most appropriate one.

Pete

[toc] | [prev] | [next] | [standalone]


#13668

FromArved Sandstrom <asandstrom3minus1@eastlink.ca>
Date2012-04-19 21:35 -0300
Message-ID<kb2kr.4731$DB1.1901@newsfe03.iad>
In reply to#13664
On 12-04-19 08:27 PM, Nasser M. Abbasi wrote:
> According to
> 
> "To Java SE 8, and Beyond! Simon Ritter Technology Evangelist, Oracle"
> 
> (Google the string "To Java SE 8 and Beyond!" and click on
> the PDF file, about the 5th link down the page)
> 
> On page 42, it says:
> 
>    "Unified type system (JDK 10+)
>     No more primitives, make everything objects"
> 
> I've seen very little discussion on this very important
> subject.
> 
> What do the experts here think of the idea?
> 
> For me, and I am no expert, I think it will be good to have
> a consistent type model (everything is an object), but I am
> worried that the performance will take a hit (computational finite
> elements methods, large meshes, etc...), unless PC's and computers
> will become 1000 times faster by the time JDK 10+ comes in few years
> from now, which might be possible.
> 
> Any one knows more information about this item?
> Any truth to it? Do you think it will really happen?
> 
> --Nasser

I think the main idea is a good one. I'd like everything to be an object.

I trust that the language experts can work out the details of optimizing
arrays of objects. I wouldn't restrict it merely to arrays of
single-primitive-value-holder (SPVO) type of objects, but also arrays of
objects that would provably reduce to being composites of such SPVO
objects (this could be recursive); anything in other words where a
sizeof() type of operation would be the same for every object in an array.

I'm not so sure that I'd want to see an actual struct versus reference
distinction as we have in C#. I'd like to think that the objects of a
given class could be situationally value or reference types, not always
be one or the other. Again, it might boil down to the compiler checking
the array type to see if it can be so optimized.

All literals would now be objects, so there'd be common sense syntax
changes there. In terms of my hypothetical scheme there'd also be
questions related to mutable types.

In the final analysis, if the language people can't work out something
acceptable then they are not trying very hard. This is the teens of the
21st century after all.

On a related note I'd like to see some thought put into null. If we go
over to all objects, I'd like to see that uninitialized variables of a
"value" type get the sensible default, not null. So

Integer ints[] = new Integer[10];

would be 10 objects of a value type Integer(0).

AHS
-- 
A fly was very close to being called a "land," cause that's what they do
half the time.
-- Mitch Hedberg

[toc] | [prev] | [next] | [standalone]


#13672

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-04-19 21:31 -0400
Message-ID<4f90bc6b$0$289$14726298@news.sunsite.dk>
In reply to#13668
On 4/19/2012 8:35 PM, Arved Sandstrom wrote:
> On 12-04-19 08:27 PM, Nasser M. Abbasi wrote:
>> According to
>>
>> "To Java SE 8, and Beyond! Simon Ritter Technology Evangelist, Oracle"
>>
>> (Google the string "To Java SE 8 and Beyond!" and click on
>> the PDF file, about the 5th link down the page)
>>
>> On page 42, it says:
>>
>>     "Unified type system (JDK 10+)
>>      No more primitives, make everything objects"
>>
>> I've seen very little discussion on this very important
>> subject.
>>
>> What do the experts here think of the idea?
>>
>> For me, and I am no expert, I think it will be good to have
>> a consistent type model (everything is an object), but I am
>> worried that the performance will take a hit (computational finite
>> elements methods, large meshes, etc...), unless PC's and computers
>> will become 1000 times faster by the time JDK 10+ comes in few years
>> from now, which might be possible.
>>
>> Any one knows more information about this item?
>> Any truth to it? Do you think it will really happen?
>
> I think the main idea is a good one. I'd like everything to be an object.

It is obviously a good idea.

I just don't think it will be that important.

> I'm not so sure that I'd want to see an actual struct versus reference
> distinction as we have in C#. I'd like to think that the objects of a
> given class could be situationally value or reference types, not always
> be one or the other. Again, it might boil down to the compiler checking
> the array type to see if it can be so optimized.

They do mention the term "struct", so ...

> All literals would now be objects, so there'd be common sense syntax
> changes there. In terms of my hypothetical scheme there'd also be
> questions related to mutable types.
>
> In the final analysis, if the language people can't work out something
> acceptable then they are not trying very hard. This is the teens of the
> 21st century after all.
>
> On a related note I'd like to see some thought put into null. If we go
> over to all objects, I'd like to see that uninitialized variables of a
> "value" type get the sensible default, not null. So
>
> Integer ints[] = new Integer[10];
>
> would be 10 objects of a value type Integer(0).

I would expect "backwards compatibility" to be a concept
frequently mentioned in the design discussions.

:-)

Arne

[toc] | [prev] | [next] | [standalone]


#13674

FromLew <lewbloch@gmail.com>
Date2012-04-19 19:22 -0700
Message-ID<31946709.2630.1334888553396.JavaMail.geo-discussion-forums@pbcsy1>
In reply to#13668
Arved Sandstrom wrote:
> This is the teens of the 21st century after all.

Quibble: Not until next year.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#13679

FromPeter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com>
Date2012-04-19 23:15 -0700
Message-ID<1kjq7upn72ead.dnfbqpmw22at$.dlg@40tude.net>
In reply to#13674
On Thu, 19 Apr 2012 19:22:33 -0700 (PDT), Lew wrote:

> Arved Sandstrom wrote:
>> This is the teens of the 21st century after all.
> 
> Quibble: Not until next year.

Yeah, but you have to take into account the kind of people who insisted
that the new millennium started on Jan 1, 2000.  :)  The concept of "teens"
may be more, um...flexible to some people than to others.

(For the record, I'm with you, but I hardly ever try to explain this sort
of mistake to people who make them any more :) )

[toc] | [prev] | [next] | [standalone]


#13693

FromBGB <cr88192@hotmail.com>
Date2012-04-20 07:45 -0700
Message-ID<jmrstt$6nd$1@news.albasani.net>
In reply to#13679
On 4/19/2012 11:15 PM, Peter Duniho wrote:
> On Thu, 19 Apr 2012 19:22:33 -0700 (PDT), Lew wrote:
>
>> Arved Sandstrom wrote:
>>> This is the teens of the 21st century after all.
>>
>> Quibble: Not until next year.
>
> Yeah, but you have to take into account the kind of people who insisted
> that the new millennium started on Jan 1, 2000.  :)  The concept of "teens"
> may be more, um...flexible to some people than to others.
>
> (For the record, I'm with you, but I hardly ever try to explain this sort
> of mistake to people who make them any more :) )

I think for many, "teens" starts at 10 (rather than 13), so 2010-2019 
would be the "teens" of the new millennium.

nevermind, many people apparently believe that the world will end in a 
few months from now.


as for the topic:
I just kind of find it funny, I express some annoyances with the JVM:
lack of value types, awkward FFI, ...
people then make a fuss about it, counter-arguing (unnecessary, wouldn't 
help, ...).

Oracle then goes stating plans to go work on it.

even more funny would be if they added extensions for pointers and RAII 
and similar, but this seems less likely.


it was not stated what sort of FFI design Oracle is considering.


in my own VM/language, I did like this (a boilerplate-free FFI), and 
used an HLL-level interface for importing roughly like:

native import C.stdio;	//import C's "stdio.h"

actually, it doesn't directly import the header (the actual mechanism is 
more convoluted, as it aliases the header-name to a target-specific 
library-name, and imports the library instead, and the contents of the 
"headers" are aliases to a DB keyed with the same name as the library).

(say, "C.stdio" maps to "msvcrt.dll", and loads the "msvcrt_meta" DB).

the "C." prefix basically indicates the intended target language (of 
which, C is the currently only supported option).


exporting works more like:
native package C.foo
{
	struct SomeStruct
	{
		...
	}

	...

	function somefunc(x:int):void	//takes int, returns void
	{
		...
	}

	//takes C-string, returns struct pointer
	function somefunc(str:cstring):*SomeStruct
	{
		...
	}

	...
}

with anything declared within the package being exported to C land, and 
expected to conform to C-friendly rules (the language also has pointers, 
for sake of easing C interfacing, which have a syntax like "x:*void;"). 
pardon the strange syntax.

the mechanism in this case currently involves using a tool which spits 
out headers and C-based glue-code though (which are then compiled and 
linked with native code), as I do not yet know of a clearly better 
option here (C lacks late-binding...).


a Java analogue could be, say:
public native class Foo
{
	...
	public static void somefunc(int x)
	{
		...
	}
}

with any static methods within the class being exported as native C or 
C++ functions or similar.

maybe also doing direct cross-language class-to-class mappings, like in 
GCJ (where class-members can be identity-mapped across the language 
boundary).


or such...

[toc] | [prev] | [next] | [standalone]


#13700

FromLew <noone@lewscanon.com>
Date2012-04-20 08:20 -0700
Message-ID<jmrur8$a93$1@news.albasani.net>
In reply to#13693
BGB wrote:
> I think for many, "teens" starts at 10 (rather than 13), so 2010-2019 would be
> the "teens" of the new millennium.

If many thought the world were flat, would that make them right?

No.

"Ten". "Eleven". "Twelve". "Thir_*teen*_". "Four_*teen*_". "Fif_*teen*_". ...

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

[toc] | [prev] | [next] | [standalone]


#13732

FromBGB <cr88192@hotmail.com>
Date2012-04-20 19:57 -0700
Message-ID<jmt7r4$ip3$1@news.albasani.net>
In reply to#13700
On 4/20/2012 8:20 AM, Lew wrote:
> BGB wrote:
>> I think for many, "teens" starts at 10 (rather than 13), so 2010-2019
>> would be
>> the "teens" of the new millennium.
>
> If many thought the world were flat, would that make them right?
>
> No.
>
> "Ten". "Eleven". "Twelve". "Thir_*teen*_". "Four_*teen*_".
> "Fif_*teen*_". ...
>

I was aware of this, hence why 13 was mentioned in contrast.
"many" need not be the majority though, nor necessarily correct, only "a 
sizeable minority".

much like saying "many people use Linux", despite most people using 
Windows...


there are similar things prone to vary, such as:
how many is "a couple"? "a few"? or "a handful"? (*1)
is "a dozen" necessarily 12? (rather then 10, 13, or 14)
...


*1: yes, there are people who use these terms and expect a certain 
number. it leads to frustration, personally, as I think of most of these 
as "something greater than 1", whereas I know of someone who thinks: 
"couple"=3, "few"=4, and "handful"=5.

[toc] | [prev] | [next] | [standalone]


#13739

FromLew <noone@lewscanon.com>
Date2012-04-21 04:25 -0700
Message-ID<jmu5fb$b5c$1@news.albasani.net>
In reply to#13732
n 04/20/2012 07:57 PM, BGB wrote:
> On 4/20/2012 8:20 AM, Lew wrote:
>> BGB wrote:
>>> I think for many, "teens" starts at 10 (rather than 13), so 2010-2019
>>> would be
>>> the "teens" of the new millennium.
>>
>> If many thought the world were flat, would that make them right?
>>
>> No.
>>
>> "Ten". "Eleven". "Twelve". "Thir_*teen*_". "Four_*teen*_".
>> "Fif_*teen*_". ...
>>
>
> I was aware of this, hence why 13 was mentioned in contrast.
> "many" need not be the majority though, nor necessarily correct, only "a
> sizeable minority".

How sizeable is this sadly mistaken minority?

If they all thought the world were flat, would that make them correct?

> much like saying "many people use Linux", despite most people using Windows...

Nothing like that at all. We're talking about what "teens" actually means, not 
how many people use it wrongly. This is not a subjective matter.

> there are similar things prone to vary, such as:
> how many is "a couple"? "a few"? or "a handful"? (*1)
> is "a dozen" necessarily 12? (rather then 10, 13, or 14)

Nothing remotely similar. The "teens" definition is precise, the "few" 
definition is not.

A dozen is necessarily 12.

Duh.

You're all over the map on this one.

> ...
>
>
> *1: yes, there are people who use these terms and expect a certain number. it
> leads to frustration, personally, as I think of most of these as "something
> greater than 1", whereas I know of someone who thinks: "couple"=3, "few"=4,
> and "handful"=5.
>

Imprecise words like "few" or "couple" in that sense (most senses of "couple" 
are "two", but there is one sense of "near two") are deliberately vague and 
subject to interpretation. Precise words, like "teens"

"teens   [teenz]  Show IPA
plural noun
the numbers 13 through 19, especially in a progression, as the 13th through 
the 19th years of a lifetime or of a given or implied century."
<http://dictionary.reference.com/browse/teens>

or "dozen"
<http://dictionary.reference.com/browse/dozen>

are not so subject to interpretation.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

[toc] | [prev] | [next] | [standalone]


#13743

FromLeif Roar Moldskred <leifm@dimnakorr.com>
Date2012-04-21 07:05 -0500
Message-ID<Z4KdnZTrCdIWPw_SnZ2dnUVZ8vCdnZ2d@giganews.com>
In reply to#13739
Lew <noone@lewscanon.com> wrote:
> 
> How sizeable is this sadly mistaken minority?
> 
> If they all thought the world were flat, would that make them correct?

Language isn't defined by an objective physical reality, though, but
by usage -- which is why "awful" and "awesome" today have opposite
meanings.
 
-- 
Leif Roar Moldskred

[toc] | [prev] | [next] | [standalone]


Page 1 of 4  [1] 2 3 4  Next page →

Back to top | Article view | comp.lang.java.programmer


csiph-web