15
Banele
7y

As a person who is more comfortable and relatively a bit experienced with Java I find Python quite nice, easy to read and less typing.

Comments
  • 3
    That's exactly what converted me to Python to start with, and now I'm spoiled rotten by it and find everything else tedious. :(
  • 3
    And you don't have to worry about Missing brackets.
  • 2
    @Navigatr lol.... this one time I was reading a simple text file and literally wrote three lines of code (even that I could've made it a single line of code). I was like dammnnnn is that it!!.

    In Java it would've been an entire method on its own just for reading a text file. I still love my Java though :-)
  • 0
    @Banele Exactly! :P The only way I can make JS compete with Python in terms of number of lines is by using tons of ternary operators. (I abuse those way too much.)

    I've literally just started looking at learning Java actually. :) It seems pretty easy to understand a lot of it with a background of JS and some very basic C#.
  • 2
    Yeah, Python is great for small one-offs.

    Experience tells me it's terrible for large projects, though.
  • 0
    @greyfade Really? Because I seem to see it a lot in stuff like computer games and such, from big-name devs too. :o

    Or are you talking about the performance of the programs or the quality/readability of the code?
  • 2
    @Navigatr once you get past a certain point, Python's dynamic type system starts letting several types of bugs get past linting. Complexity soon overwhelms your ability to maintain complex parts of the system, as you run into more TypeErrors and ValueErrors that you would never anticipate.

    I work on a couple large Python projects that have outgrown Python. It stops being a boon after a while.
  • 2
    @greyfade I also think because Python is an interpreted language the code runs slower than compiled code. therefore on a larger project that becomes a huge factor, I guess.
  • 0
    @greyfade Ah, I see. I mean, it makes sense since it was made to be a both simple and powerful language, but I can totally see how it might bug out like that. It's not as organized and exact as some languages out there, and when just messing up a single indentation might derail the whole thing, well... Yeah... :P

    I think it is a valid argument though, that it's a very non-intimidating, noob-friendly language to start with. :)
  • 0
    @irene Now, that makes more sense. XD I don't know why I didn't even think of that, sorry.
  • 1
    @Banele actually, Python's performance is only a problem in extremely resource-constrained environments. Its main flaw is more in its inability to cope with complexity.
  • 1
    @Banele text = open('file.txt').read()
  • 2
    Less typing YES!
    I mean,
    BufferedReader br = new BufferedReader (new FileReader("i_forgot_what_i_was_even_doing.rant"));
    vs.
    "with open("get_stuff_done.yay") as file:"

    The latter clearly is much better.
  • 2
    > less typing

    ☜(゚ヮ゚☜)
  • 1
    @dxdy more like
    Scanner sc = new Scanner(new File(this.getClass().getClassLoader().getResource("foo.txt").getFile());
    But I like it! Python is confusing, I need to have my { } blocks and my semicolon
  • 0
    @D3add3d oh no, I made mistake it should be getResourceAsStream and no .getFile() because it only gets the location of the file
Add Comment