1. -2

  2. 23

    if you are currently writing native code (Obj-C, C#, Swift, Java, C++)

    First time I heard that Java falls into the “native code” category.

    1. 2

      There are processors that can run Java bytecode natively.

      1. 9

        Perhaps, but despite that, Java still isn’t a “native” language.

        The longer it goes on, neither is C# really.

        1. 5

          The JVM can also compile down sections of bytecode to native objects. That still doesn’t make the language more native then… say… JavaScript/V8.

      2. 13

        This article is bad for you.

        At the risk of creating yet-another harmful “Considered Harmful” blog post, it’s recently become more and more apparent to me that writing native code, on any platform, is a bad idea in the long run.

        Performance still matters a lot to a lot of people, without even considering JavaScript’s dubious language design choices JavaScript has come a lonng way but it still has a long way yet to go. I wouldn’t throw the baby out with the bathwater just yet, he’s still swimming.

        1. 8

          Performance should matter to far more people than it actually does. We seem to be experiencing a blessed recess from Wirth’s Law at the moment (probably corresponding to the less-blessed lull in Moore’s Law), but even though I carry around in my pocket more computing power than existed in the entire world thirty years ago, it still can’t render a webpage without lagging and stuttering.

          1. 2

            Revealed preferences though. Plenty of people complain about the bloat of some sites. Very few avoid visiting such sites.

            1. 1

              And even if the app crashes completely, it looks like sometimes people don’t/can’t go elsewhere:

              “Facebook may have even gone so far as to test Android users' dependence on its app. Reportedly, it knowingly introduced crashing glitches to see whether or not people would abandon Facebook if they couldn’t use its native app on Google’s platform. It doesn’t have anything to worry about, according to the findings – users would rather stick to the mobile website than lose contact with their online friends.”


              1. 2

                That’s because they literally can’t, there are no comparable products to facebook. Where else can you go where all your friends are already there.

        2. 10

          The most well known of these are NativeScript and React Native.

          Hmm, I’ve not heard much about NativeScript. This statement didn’t make sense to me until I realized NativeScript is telerik’s own product. So this whole article is just a marketing pitch I guess.

          1. 6

            So two technology stacks jump out at fitting what the author seems to want, Java and Flash. Flash has reached the end of its useful life but Java is still going strong. ReadyTalk’s Avian provides us a way to run Java on IOS and from my experiences it works rather well.

            I feel that a lot of the pro JavaScript for everything stuff that’s been coming out is a bit misguided. I’m never going to give up what native code lets me do and no high level vm language will ever be able to change that. In my mind every language is a tool. I’m going to pick and choose the “best” for whatever task I have and I feel that anyone who doesn’t have that mindset is limiting themselves as a programmer.

            1. 6

              I’m sorry, but C++ runs on everything, and no, the web is not a machine. If a web browser runs on it, your C++ program will. And native C++ code has magical properties that the web ecosystem tends to ignore, for example, letting users decide which version of the software to run.

              “Having to install something will create a barrier for people to use your program” is a bad excuse not to write software we need.

              The web was NOT designed by geniuses as far as I can tell.

              1. 10

                I’m not going to be bullied by JavaScript, which certainly isn’t a world-class application language. Nor is typescript. I see no reason to settle for anything but the best language (Scala) to write my applications in, and I have enough faith that we’ll figure out how to run it on any important platform sooner or later.

                  1. 1

                    That’s one of the things I was thinking of when I said “we’ll figure out how to run it on any important platform sooner or later”.

                1. 3

                  What does “Native Code” mean?

                  I opened this with the expectation that it would be a discussion of embedding platform/compiler/CPU specific code in your program, such as what C/C++ let you do. I’ve definitely been bitten by instances where a specific check or expression relied on some quirk or feature of a CPU and silently failed in a weird way when the code was moved to a different platform.

                  What the author writes makes very little sense to me. But I’m not very knowledgable about system architectures and nomenclature.

                  1. 2

                    The naive perspective here is the right one: The article takes for granted that there’s a clear and obvious meaning. There’s not. Higher-voted comments are discussing systems that do JIT or in-advance compilation to convert virtual machines and interpreters into machine code; that really blurs the line quite a lot, and has become quite advanced.

                    I’d suggest that a reasonable meaning would be programming in a style or language or mix of languages, such that you get better performance by taking advantage of the platform’s specific capabilities. That might or might not involve directly writing assembly (even just worrying about struct alignment and cache page sizes is a form of platform integration). But honestly there are too many possible meanings there, and anyone trying to talk about that should be very specific.

                    Of course, to some people the distinction is simply the web vs everything else… which is also oversimplified. Integrating with facilities specific to the operating system, especially GUIs, is the main advantage to leaving the web. But that’s a totally different topic and I’d hope it would be called something else…

                  2. 3

                    Snakeoil vendor advises larger doses of snakeoil: film at 11.

                    Nonsense like this is ignorable, but the larger trend, of a move to a terrible language and environment, in the face of technically superior options, looks awfully familiar to me. If my options are ever writing JavaScript, or not writing software, well.

                    1. 2

                      No. Just No.

                      1. 1

                        By what definition of “native” can Java be native, while JavaScript is not?