I feel proponents of any programming language put a lot of spin around what isolated aspects it is good for, but fail to illustrate what a programmer in even one target domain gains from using it.

Are there programming language implementations unlike what is described above, that you feel back up their marketing?

  • balsoft@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    1 day ago

    fail to illustrate what a programmer in even one target domain gains from using it.

    I think the main illustration for almost all languages is pretty clear (for most situations) - it’s easier and faster than writing assembly by hand.

    The rest comes down to trade-offs, technical (compiled/interpreted, strong/week typing, high/low level, optimization), ecosystem (are there libraries targeting your domain, is it likely to be maintained for the duration of your project), personal (how familiar you are with the language, how well do you understand its paradigm), business (how easy it is to hire for it, how good is the developer collaboration story, are there certifications).

    All the languages you list have some weak points and some strong points. Because they are all popular and received a lot of development over the years, they are now all a good fit for at least some situations.

    Although to be clear, even assembly has its benefits and will be the right fit occasionally.

  • jay2@beehaw.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 days ago

    So, I enjoy creating front ends to automatically generate cadd drawings for me. It’s like a lucrative hobby. I started doing it in the early 2000’s using Visual Basic 3, Microsoft Access and AutoLISP. Not cartoons, mind you. Anyone can distribute a generic drawing with notes. That’s not what I’m talking about. A front end so that anyone without cadd knowledge can create a fully vectorized 2D drawing made in seconds and accurate to eight decimal places. I have hundreds of front ends that I use when I need to. I can surely feed it bad data, but it’s faster and never forgets to carry the two. It’s such low-technology, any version of Autocad will do. I still use my version 2010 at home, but they all work with version 2023.

    Here is part of a video showing one of the front ends in action (though the audio had to be removed). This is a custom front end in Visual Studio 2007 (with my ultra nerdy paint dotnet/autocad graphics because they refused to give me photoshop) that accepts user inputs for a finished drawing of a self-supported brick dome. The calculations for these domes, if doing manually, takes about an hour per course and domes would tend to average about twenty courses. This required three days worth of math you had to write out for your checker, and then one more to actually make the drawing and bills of material. Checking took another day in most cases, so essentially a week to get a quote out. I changed that process to seconds.

    In the video, you see the data entry for the dome geometry and skew line (the base the bricks rest upon) Then, the brick shapes permitted to be used are defined by their chords. In this case, it was a 9x4.5x3 series set of up to five arches and wedges in each of two keys. When used as intended, they create a 9" thick spherical dome. It calculates the best fitting key (4.5"-4.5" or 4.5"-4") and then calculates a three piece combination of arches (3" on the outside tapering to up to 2" on the outside) and wedges (also 3" on the outside tapering but up to 2" on the inside) in a ratio that best forces the ring to close. It then iterates over the courses from a specified starting end until it completes naturally or the geometry becomes a mismatch for the bricks turning potential at a certain spherical radius.

    It then creates two reports, a count report and a math report (all engineering documents required checking at the time.). BUT (here’s the nerd coolness) it remembers ALL that glorious data it did during the calculations, and builds a custom lisp file with it, which can then be run on an empty drawing to generate the full vector content, as you notice, pretty quickly. To fully check it, I had it generate a top, front and bottom view as well as the brick count in a handy dandy lil chart. It overwhelms the lil laptop I had to use as it draws EVERYTHING except dimensions (though I would eventually nail that down too). I perform the generation process twice, slightly changing the skew to achieve a different combination.

    As a note, the drawing portion became the actual check. You will clearly tell if there is a problem with tilts and closure by just looking at the finished cadd vectors since they do capture the bricks real world symmetrical posture. The math report itself generates a series of checks to ensure the count is appropriate. Volume check, four-point circumference check, key checks, anti-straight checks, negative quantities. Lot’s of crazy things happen in the formula when the bricks aren’t able to find a valid solution to the geometry.

    So, I think I make a valid argument that when used properly, AutoLISP is possibly one the best tools an Autocad designer can employ, and it has the potential to outperform any modern cadd program that’s packed with features you’re paying for but never using. In the time it took you to read this, CREO and Inventor are likely still booting up, and Solidworks is having license issues again.

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    4 days ago

    Dunno. If it fits the purpose and you get a lot of libraries and tooling around your specific domain… Why not make use of it? Python is easy to learn and has a lot of nice stuff for data science. Or R for statistics… Considering the absence of other complete frameworks when doing embedded programming… wouldn’t you just use C++?

    Maybe I don’t the question. Programming languages are never perfect. Nor good for one specific and confined task… They all grew, picked up quirks. Or inherited burdens. People are trying to do 5 million different things with them at the same time… I think I’m more concerned with their usefulness and actual application, than their marketing material.

    And some of the stuff they did in the 50s, 70s, 80s and 90s, when these programming languages were designed, is just a bit weird by today’s standards.

    • Life is Tetris@leminal.spaceOP
      link
      fedilink
      arrow-up
      0
      arrow-down
      2
      ·
      4 days ago

      You are right Python and C++ have a huge amount of collateral available going for them. But is the utility of their language features backed up by any examples or explanations? Rigid object-orientedness as seen in Python, C++, Java, modern Javascript is not conducive to good software in practice, and we are just muddling along.

      • Womble@piefed.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        3 days ago

        Neither python or JS are “rigidly” OOP, they have support for them but you can very easily do functional or imperative programming in either. out of those I believe Java is the only one that “rigid OOP” is a fair descriptor for, and I could be wrong on that as its not a language I’ve used (c# which I have and started as essentially microsoft Java has moved away from that style by incorporating numerous functional features from f#)

        • balsoft@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          1 day ago

          Fun fact, you can totally do functional programming in C++ too. Actually, it is in the top-right of the λ-cube, making it (in a specific sense) a more functional-programming language than Haskell or LISP :D

      • for_some_delta@beehaw.org
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        4 days ago

        Object-oriented is a design pattern that the language can facilitate. Just because a language supports “is a” doesn’t mean “has a” does not exist. There are a lot of design patterns. Use the best language and design patterns for your team.

  • TehPers@beehaw.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    I don’t fully understand the question, to be honest, but would a purpose-built language like ActionScript qualify? It served only one purpose, and (debatably - AS3 was alright) served it well.

    Otherwise, every general purpose language attempts to serve all its uses at once, which means they rarely specialize heavily into one particular domain. For example, while Rust’s stdlib devs could build a HTTP library, many Rust users don’t need one, good community-maintained libraries exist, and the stdlib devs don’t want to sacrifice stability with something that requires as much churn as a HTTP library needs. It serves their goal of stability really well, but requires extra steps from users who need that.

      • flatbield@beehaw.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 days ago

        Python is slow often 1% of the speed of a fully parallelized and vectorized C app compiled specifically for your architecture. There are ways to improve speed like libraries, PyPy, numba, etc of course but often theٌse are application specific and do not always give the performance you might think. I love Python, but for speed it is not the best.

        • Life is Tetris@leminal.spaceOP
          link
          fedilink
          arrow-up
          1
          ·
          4 days ago

          Interesting. What is useful in Python other than the effort put into the bindings to fast libraries? I thought alternatives like Go, Julia and Ruby are appreciated over Python for programming utility.

          • flatbield@beehaw.org
            link
            fedilink
            English
            arrow-up
            3
            ·
            3 days ago

            You generally do no write Python for speed though generally the apeed is good enough. You write it for minimal effort of coding plus libraries. Why do people use Matlab ҄and R, same.

            • Life is Tetris@leminal.spaceOP
              link
              fedilink
              arrow-up
              1
              ·
              2 days ago

              Maybe you are replying to the other comments, but what I am getting is Python is good glue and doesn’t get in the way. That is fine, but not getting in the way is little help with any of the programming.

              • flatbield@beehaw.org
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 day ago

                Python as glue is absolutely a use. The big advantage of Python is that it also has a broad range of use and expands what a single developer can do in cases where time and cost of development is more important then code efficiencey and long term support. Basically quick often throwaway apps to get something done.

                Edit: Python is a good alternative to say tcl, perl, R, matlab, VB, etc.

                • Life is Tetris@leminal.spaceOP
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 day ago

                  broad range of use, alternative to Perl, R, etc.

                  Of course. Its in the same category as Ruby and Lua. Hence the question on “getting out of the way”, which Lua is much better at and which Ruby surpasses by also making programming easier. But Python was first at surpassing even Perl at growing library bindings.

      • Life is Tetris@leminal.spaceOP
        link
        fedilink
        arrow-up
        1
        ·
        4 days ago

        There are many easy-to-learn languages, and others actually have useful software development ideas (immutable by default, for example). I understand if expectations are lower, though, from the language talk, and if any language with the required libraries is fine.

    • Life is Tetris@leminal.spaceOP
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      4 days ago

      Inane features a language happens to have, like object-orientation, are marketed that are not backed up by any argument or example beyond homework-level code.

      What language features do users say helped them? Existence of libraries didn’t make C a good language, and providing a binding to those libraries does not make Python a good language. Hard work must go into bindings, whether for Python or for Ruby or for Lua, but Ruby and Lua make convincing cases for themselves.

      • Dave.@aussie.zone
        link
        fedilink
        arrow-up
        3
        ·
        4 days ago

        What language features do users say helped them? Existence of libraries didn’t make C a good language

        Hm, except in the way that being able to call into library functions “relatively easily” from the base language was a good way for others to create a bajillion handy libraries.

        And once you’ve got those available to extend your language in any direction you want, you’re well on your way to ubiquitousness.

      • for_some_delta@beehaw.org
        link
        fedilink
        arrow-up
        1
        ·
        4 days ago

        I used Lua as a scripting language directly tied to C. It is useful for allowing scripts to interact directly with compiled code. The compiled code is still the focus, but the scripts allow changes without a recompile.

        I used to like C#, but dotnet didn’t become as portable as I hoped it would.

        I use C (embedded), C++ (everything), Python (data manipulation), PowerShell (pipelines) and bash (pipelines).

        I hope you can find a non-homework job to use whatever skillset you are developing.

  • Life is Tetris@leminal.spaceOP
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    4 days ago

    Counterexamples.

    A simple language like Lua, whose advantages in actually building software rather than homework-level coding are well-documented, and borne out by well-received web servers, editor extensions, network software like Snabb (and Adobe something).

    A platform language like Erlang that is not just simple to code in, but also has a mighty capable runtime. Demonstrating the value of that combination are the impressive networking and storage apps shipped with the platform, apart from actual software wins in the wild like ejabberd, Pleroma/Akkoma, etc.

    An idea like Objective Smalltalk, which tackles software architecture head-on. https://objective.st/

  • Life is Tetris@leminal.spaceOP
    link
    fedilink
    arrow-up
    0
    arrow-down
    2
    ·
    4 days ago

    Just as an example, neither the C++ documentation nor its sagely bloggers have ever shown why it is a good fit for, say, systems programming. A really neat way of handling bit-level data is actually in Erlang’s bit syntax.

    Separately, I spluttered when I realized that Boost includes 2 statechart libraries which proclaim the approach is widely useful, but nothing else in Boost uses it - not asio or its ilk, not the parser libraries, not the graph library.

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      4 days ago

      Just as an example, neither the C++ documentation nor its sagely bloggers have ever shown why it is a good fit for, say, systems programming. A really neat way of handling bit-level data is actually in Erlang’s bit syntax.

      Erlang requires a runtime environment, which disqualifies it for situations where you don’t have a filesystem to load the runtime from, like developing a kernel or for microcontrollers.
      Of the popular languages, your choices are virtually just C, C++ and Rust for that.

      More towards your general question: Not needing a runtime environment also means you can use C, C++ and Rust for cross-language libraries. For example, SQLite and OpenSSL have just been implemented once in C, and then you simply have a thin wrapper for Java, Python etc…
      If you are looking to build a library that can be used by as many devs as possible, that’s a selling point which is hard to ignore.

      • Life is Tetris@leminal.spaceOP
        link
        fedilink
        arrow-up
        1
        ·
        3 days ago

        I wasn’t thinking not needing a runtime is a language feature. After all, needing a runtime hasn’t prevented Erlang from running on microcontrollers (Atom VM, GriSP); or Python either.

        Basically, C++ and its ilk have no language feature for their purported stronghold of systems programming. Inertia isn’t a language feature unless the language has actual features (like, say, Common Lisp).

        • Ephera@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          3 days ago

          You picked out my one argument where you have a (weak) counterargument and then declare there’s no other arguments. Does not sound like you want to understand…

          • Life is Tetris@leminal.spaceOP
            link
            fedilink
            arrow-up
            1
            ·
            2 days ago

            I did you the courtesy of replying with a bit of info about Erlang, even though you weren’t addressing the actual point about lack of language features like Erlang’s. BTW, by conceding that the argument for C++ on microcontrollers is weak given other languages doing better on that front, you are conceding that C++ doesn’t have features to help systems programming.

            Arguments are being made for language platform features when the question of language features comes up. I doubt it has to do with people not understanding the question.

            More likely just scratching heads to find atleast 1 useful C++ (or any other mentioned language) feature that actually is useful to the domains professed to be “supported”. This isn’t an attack, I am in this boat too! The utility of its language features seems to be no more than “atleast it is not assembly”.

    • for_some_delta@beehaw.org
      link
      fedilink
      arrow-up
      1
      ·
      4 days ago

      Boost is too monolithic to be useful. I am not surprised it has redundant functionality. Get the great parts of Boost like asio separately.