Announcement

Collapse
No announcement yet.

Why Sony Is Using LLVM/Clang On The PlayStation 4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by DanLamb View Post
    llvm/clang is a fine choice for C++... the big question is why on earth would they stick with the atrocious Microsoft ecosystem C++ toolset?!?

    - Many programmers really think that Visual Studio is the best, because they've never understood competing tool chains. When they try to use something else, it just seems like a broken version of Visual Studio to them.
    - Microsoft Visual Studio requires Microsoft Windows. One major flaw of Windows is that the shell is terrible. You can install a port of bash, but it doesn't work as well as using a real *nix OS. *nix (including Mac OS) is much better for any command line centric development work.
    - Try using an elegant command line build tool, like SBT (www.scala-sbt.org) or Gradle or Ruby Rake. Once you get proficient, you won't want to go back to using IDE-proprietary auto-generated build files like Visual Studio does.

    And, honestly, use a nicer programming language like Haskell or Scala or Rust and you won't want to use C++.
    No one wants to go back to the command line; what part of that do you guys not understand?

    Visual Studio has the best debugging toolchain on the planet, while providing a faster executable then GCC (http://www.behardware.com/articles/8...itectures.html)

    Secondly, for performance, C/C++ is still the right language to go to when you need to interact with hardware.

    Comment


    • #32
      Originally posted by JS987 View Post
      I found C++ to be best language because it is statically-typed language with Java-like syntax which can be compiled into native executables which means excellent performance and low memory usage.
      It has some defects e.g. header files which are necessary because of backward compatibility with C libraries.
      In ideal world, all C code would be rewritten into C++ like language with removed backward compatibility with C.
      Haskell, Scala and Rust don't have e.g. Java-like syntax.
      Ummm...Java used C style syntax, not the other way around.

      Header files aren't there simply because they are needed for backward compatibility reasons; they serve a purpose.

      C/C++ are two totally different languages at heart; C is a replacement for assembly, where C++ is a bonafide high-level programming language.

      Comment


      • #33
        Edit doubler post

        Comment


        • #34
          Originally posted by mrugiero View Post
          Yeah, in C++, you don't have to use the C style arrays anymore, you can use std:array. No one does though...Its the mixing of C and C++ code that gets people in trouble.

          And I consider Java (and descendants) unusable for any high performance program due to the lack of ability to set an individuals thread mask without invoking native libraries, which is idiotic (due especially to HTT on Intel CPUs).

          Comment


          • #35
            Originally posted by mrugiero View Post
            AFAIK, even a "Hello World" program with command line arguments has to use classic arrays in C++/C#/Java. Everyone has to learn that. Classic arrays are deeply entrenched in the cultures of those languages. std::array exists in C++, it's there, but practically, it's completely obscure, and most code bases and APIs use classic arrays extensively.

            Classic arrays also muddy the language syntax. Scala is free to use square brackets for type parameters "Map[Int,Int]" and has more leeway in using angle brackets for other purposes.

            Comment


            • #36
              Originally posted by gamerk2 View Post
              No one wants to go back to the command line; what part of that do you guys not understand?
              I understand that some people insist on GUI-centric everything and view command line interfaces as crusty legacy junk. There are plenty who feel quite passionately the other way and prefer the precision and elegance of text and command line interfaces and REPL interfaces over GUIs and drag-and-drop and WYSIWYG. Linux types are almost always of the second mindset.

              In the early days of the web, a lot of people insisted on WYSIWYG HTML authoring toolsets that hid the HTML from you. Today's web programmers generally think that was a bad idea.

              Comment


              • #37
                Originally posted by gamerk2 View Post
                And I consider Java (and descendants) unusable for any high performance program due to the lack of ability to set an individuals thread mask without invoking native libraries, which is idiotic (due especially to HTT on Intel CPUs).
                Given how common it is to see Java and C# and Scala used in extremely high performance sensitive systems, this statement is ridiculous.

                I'm sure for certain niche scenarios, specifically game console programming, it's necessary to specify which CPU code runs on. And if people needed to do that, they could make an API for that in Java. There's nothing at the language level that prohibits that. For server-side software, or even desktop software, that is generally not an important feature.

                Comment


                • #38
                  Originally posted by gamerk2 View Post
                  And I consider Java (and descendants) unusable for any high performance program due to the lack of ability to set an individuals thread mask without invoking native libraries, which is idiotic (due especially to HTT on Intel CPUs).
                  It is obvious that you have no idea what you are talking about.

                  In case anyone ever takes you seriously, C# supports processor affinity (what you call "thread mask") out of the box:
                  Code:
                  Process.GetCurrentProcess().ProcessorAffinity &= 0x000F; // use only first 4 processors
                  Thread.CurrentThread.ProcessorAffinity &= 0x0002; // use only second processor
                  No need to invoke native code.

                  Comment


                  • #39
                    Originally posted by BlackStar View Post
                    It is obvious that you have no idea what you are talking about.

                    In case anyone ever takes you seriously, C# supports processor affinity (what you call "thread mask") out of the box:
                    Code:
                    Process.GetCurrentProcess().ProcessorAffinity &= 0x000F; // use only first 4 processors
                    Thread.CurrentThread.ProcessorAffinity &= 0x0002; // use only second processor
                    No need to invoke native code.
                    A quick search reveals many libraries that let you do this on Java as well. Ultimately, everything calls down to native code eventually.

                    Comment


                    • #40
                      Originally posted by gamerk2 View Post
                      Header files aren't there simply because they are needed for backward compatibility reasons; they serve a purpose.
                      Every backward compatible feature generally has a purpose, but it is one that would be done a better way if not for legacy reasons. If header files were a good idea, other languages would use them. The fact that other languages universally do not should tell you something. C++ programmers generally agree that header files are not an ideal design.

                      Comment

                      Working...
                      X