Announcement

Collapse
No announcement yet.

D Language Support Cleared For Being Added To GCC

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

  • #21
    Originally posted by peppercats View Post

    except for the whole part where programmers are paid a premium and rust is terrible for productivity I guess
    What's this claim based on? Don't confuse the learning phase of Rust with productivity thereafter.

    FWIW, I program in Rust (and C++) and I don't believe that claim to be true after the initial learning period.

    Comment


    • #22
      Originally posted by kaprikawn View Post
      What does D bring to the table, I've never looked at it? It seems to me that C/C++ have maturity, support and ubiquity. The cool kids seem to be going for Rust. Is this a correct assessment? Not that I object it being added to GCC.
      What D gives you is a lot of modelling power, particularly at compile time and for meta-programming. It typically takes fewer lines of code to do things in D and the result tends to be more readable. D generates native code that is binary compatible with C (you can have D code and C code in the same executable without creating bindings).

      Compared to C it adds quite a few modern features that still result in efficient binaries there is a compiler switch betterC that restricts the language to these. D tends to be more ergonomic, for instance D has the concept of a slice which is roughly analogous to
      Code:
      struct { void * ptr; size_t length; }
      which allows you to pass a reference to an array in a function without having to pass length as a separate parameter (this is error prone). You can do this in C but it in D it's pretty much ubiquitous.

      Compared to C++, D is a much easier language to become competent in without losing modelling power. One area where D is significantly easier to use is that of meta-programming. D is designed for efficient compilation (though there are still some issues with really large projects). One area that I think D is a big improvement is having strings as a language level primitive (in D they are slices) which means strings tend to be the same no matter what libraries you are using. Also their design tends to lead to significantly more compact code and less memory allocations (especially compared to the C way of doing strings). One personal bugbear in C++ for me is that encapsulation in C++ is tied to using classes which forces you to use classes even for designs where they aren't necessarily the best choice. D does encapsulation at the file level which I much prefer.

      Compared to Rust. Rust is really good for low level projects with expert coders. With rust it's easy to strip the runtime back to only pay for what you need. Rust has a proven memory safety model but one that is quite difficult to use, D is taking a different route to memory safety which we have yet to see how well it works. D gives you more modelling power and generally more compact and easier to read code. Also it takes less work to be competent in D than Rust something to keep in mind if you have a team of programmers with mixed ability.

      Comment


      • #23
        Originally posted by Pajn View Post

        Today D is mostly a failed language. It intended to be a more modern and safer C++ but it never took of and the time went on. Today we have Rust which is more popular, goes further on memory safety and features a very well designed standard library with many modern features and no cost abstractions. D should have started to get big traction ten years ago if it ever were to go somewhere.
        D's popularity has been growing in recent years (enough to cause growing pains inside the D community) but it is not growing as fast as rust. Ironically a big part of this lack of smoothness is that most of the core developers work on Linux and the Windows experience is not as polished as it could be.

        Originally posted by Pajn View Post
        I guess GCC's interest in it mostly is to have some modern language to combat with LLVM which is what Rust is using.
        As far as I can tell rust has both GCC and LLVM frontends with the LLVM one being the main one. With D, DMD is the reference compiler and there are frontends for both GCC and LLVM. The reason GDC is becoming officially part of the collection is because the maintainer of GDC want's it upstream and was willing to do the level of work required to make it acceptable to the GCC maintainers. Where this will most likely make a difference is in keeping GDC in sync with the latest DMD release and platforms for which licensing matters, mostly for people creating linux applications.

        Comment


        • #24
          Originally posted by atomsymbol
          On the other hand, Pascal is an older language. It has history, for example its wide use in university and school education, which might be contributing to its position in the Tiobe index.
          Pascal is also the base of some industrial automation languages, it is basically the "structured text" PLC programming language.

          Comment


          • #25
            Originally posted by kayosiii View Post
            As far as I can tell rust has both GCC and LLVM frontends with the LLVM one being the main one.
            If the GCC frontend you're referring to is the one I know about, that was very incomplete even at the time, and is now beyond obsolete relative to the language.

            Comment


            • #26
              Originally posted by starshipeleven View Post
              Pascal is also the base of some industrial automation languages, it is basically the "structured text" PLC programming language.
              On that note and pulling back to D I found this an interesting talk
              Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.

              Comment


              • #27
                Originally posted by mulenmar View Post

                If the GCC frontend you're referring to is the one I know about, that was very incomplete even at the time, and is now beyond obsolete relative to the language.
                Fair enough. There was a time when GDC was like that - now it tends to be a few months between DMD (the reference compiler) compiles much lower but generally produces faster binaries. Having GDC much closer to DMD (the likely result of this) this will help Linux Distros that want to package binary D applications.

                Comment


                • #28
                  Originally posted by pkphilip View Post

                  There are actually quite a few projects written in object pascal - see below:

                  Lazarus gallery - http://wiki.freepascal.org/Lazarus_Application_Gallery
                  From Quora - https://www.quora.com/What-are-some-...tten-in-Pascal
                  Please take no offense, but any language community could come up with such lists. It's just another bad metric, a random list. It could have more value if it was a list of Pascal applications included in some Linux distribution or some other relevant medium. A friend developed his own language, his the sole author of languages written in that language and yet there are over 15 apps built using that language. Does it already make it relevant? BTW, look here - ever heard of Ring? According to Wikipedia [1], it's a 'historically important programming language'. I mean come on, anyone can make these lists. It won't change the facts.

                  [1] https://en.wikipedia.org/wiki/Timeli...anguages#2010s

                  Comment


                  • #29
                    Originally posted by atomsymbol

                    On the other hand, Pascal is an older language. It has history, for example its wide use in university and school education, which might be contributing to its position in the Tiobe index.
                    So what does that tell about TIOBE? Apparently it's a biased list. Is it really a useful metric? What if I asked a signifant number of colleges about their programming 101 languages. My guess is, Java, C, C++, C#, and Python are used in over 90% of the colleges world wide. Pascal.. maybe < 1%. You can see the decline in many fronts. GNU abandoning GNU Pascal, Borland not selling Delphi products anymore, FreePascal having really hard time getting significant updates. It doesn't even use a standard compiler platform (GCC/LLVM/JVM/Mono).

                    Comment


                    • #30
                      Originally posted by caligula View Post

                      If I understand things correctly, D "invented" some "new" things the D committee and comp.lang.c++.moderated usenet forums were already widely familiar with such as template metaprogramming, concepts, ranges etc. With C++, there weas the issue with backwards compatibility, both syntactically and also a wide range of commercial compilers and legacy code, D could just copy the recently discussed ideas and come up with new ad-hoc syntax. It looks like C++ has now gained most of the template and lambda magic which makes D tick. Makes me wonder, is it worth switching to D anymore?
                      C++ has some of the most atrocious parser rules I know of. C is partially the problem. D was popular at a time when people wanted a C++ that wasn't garbage from a grammar point of view and wasn't constantly having to work rules around it. For instance... Templates are simple from a grammar point of view in D. Templates in C++ are liable to cause some who has to implement that shit to call a suicide hotline. Until D forced garbage collection, I thought it was the language of the future.

                      Comment

                      Working...
                      X