We switched from Python to GO!

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2025

ความคิดเห็น • 28

  • @damianbulski7286
    @damianbulski7286 6 หลายเดือนก่อน +14

    When i started with go in my company I had big wtf moments with that err != nil. After a year of creating a desktop app and rest apis with go I think that error handling is the best feature of this language.

    • @SoftwareWithShawn
      @SoftwareWithShawn  6 หลายเดือนก่อน +2

      I had this thought today, Its really growing on me. Errors as a value is kind of sweet

    • @spfeu
      @spfeu 6 หลายเดือนก่อน +2

      A common complaint is that it leads to a lot of boilerplate, like "I might as well keybind something to write if err != nil" etc, but the important thing with this design choice is that error handling is more or less forced to happen right after the error happens, which is great for readability. In general, I think Go is great for readability and I don't care if there's a million lines of code instead of 100K if they are way easier to read, which I think is the case with a lot of Go (compared to Rust for example this becomes obvious)

    • @Junko_Zane
      @Junko_Zane 6 หลายเดือนก่อน

      As someone who has written a few small apps that do the same thing in both languages, I don't like handling errors in Python.

    • @mazkasr8542
      @mazkasr8542 หลายเดือนก่อน

      It is way better than try catch, but you should see Rust's Result type. I think you would love it.

    • @MrJxtr
      @MrJxtr 7 วันที่ผ่านมา

      What stack are you using for creating desktop apps? 👀

  • @kamilziemian995
    @kamilziemian995 หลายเดือนก่อน

    Good video.

  • @hsemix
    @hsemix 22 วันที่ผ่านมา

    Have you heard of Goravel???

  • @Grahamaan27
    @Grahamaan27 6 หลายเดือนก่อน +1

    using go run also compiles the binary on the fly (to make it psuedo interpreted), so in your example it would be even faster than "79x" that you saw.

    • @SoftwareWithShawn
      @SoftwareWithShawn  6 หลายเดือนก่อน

      @@Grahamaan27 is there an advantage to using “go run” vs “go build” then executing the binary directly?

    • @rafaeljacovmedel8953
      @rafaeljacovmedel8953 6 หลายเดือนก่อน +2

      @@SoftwareWithShawn if your program takes a time to compile go run would be slower than go build

    • @plaintext7288
      @plaintext7288 6 หลายเดือนก่อน

      Is it possible to compile a single file via stdin and specifying go.mod,go.som through arguments?

  • @x1x2x125
    @x1x2x125 6 หลายเดือนก่อน +1

    Java is compiled to bytecode, and that bytecode executes in a JVM just in time, at runtime.

  • @janakaone
    @janakaone 5 หลายเดือนก่อน

    Did anyone notice that the output sum of squares is different from the two programs

    • @nexovec
      @nexovec 5 หลายเดือนก่อน

      Which one do you think is more accurate? 🤔

    • @Frankablu
      @Frankablu 4 หลายเดือนก่อน

      The answer exceeds the range of i64, so the Go version should be wrong and the Python version should be correct due to Python's built-in BigDecimal support.

  • @ArturdeSousaRocha
    @ArturdeSousaRocha 5 หลายเดือนก่อน +1

    Can confirm, Java projects rarely build under a minute and often it's a few. Haven't used C++ in years but I think it's even slower.

    • @Jollyrogger805
      @Jollyrogger805 5 หลายเดือนก่อน

      Yes but that's not because of Java, you might be using some framework like spring boot etc which uses lot of classes etc to handle autoconfiguration

  • @basilalharbi3293
    @basilalharbi3293 6 หลายเดือนก่อน +3

    pandas and numpy and torch and a lot more
    it’s impossible to ditch python

    • @SoftwareWithShawn
      @SoftwareWithShawn  6 หลายเดือนก่อน +3

      Its definitely very hard to get off python when it comes to data science/AI. The closest thing ive seen Go be able to do in order to tackle this is extend the python interpreter by using Pygolo (gitlab.com/pygolo/py).
      Something that would be sweet is if the Go community used CGO to use the underlying C libraries that Python uses

    • @basilalharbi3293
      @basilalharbi3293 6 หลายเดือนก่อน +2

      @@SoftwareWithShawn if the c extensions can be used without python, no one ever will use python again. its like apple computers with linux

    • @SoftwareWithShawn
      @SoftwareWithShawn  6 หลายเดือนก่อน +2

      @@basilalharbi3293 you bring up a valid point my friend…

    • @AyushVachhani
      @AyushVachhani 6 หลายเดือนก่อน +1

      I mean we have pytorch library in c++, however I think c++ is way harder than python, and would take longer to production.

  • @vishalpachpande5921
    @vishalpachpande5921 6 หลายเดือนก่อน

    Next video julia lang vs python

    • @SoftwareWithShawn
      @SoftwareWithShawn  6 หลายเดือนก่อน

      havent heard much about Julia in some time. Will have to take a look

    • @vishalpachpande5921
      @vishalpachpande5921 6 หลายเดือนก่อน +1

      @@SoftwareWithShawn it's easy like python and fast like c. Mostly used for maths, AI ML , deep learning. But it has potential for everything that python can do and much better

  • @dilli_hangrae
    @dilli_hangrae 6 หลายเดือนก่อน +1

    That's absurd