Python vs java. Pros and cons... Go...

  • 28
    Well, Go is indeed better than both.
  • 6
    @metamourge didn't see that coming
  • 30
    There is an unwritten rule that forbids this type of comparision when there is no given use case.

    How do you want to compare a scripting language with a programming language running in a VM without giving a task?

    It is like comparing an airplane with a jet.
    The airplane is slow compared to a jet, but it is good at transportation. Whereas the jet is fast and is used in war.

    It all depends on the fucking task!
  • 9
    python and java are targeted at totally different domains.
    One is compiled the other interpreted
    One has a somewhat sane syntax the other rages over an additional whitespace.

    I would first establish the requirements of the project and depending on that search for what the language offers to solve these problems and then look at extendability and maintainability.

    Pros for one project might be cons for another and vice versa
  • 1
    @fuckwit its not for a project. I was just curious what people think about them
  • 7
    I use both, both have a purpose the other can't fulfil.

    As @-ANGRY-CLIENT- said. It depends on how, why, and what either are being used for.

    So... fuck both and use PHP instead.
  • 3
    C++ and Forth 😐
  • 4
    @GlitterUnicorn I personally don't like neither of these.

    mostly because I am performance obsessed. I want my programs to have a low memory footprint and run fast without taking all of the hosts resources. That's why I mostly write Rust, C/C++.

    For smaller tasks I throw together either a simple Bash, Lua or Ruby script depending on how complex they get and if I need OOP for that.
  • 2
    Apples taste better than Ferraris.
  • 6
    Never worked with Java, but have seen nothing redeeming about Python.

    Go PHP.
  • 4
    @Kaji how dare you write out the name of the language that should not be named D:
  • 3
    @Kaji 😍

    @fuckwit P....H....P is the only language worth using, prove me wrong 😉
  • 1
  • 5
    Java Script
  • 3
    @C0D4 use it on a microprocessor. I dare you. I fucking dare you! 🤣

    C++ and Forth are capable of running on minimal resources.
  • 3
    @irene how micro?
  • 3
    @C0D4 let's say something like Atmel controllers used in Arduino kit. Or of comparable capabilities.
  • 3
    @fuckwit full disclosure. My main language is php 😂😂
  • 4
    @irene @C0D4

    A php interpreter running on an arduino??
    oh hell no!
    I doubt you can even fit it inside of the arduinos memory
    The only interpreted language that to my knowledge somewhat is able to run on an arduino is Lua
  • 3
    @fuckwit not on Arduino core. Just on the same micro controller. (in Arduino kit there's a special Arduino firmware which can be omitted)

    But yeah, you understood my concerns)
  • 3
    @fuckwit @irene
    It's not "impossible" in theory.

    But yes, getting an interpreter + php inside a 8bit controller would be no small feat.
  • 2
    @devTea javascript is offensive for me that's why I downvoted. Sorry
  • 2
    @bitjedi but, but I was referring to java script not javascript
  • 1
    @devTea haha.. then I think haterd is just overpowered..
  • 1
    @GlitterUnicorn i like python syntax for one, and the simplicity of the language allows me to code something really fast with more tools at my disposal than bash or similar gives me (bash scripting syntax is a crime againt humanity tbh)
    That said i wouldn use it for everything, for big projects its nice to have the structure, speed and reliability of a statically typed and compiled language.

    Dont have much to say about Java, its a bit of a relic but it works and at least its not made by MS :shrug:
  • 1
    I would take python anyday above fucking javascript thats for sure :D the white space might be quuirky but at least it makes sense and its well structured.
  • 3
    @C0D4 @irene @fuckwit but its funny how outraged the Internet is if you google "running php on arduino". Guess a few years ago you'd get laughed at for the idea of having a bootloader in a pdf or something.. and still there is https://github.com/pjimenezmateo/...

    Someday, we run php on mcus. And it's completely normal. Exactly like how every desktop application these days is basically a website in a WinForm.
  • 2
    @fuckwit Rust looks really intersting i have to say, whats your experience with it compared to C? Is it a straight upgrade or just different?

    Also ugh scripting in bash, why brother? Why? :P
  • 0
    @Elendil you somewhat force it to look good with linting
  • 1
    @fuckwit Forth interpreter will work too. It's really simple and small.
  • 1
    @Elendil I don't really like to compare it to C.
    Yes they both are system programming languages but they also have different goals in mind.

    Nowadays I see myself writing more Rust than C because I really like its high level zero-cost abstractions and the borrowchecker. This just lets me quickly write code thats fast, mostly explains and runs fast af without having to manage my memory and worry about dangling pointers etc. (You could still do this yourself if you want/need)
    It definitely takes a bit to get used to all the features rust offers. But if you get the hang of it it will be really powerful.

    I script in bash because simple tasks that operate on files or interface with programs on linux are very easy to write and manage. Also its is very powerful even if it gets ugly really quick.
    If I feel that Bash isn't sufficient for that or when it will get too complex (or the performance is sub-par) then I will go to another "real" language.

    @irene nice just added that to my rust-todo
  • 1
    If you don't keep looking for the best you'll never find clojure.
Your Job Suck?
Get a Better Job
Add Comment