Announcement

Collapse
No announcement yet.

GCC 9 Has Been Landing Many Ada Improvements This Week

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

  • #11
    Originally posted by jacob View Post
    It's a pity that Ada never took off within the open source community, especially now that security is everyone's number 1 concern. Of course now we have Rust, which is better in some ways but not quite as good in others.
    I tend to agree with the idea that much better languages than C exist for open source development. We have Ada, D, Rust, Swift, go, and a bunch of others but still can not displace C in the open source world. Even C++ would be a step ahead.

    The problem in part is moving the mind set forward because open source needs to develop better development methods along with a new language. To put it plainly many projects end up as kludges due to submissions taken at random. Instead of designed software we get a melting pot of software. Unfortunately even though the melting pot works with people, it does not work at all with software.

    The one overiding issue with Ada, Rust, Swiift and others is the lack of libraries and interfaces. One of the reasons im very hopeful for Swift is that Apple can create a very large deleoprr base that will solve this problem (at least in the case of Swift). Ada for a long time and probably still was difficukt to use under Linux simply die to the difficukty of getting it to work well with the rest of the system. Libraries for GUI's basic component database interface and so forth didnt exist or if they existed didnt work well. I can hope that thngs are better today but the fact that Ada is so seldom dicussed indicates that it probably isnt.

    Id really would like to see a movement to another language in the Linux world that would displace C/C++ that the community woild ralley around. Instead we get illconcieved moves like using Javascript to try to gloss over C's issues. I look at it this way open source changes or continues to be laughed at over app quality.

    Comment


    • #12
      Originally posted by wizard69 View Post

      I tend to agree with the idea that much better languages than C exist for open source development. We have Ada, D, Rust, Swift, go, and a bunch of others but still can not displace C in the open source world. Even C++ would be a step ahead.

      The problem in part is moving the mind set forward because open source needs to develop better development methods along with a new language. To put it plainly many projects end up as kludges due to submissions taken at random. Instead of designed software we get a melting pot of software. Unfortunately even though the melting pot works with people, it does not work at all with software.
      That's IMO a separate issue and much more a matter of project management than programming language. There are superbly engineered pieces of C code (the Linux kernel, *some* parts of the GNOME stack etc.) and there are kludgey abominations in C or any other language (ahem - GNOME Shell - ahem, Compiz / Unity, VUA init systems etc). Incidentally this is not specific to open source at all, in fact on the whole open source is probably better than closed source which is driven purely by speed-to-market and where code quality issues are invariably pushed to be fixed "later" (= never).

      But my point was about languages and their properties. Go, D and Swift are great at what they do and each of them is a huge improvement over C, but they are designed for ease of use, productivity etc., not robustness, safety and security. In that area, there is Ada, Rust and not much else (in the mainstream, at least).

      Originally posted by wizard69 View Post
      The one overiding issue with Ada, Rust, Swiift and others is the lack of libraries and interfaces. One of the reasons im very hopeful for Swift is that Apple can create a very large deleoprr base that will solve this problem (at least in the case of Swift). Ada for a long time and probably still was difficukt to use under Linux simply die to the difficukty of getting it to work well with the rest of the system. Libraries for GUI's basic component database interface and so forth didnt exist or if they existed didnt work well. I can hope that thngs are better today but the fact that Ada is so seldom dicussed indicates that it probably isnt.
      It looks like Swift is a non-starter in the FOSS world and will hardly ever be used outside of the Apple platform (the same way Objective C is). It's a pity, because it really is a nice language for what it's intended to do. But again, it doesn't compete against Ada or Rust. Apples, oranges and all that.

      What you say about library and API support is generally true, but Rust is already there today. It's ecosystem is really amazing and it has comprehensive support for graphics, with everything from Vulkan to Cairo and GTK with high quality, Rust-idiomatic APIs. It has top-notch, boilerplate free support for DBUS, where writing a client or a server in Rust is basically as easy as in Python. It has high quality network service and web service frameworks. It has complete coverage of POSIX, lower level Linux system calls and you can even write Linux kernel modules in it. And it not just allows, but enforces memory safety, type safety and thread safety from the start. But as good as it is, Ada has some really great features that Rust doesn't and may never have:

      - range types (e.g. integers from 10 to 15, with automatic runtime checking)
      - generic modules
      - available static and dynamic code analysis tools

      Originally posted by wizard69 View Post
      Id really would like to see a movement to another language in the Linux world that would displace C/C++ that the community woild ralley around. Instead we get illconcieved moves like using Javascript to try to gloss over C's issues. I look at it this way open source changes or continues to be laughed at over app quality.
      Well of course Javascript makes C look good in comparison :-/.

      Comment


      • #13
        Originally posted by pegasus View Post
        Not really. If you properly design and construct your software
        There's your first problem. :P

        Comment


        • #14
          Originally posted by jacob View Post

          What you say about library and API support is generally true, but Rust is already there today. It's ecosystem is really amazing and it has comprehensive support for graphics, with everything from Vulkan to Cairo and GTK with high quality, Rust-idiomatic APIs. It has top-notch, boilerplate free support for DBUS, where writing a client or a server in Rust is
          Unforunately, creating bindings in Ada can be either quick n hacky, i.e. thin, or slow but better quality, i.e. thick. We're also lacking support for a lot UI stuff

          Originally posted by jacob View Post
          basically as easy as in Python. It has high quality network service and web service frameworks. It has complete coverage of POSIX, lower level Linux system calls and you can even write Linux kernel modules in it. And it not just allows, but enforces memory safety, type safety and thread safety from the start. But as good as it is, Ada has some really great features that Rust doesn't and may never have:
          There is a web page somewhere on the webz about creating Linux kernel modules in Ada95.

          Originally posted by jacob View Post
          - range types (e.g. integers from 10 to 15, with automatic runtime checking)
          Ranges from any value, e.g. -10 .. 20, or enums, e.g. Black .. Red, and they can be used as array bounds.

          Comment


          • #15
            Originally posted by Lucretia View Post

            Unforunately, creating bindings in Ada can be either quick n hacky, i.e. thin, or slow but better quality, i.e. thick. We're also lacking support for a lot UI stuff
            But it also doesn't have to be an all-or-nothing approach. You could write security-critical code (such as an Internet-exposed service, an authentication mechanism, a parser etc.) in Ada, and you could build the GUI in something like Python where it's painless.

            But here you run into one of Ada's problems, besides the fact that for a long time compilers were expensive and hard to obtain, which is that it's not really binding friendly. That is you generally can't easily write code in Ada that would be called into from other languages, whether it's C or higher-level languages like Python or Ruby, and make it developer-friendly. This is one of the things where Rust shines as Mozilla designed it with C interoperability in mind, in both ways, from the start.

            Comment


            • #16
              Originally posted by pegasus View Post
              Not really. If you properly design and construct your software, much of the testing that is done today is not needed anymore. So while development phase might be longer, testing phase is usually much shorter. And much less fixing is needed on the long run.
              You have any experience with modern software development outside of critical systems?

              You throw stuff out fast and then stop supporting it just as fast. Most bugs are either denied, ignored or their reporters silenced with NDAs so you can't get dogpiled with multiple lawsuits. Those paying you will rarely want to pay the full price anyway and will almost always don't think you really need the time and money you are asking, they will usually think you are incompetent or a ripoff. And will do all they can to delay payments or pay you less than what they agreed in the contract.

              If you do a decent job the costs and time of development rise much higher than what they are now.

              Comment


              • #17
                Originally posted by jacob View Post

                But it also doesn't have to be an all-or-nothing approach. You could write security-critical code (such as an Internet-exposed service, an authentication mechanism, a parser etc.) in Ada, and you could build the GUI in something like Python where it's painless.

                But here you run into one of Ada's problems, besides the fact that for a long time compilers were expensive and hard to obtain, which is that it's not really binding friendly. That is you generally can't easily write code in Ada that would be called into from other languages, whether it's C or higher-level languages like Python or Ruby, and make it developer-friendly. This is one of the things where Rust shines as Mozilla designed it with C interoperability in mind, in both ways, from the start.
                Ada has C, Fortran and COBOL interfacing from the start.

                I'm saying that it's just that's nicer to have a thick binding, it's just that it can take a very long time to do it by hand.

                Also, there is a Fltk binding now.

                Comment


                • #18
                  Originally posted by Lucretia View Post

                  Ada has C, Fortran and COBOL interfacing from the start.

                  I'm saying that it's just that's nicer to have a thick binding, it's just that it can take a very long time to do it by hand.

                  Also, there is a Fltk binding now.
                  Ada can call C, Fortran and COBOL code for sure, but can you compile a .so in Ada and use it in anything that expects a .so written in C (as in link C against it, call into it from Python through CFFI, use it as a plugin for apps that expect C plugins, etc.) without changing the client app, in fact without even noticing that it's actually Ada and not C? I don't know Ada sufficiently for that, but from what I remember it needs some kind of runtime system and it also has its own rather peculiar memory management. So while it's presumably possible to write a C program that will call into Ada code, the question is whether Ada can be used as a drop-in replacement for C, which Rust does?

                  NB: I'm not saying Rust is better than Ada. I find it better in some ways and worse in others. But I admire the way it "just works" within the ecosystem.

                  Comment


                  • #19
                    Originally posted by jacob View Post

                    Ada can call C, Fortran and COBOL code for sure, but can you compile a .so in Ada and use it in anything that expects a .so written in C (as in link C against it, call into it from Python through CFFI, use it as a plugin for apps that expect C plugins, etc.) without changing the client app, in fact without even noticing that it's actually Ada and not C? I don't
                    You can create shared libs from any language, including Ada and link with it from ada, you just need an interface that Ada supports, the above 3 and Ada. There is some support for C++ linking in GCC, but it's not complete.

                    Originally posted by jacob View Post
                    know Ada sufficiently for that, but from what I remember it needs some kind of runtime system and it also has its own rather peculiar memory management. So while it's presumably possible to write a C program that will call into Ada code, the question is whether Ada can be used as a drop-in replacement for C, which Rust does?

                    NB: I'm not saying Rust is better than Ada. I find it better in some ways and worse in others. But I admire the way it "just works" within the ecosystem.
                    You can use it as a replacement for C just like any other language can be. Varargs is problematic though, but that's because it's a hack even in C.

                    Also, Ada is much nicer for low-level stuff, because it's written at a higher level.
                    Last edited by Lucretia; 05-30-2018, 12:00 PM.

                    Comment

                    Working...
                    X