• ChickenLadyLovesLife@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    22 minutes ago

    Y’all need Qt Creator: C++ for under the hood and Javascript for the UI. Virtually nonexistent base of coders who can do both competently and if you’re not careful you end up moving to Finland because of it.

  • wdx@feddit.org
    link
    fedilink
    arrow-up
    2
    ·
    1 hour ago

    Python with ESModules would be neat.

    Every time I type if typing.TYPE_CHECKING a part of me dies inside

  • Victor@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    4 hours ago

    I have worked with TypeScript for about 6 years now, professionally, and I really enjoy it. It’s got all the nice things from JavaScript, obviously, and almost eliminates all the bad stuff/uncertainties from JavaScript. That’s my opinion. I feel very confident working with TS.

  • PieMePlenty@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    4 hours ago

    I dont mind Python, in fact I kind of like it. Its easy enough, works fast enough and has a huge community backing. Open up notepad and start typing. The space thing is kinda stupid. I prefer braces and semicolons but apparently new programmers cant remember to use them so Python just got rid of them… not my thing but whatever, I can live with it.

    However, I’d never really want to create a large project in it. The dev tools arent there, .net style project management isnt there. I can see how it just becomes a mess if you try to make something that isnt just downloading some data, parsing and importing to somewhere else. Its great for simple stuff. It can do larger stuff - though not as good. It cant do enterprise, performance heavy, commercial stuff.

    Pick the right tool. Yeah you can make a website in x86 ASM and you can make embeded systems for the space shuttle in Python. The question is why.

  • pfm
    link
    fedilink
    arrow-up
    1
    ·
    6 hours ago

    Why does JavaScript before-guy look like Alan Kay? 🤔

  • fl42v@lemmy.ml
    link
    fedilink
    arrow-up
    27
    ·
    14 hours ago

    I’ve learned python after CPP… And I can’t #even remember all the cases when I thought “damn, I wish I could’ve just used pointers”

    • Treczoks@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      4 hours ago

      Even our C++ guys won’t touch my C code with all the pointer tricks and unions used for hidden castings. Whimps!

      But python has worse problems than lacking pointer. Have you ever copied a piece of code from an external source into a python source? It really can f-ck up everything if one has tabs and the other has spaces.

    • Tiefling IRL@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      9
      ·
      11 hours ago

      I’ve been in industry for a decade, big tech for over 6 years. And I STILL fucking hate Python. I can write in it, but everything about it just feels wrong

      • dafo@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        Similar story in our team with 2-15 YoE. We do TS and C# but recently did a good takeover of the API from one of our offers which is in python We all now fucking hate python. The codebase is fine, the language isn’t.

  • CarrotsHaveEars@lemmy.ml
    link
    fedilink
    arrow-up
    13
    ·
    15 hours ago

    Let me guess. Are the Java and Python programmers happy after because they leave up their technical debt for someone else to resolve? 🤭

  • masterspace@lemmy.ca
    link
    fedilink
    English
    arrow-up
    105
    arrow-down
    10
    ·
    22 hours ago

    Lmao, bruh. How do people keep praising a language where messing up a space breaks everything and there is no real type system?

    • porous_grey_matter@lemmy.ml
      link
      fedilink
      arrow-up
      1
      arrow-down
      3
      ·
      5 hours ago

      where messing up a space breaks everything

      Messing up some character breaks everything in any language, skill issue

      there is no real type system

      What does “real” mean? It’s pretty robust these days.

    • jedibob5@lemmy.world
      link
      fedilink
      English
      arrow-up
      59
      ·
      22 hours ago

      The whitespace doesn’t bother me. Any IDE worth a damn will manage that for you. As for the type system, yeah, I strongly prefer static typing, but for simpler projects I can see the convenience of it.

      My real issue with Python comes with managing a development environment when multiple developers are working on it. Dependency management in Python is a headache, and while in theory, virtual envs should help with synchronizing environments from machine to machine, I still find it endlessly fiddly with a bunch of things that can go wrong that are hard to diagnose.

      Python is great for small scripts, proofs-of-concept, and such, but I wouldn’t write anything more heavy-duty than that in it.

      • morrowind@lemmy.ml
        link
        fedilink
        arrow-up
        8
        arrow-down
        1
        ·
        16 hours ago

        Any IDE worth a damn will manage that for you.

        Yeah in like 10% of cases. I’m copying something from a pdf my prof gave. The only ones able fix spacing now are me and God

        • Incblob@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 hour ago

          You, god, pretty much any Formatter and ide. Black Formatter: “All leading tabs are converted to spaces, but tabs inside text are preserved.” Vscode has a command to convert between the two, and non-leading tabs are a simple replace/regex away from being converted. If you mean unorthodox spacing, if you have code with like 7 leading spaces, then that’s a matter for a priest.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        15
        arrow-down
        1
        ·
        20 hours ago

        You can totally write heavy duty things if you know what you’re doing: use type hints, static checkers, tests, etc. It just takes a bit more effort and care.

        • ByteJunk@lemmy.world
          link
          fedilink
          arrow-up
          9
          arrow-down
          1
          ·
          17 hours ago

          But why would I use something that takes more effort and care?

          I’m sure you’re right and it’s possible, but if I don’t have to fix another python project at work I’ll be in heaven.

          • Eager Eagle@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            10 hours ago

            it’s more effort and care compared to a throwaway script, not necessarily compared to other languages

          • grue@lemmy.world
            link
            fedilink
            English
            arrow-up
            13
            arrow-down
            1
            ·
            16 hours ago

            Because “more effort and care” in Python is still way less of a pain in the ass than the minimum enforced boilerplate necessary in most other languages.

              • grue@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                9 hours ago

                Implement a basic socket connection in C (20 lines of manipulating struct sockaddrs and such), then do the same in Python (2 lines).

                And then go back and make the C version support IPV6, because your initial implementation didn’t.

                • “Look, Python is way easier to use than other languages! Look how complex this easy task is in Python versus other languages like assembly and brainfuck!”

                  I’m not saying “do stuff in C it’s easier than Python”, but if I took e.g. C# then it’s also just two lines. That supports everything and is also faster than the Python implementation.

        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          1
          ·
          19 hours ago

          Personally, my estimate doubles when we’re asked to implement something in Python…

          • Eager Eagle@lemmy.world
            link
            fedilink
            English
            arrow-up
            9
            ·
            19 hours ago

            That’s a proficiency matter. Python is the language I can get something done the fastest today, but 6 years ago that would be Java or even JS for me.

            • Ephera@lemmy.ml
              link
              fedilink
              English
              arrow-up
              1
              ·
              10 hours ago

              Eh, it’s most definitely part of it, but the biggest time sink that I expect when working with Python is fixing the build system every two weeks on different devs’ PCs. I do imagine, if you eventually find a solution that works on most PCs that this workload will go down, but we had a substantial Python part in my previous project and over the course of the 1½ years that we worked on it, it really felt like we were making negative progress. Near the end of it, I couldn’t use PyCharm anymore, because I couldn’t figure out for the life of me, how to make it recognize the dependencies again.

      • masterspace@lemmy.ca
        link
        fedilink
        English
        arrow-up
        7
        ·
        edit-2
        20 hours ago

        Yeah, working on python projects professionally is always a nightmare of configuring env variables and trying to get your system to perfectly match the reference dev system. I find Node.js projects to often be the simplest and most pain free to setup, but even compiled languages like C# and Java are often easier to get up and going than python.

    • HiddenLayer555@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      10 hours ago

      A statically typed Python would be my dream programming language.

      Can someone please make Typethon?

      • porous_grey_matter@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        Type checking for python is not bad these days, just run pyright (or mypy, I would like to prefer the non MS solution, but we have found pyright much more rigorous) on your code. Yes obviously you can still get out of it with an ignore statement, and that might occasionally be necessary for some libraries, but if you enforce no errors in pre-commit or CI then it’s only a little worse than compile time.

      • ma1w4re@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        8 hours ago

        Pyright language server makes Typethon out of your Python at the cost of massive bugs and performance. I used to like it, until I got really sick of waiting about 10 seconds for a suggestion to appear when typing open() and really fucking sick of the entire server crashing after I type pow()

    • Riskable@programming.dev
      link
      fedilink
      English
      arrow-up
      28
      arrow-down
      9
      ·
      edit-2
      21 hours ago

      Haha: “A space breaks everything.” Fuck YES! Are you kidding me‽ It’s one of the best features!

      Why? Because it’s so easy to see. In other languages you’ve got semicolons which are surprisingly difficult to notice when they’re missing. Depending on the situation (or if you’re just new to programming) you could spend a great deal of time troubleshooting your code only to find out that you’re missing a semicolon. It’s frustrating and it makes you feel stupid which is never a good thing for people who are new programming.

      Types are in a different category altogether with seemingly infinite reasons why you’d want a feature-rich, low-level type system and also why you’d want to avoid that.

      IMHO, the point of Python is to be a simple language that’s quick to write yet also very powerful and speedy when you need it to be (by taking advantage of modules written in C or better, Rust). If it had a complex type system I think it would significantly lower the value of the language. Just like how when I see an entire code repo using Pydantic and type hints everywhere it makes the code unnecessarily complex (just use type hints where it matters 🙄).

      I’m not saying using type hints on everything is a terrible thing… I just think it makes the code harder to read which, IMHO defeats the point of using Python and adds a TON of complexity to the language.

      The promise of type hints is that they’ll enable the interpreter to significantly speed up certain things and reduce memory utilization by orders of magnitude at some point in the future. When that happens I’ll definitely be reevaluating the situation but right now there doesn’t seem to be much point.

      For reference, I’ve been coding in Python for about 18 years now and I’ve only ever encountered a bug (in production) that would’ve been prevented by type hints once. It was a long time ago, before I knew better and didn’t write unit tests.

      These days when I’m working on code that requires type hints (by policy; not actual necessity) it feels like doing situps. Like, do I really need to add a string type hint to a function called, parse_log()? LOL!

      • masterspace@lemmy.ca
        link
        fedilink
        English
        arrow-up
        26
        arrow-down
        1
        ·
        edit-2
        20 hours ago

        I don’t mean this insultingly because lots of programming jobs don’t require this and for the ones that do we still tend to all start here, but in all honesty this sounds like it’s coming from someone who’s never worked on a large project maintained by multiple people over time.

        First of all, the hysteria over semicolons is ridiculous when JavaScript, Typescript, C#, Java, Go, Swift, etc. etc. wil all automatically highlight missing semicolons, if not automatically insert them for you when paired with an IDE and standard linter. On top of that, JavaScript and Typescript do not require semicolons at all, but they are still used alongside braces, because they make your code more scannable, readable, and moveable.

        Secondly, without type safety your code is no longer predictable or maintainable. If you’re working to quickly sketch out some new fangled logic for a research paper it’s one thing, if you need to write test code so that your codebase can be tested an infinite number of times by other coders and whatever CI/ CD pipelines to make sure that nothing’s broken, then all of the sudden you start seeing the value in strict typing.

        Honestly, complaining about type safety adding “extra code” is a complaint that almost every coder has when they start out, before you eventually realize that all that “extra code” isn’t just boiler plate for no reason but is adding specificity, predictability, reusability, and maintainability to your code base.

        When defining types looked like this it was one thing:

        String name = new String("Charles Xavier");

        But when it looks like this, there’s no reason not to use strong typing:

        const name = "Charles Xavier";

        • kameecoding@lemmy.world
          link
          fedilink
          arrow-up
          22
          ·
          20 hours ago

          Anyone who thinks a strong type system is a drawback has never worked on any real project where you actually have to collaborate with others.

          • ChickenLadyLovesLife@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            32 minutes ago

            I started out with Visual Basic using the Variant type all the time, and even though I was usually just working on one-person projects it was a fucking disaster. You don’t even have to collaborate to see the virtues of strong typing.

        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          8
          ·
          19 hours ago

          Yeah, the alternative to static typing is to write tons of unit tests, which definitely adds a lot more code to your codebase.

        • Riskable@programming.dev
          link
          fedilink
          English
          arrow-up
          8
          arrow-down
          5
          ·
          20 hours ago

          without type safety your code is no longer predictable or maintainable

          This sounds like someone who’s never worked on a large Python project with multiple developers. I’ve been doing this for almost two decades and we never encounter bugs because of mismatched types.

          For reference, the most common bugs we encounter are related to exception handling. Either the code captured the exception and didn’t do the right thing (whatever that is) in specific situations or it didn’t capture the exception in the right place so it bubbles up waaaaay too high up the chain and we end up with super annoying troubleshooting where it’s difficult to reproduce or difficult to track down.

          Also, testing is completely orthogonal to types.

          • masterspace@lemmy.ca
            link
            fedilink
            English
            arrow-up
            12
            ·
            20 hours ago

            This sounds like someone who’s never worked on a large Python project with multiple developers. I’ve been doing this for almost two decades and we never encounter bugs because of mismatched types.

            Have you worked on major projects in other languages in that time period to be able to compare and contrast?

            The last two python projects I had to work on didn’t have bugs because of type issues, but it was much harder to come into the codebase and understand what was going on given that you didn’t have type information in many many places which forced you to go back and comb through the code instead.

      • kameecoding@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        20 hours ago

        What are you writing your code in? Windows notepad? How the hell do you not see the semicolon missing?

        • Swedneck@discuss.tchncs.de
          link
          fedilink
          arrow-up
          1
          arrow-down
          4
          ·
          18 hours ago

          because semicolons are tiny characters that oftenhave to be appended to the end of lines (precisely the worst place for them to be easily visible, since they’ll blend in with the previous character)

          whitespace meanwhile is very easy to notice that it’s missing, as i’m sure you noticed when reading the above sentence.

          • m532@lemmygrad.ml
            link
            fedilink
            arrow-up
            1
            ·
            5 hours ago

            In both cases, you press compile and the compiler goes “you missed a whitespace/semicolon HERE”

      • Gamma@beehaw.org
        link
        fedilink
        English
        arrow-up
        4
        ·
        20 hours ago

        It’s kinda funny that Godot’s custom language GDScript is, at least on a surface level, pythonic (no list comprehensions, context managers, decorators, etc, it’s mostly syntactical similarities). But type hints do make it run faster!

        I was blessed to get to skip most of the old pains in python. I only had a handful of scripts that ever needed to be ported from 2 and they didn’t rely on any libraries. The ecosystem is easy to work with and I’m looking forward to working with Python for the foreseeable future

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        2
        ·
        edit-2
        20 hours ago

        Exactly! I’ve wasted more time hunting missing semicolons in languages that use them, than fixing wrong indentation in Python.

    • TriflingToad@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      11 hours ago

      because it’s easy to use. I don’t like strangling my code because it’s screaming about semicolons again

    • Ismay@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      16 hours ago

      Not even the worst. This function declarations with separations between positional and enum variables… Or the infamous global…

  • kameecoding@lemmy.world
    link
    fedilink
    arrow-up
    25
    arrow-down
    7
    ·
    20 hours ago

    Java is in a completely different leagues to the rest of these.

    Whatever you think Java sucks at, the other languages mentioned here suffer from much worse.