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


Groups > comp.lang.java.programmer > #14021

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

From Tsukino Usagi <usagi@tsukino.ca>
Newsgroups comp.lang.java.programmer
Subject Re: no more primitive data types in Java (JDK 10+). What do you think?
Date 2012-04-29 23:03 +0900
Organization Moon Kingdom
Message-ID <jnjhn8$18v$1@dont-email.me> (permalink)
References (2 earlier) <qun869-glb.ln1@bernd.nawothnig.dialin.t-online.de> <13i3p7dn5bqlmu9t1l83faour5sq016pu0@4ax.com> <p77a69-va4.ln1@bernd.nawothnig.dialin.t-online.de> <tu3bp7l4pfdl5g879sh1nqtvbdt929pr85@4ax.com> <jn76ne$th7$1@news.albasani.net>

Show all headers | View raw


On 4/25/2012 6:39 AM, BGB wrote:
> On 4/23/2012 10:24 AM, Gene Wirchenko wrote:
>> On Sat, 21 Apr 2012 10:20:41 +0200, Bernd Nawothnig
>> <Bernd.Nawothnig@t-online.de> wrote:
>>
>>> On 2012-04-20, Gene Wirchenko wrote:
>>>>> These implementation details should better be hidden and invisible for
>>>>> most cases. Let the compiler automatically detect and generate
>>>>> possible optimisations.
>>>>
>>>> If you complicate things, the compiler then has to work to
>>>> decomplicate (optimise). Why not just keep it simple?
>>>
>>> My proposal was quite the contrary: simplification of things, i.e.
>>> removal of unnecessary data types by unifications.
>>>
>>> Keep in mind: the compiler is not the programmer!
>>>
>>>>> A programming language should be as simple and orthogonal as possible.
>>>>
>>>> One application of keeping it simple would be to use primitives
>>>> where possible -- since they are simpler than objects -- and only use
>>>> objects where they are needed.
>>>
>>> See above: don't mix up the compiler, the machine, and implementation
>>> details with the programmer. Things should be simple for the
>>> *programmer*, not necessarily for the compiler or the machine, even if
>>> that maybe preferable. But preferable is not necessary ...
>>
>> I am not confusing them, but one does have to consider them all.
>> If a language can not be easily compiled, that creates problems. Even
>> if the compilation is simply slower, that may discourage use of it.
>
> yep...
>
> (pardon any exaggeration... this can be taken purely as personal
> opinion...).
>
>
> programmer considers whether to use C or C++ for something:
> tries compiling code with a C compiler, kind of slow, but livable (well,
> my project rebuilds in about 20 seconds);
> tries compiling code with a C++ compiler, takes a while, programmer
> wanders off, gets coffee, comes back, compiler is still churning
> along... (and maybe continues to take an additional 30 minutes).
>
> programmer concludes, regarding C++: "no... this just isn't worth it...".
>
> OTOH: Java compiles fairly fast...
> (but, admittedly, Java isn't really perfect either).
>
> so, ultimately, the programmer chooses things based on a mixture of what
> they are most comfortable with, and what annoyances they are inclined to
> put up with, ...
>
>
> so:
> the C++ programmer lives with absurdly long build times (and says "but
> at least I have, features!").
>
> the C programmer lives with a world where doing OO stuff/... is
> generally painful, and thinks "what problem is there which can't be
> solved with a little pointer arithmetic?" (maybe followed by using an
> #ifdef to check the CPU type, writing a few bytes into a buffer, and
> then calling it as if it were a function pointer...), and concluding
> "all this OO stuff is nothing really beyond syntax sugar over a few
> structs and function pointers anyways... so why care?...".
>
>
> and the Java programmer lives in a world where writing code in general
> is painful (and then thinks, "well at least I have this giant class
> library, just have to find the relevant SomeClassWhichDoesTaskX",
> nevermind should anyone go through the pain of having to write some
> actual code to do something...). but, it is all good, "for safety!".
>
>
> say:
>
> C:
> void *p;
> long long j;
> int i;
> ...
> i=p; //compiler: warning: I don't like the way this looks, but ok...
> i=j; //compiler: <remains silent>
>
> C++:
> void *p;
> long long j;
> int i;
> ...
> i=p; //compiler: error: you need to cast this crap...
> i=j; //compiler: <remains silent>
>
> Java:
> Void p;
> long j;
> int i;
> ...
> i=j; //compiler: error: OMG WTF!
> ... (error message spanning several lines)
> ... i=j;
> ... (gotta make sure, ^, programer sees this crap)
> ...
>
> so user has to remember to type "i=(int)j;" or they might cut themselves
> on the sharp edges of numeric precision, and meanwhile "i=(int)p;"
> doesn't even come close to working (but, to be fair, there is little in
> the language design to say what the value "should" be, if it were
> in-fact to work).
>
>
> and maybe some of:
>
> C:
> printf("Have you seen this? %f\n", sin(M_PI));
>
> C++:
> cout << "Have you seen this?" << sin(M_PI) << endl;
> ( somewhere in history: "hey, have you seen the spiffy new feature, I
> can make these operators do whatever random crap I want!", someone else:
> "hard-core yeah! using shift for printing! why don't we make this a
> standard feature!" ).
>
> Java:
> System.out.println("Have you seen this? " + Math.sin(Math.PI));
> ("no one will notice...").
>
> well, and:
> C:
> #include <stdio.h>
> int main()
> {
> printf("yay!\n");
> return 0;
> }
>
> C++:
> #include <iostream>
> using namespace std;
> int main()
> {
> cout << "yay!\n" << endl;
> return 0;
> }
>
> Java:
> public class MyClass
> {
> public static void main(String[] args)
> {
> System.out.println("yay!");
> }
> }
>
> just saying is all...
>
>
> (decided to leave out some other examples here, potentially more likely
> to create controversy, which isn't really my intent here).
>
>
> or such...

Whats your point?

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web