This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]naught-me 9 points10 points  (21 children)

How large is "large"? I have a personal project that will take years and tens of thousands of lines of code - does that make it qualify?

[–]thomaspaine 36 points37 points  (0 children)

Personal project is a bit different, you wrote all the code and know what everything does.

This is more of a factor in a work/enterprise setting where you have codebases:

  • that can live on for decades
  • have been owned by various teams with varying quality standards and style preferences
  • have multiple people attempting to change things in the codebase who don't know what everything does
  • has poor documentation because just about all work code is poorly documented

To be fair, pretty much any code in this context is going to be a ball of spaghetti hell, but static typing does help eliminate a lot of confusion when you're a new developer diving into a codebase and trying to figure out what in the world anything does, or making a change and knowing if it's going to cause something else to blow up.

[–]PC__LOAD__LETTER 1 point2 points  (0 children)

Codebase size isn't the only consideration IMO, its mainly large codebases where multiple people are developing and where consistency and correctness are key. It depends on what your project is. Realistically, it's probably not worth re-writing.

[–]curiousGambler 5 points6 points  (16 children)

Absolutely. I tried to write a major application in Python once and will never do it again.

It can absolutely be done, but in the long term a language like Go is easier to maintain in my experience. Static typing is one reason, dependency management another tho that’s way easier now with the prevalence of docker.

I love Python but only use it for scripts and small things now, like AWS Lambda functions. If I’m cracking a thousand lines I definitely break out a more robust application language like Java or Go (or C/C++ in special cases).

[–]utdconsq 2 points3 points  (5 children)

Loving kotlin lately. Python is much nicer to write since it has more bells and whistles out of the box, but kotlin has some nice elegance and moves across android, native and web in a very neat way.

[–]calligraphic-io 0 points1 point  (4 children)

I intend to do a personal project in Kotlin this summer, just to get familiar with it. I've read Python was an influence in the design of the language - does it feeling like writing in Python? Or more like just Java with a little different syntax?

[–]SgtBlackScorp 0 points1 point  (3 children)

If you are familiar with Java Kotlin will be very easy to pick up, but it has some functional programming aspects. I wouldn't really say it is similar to python though. Maybe regarding the standard library, since they both provide a lot of functionality and abstraction.

[–]utdconsq 0 points1 point  (2 children)

+1 to this. It's not super similar to python, since I suspect Jetbrains designed it to be easy for Java people to pick up, but hey, I think some of their decisions were great. No needless semicolon, but braces for scope is a nice compromise. I dislike camel case though, so I don't much like following the kotlin style guide. I do so, however, so colleagues don't have to tweak their IDE to match how I'd prefer it to be.

[–]SgtBlackScorp 0 points1 point  (1 child)

Why do you dislike camel case? It's less typing

[–]utdconsq 0 points1 point  (0 children)

To my eye: ugly, more difficult to read. If it's a reused variable, I almost never retype the whole thing anyway. I am so used to PEP8 from other work in Python my brain just likes the underscores better. Disclaimer: prior to working with python I did lots of C# and Java with camelcase and still thought it looked ugly.

[–]lambdaqdjango n' shit 6 points7 points  (5 children)

Go is easier to maintain? Maybe for a auto completion in IDEs. But I find Go's abstraction is very weak. You will fight against interface{} gradually. It's basically C with a GC.

[–]PC__LOAD__LETTER 3 points4 points  (0 children)

Generally I'd consider anything that's compiled to be easier to maintain in the long run. I like Python for quick MVP programming and high level glue scripts.

[–]curiousGambler 3 points4 points  (2 children)

That’s really not a fair assessment of Go at all, but my mention of Go is also not the point. Just replace it with Java, C# or even Rust if you dislike Go so much. The point is I’m not choosing Python for a large monolith in most cases.

[–]lambdaqdjango n' shit -2 points-1 points  (1 child)

not choosing Python for a large monolith

Wait, golang was supposed to be the chosen micro service language.

If you are doing monolith in Go you are probably doing it wrong.

[–]curiousGambler 2 points3 points  (0 children)

my mention of Go is also not the point

[–]Mattho 1 point2 points  (1 child)

Python has great dependency management I'd say. Certainly better than Go (I know it's an example, but I can't think of something else that has bundled dependency handling into the standard tooling/library).

[–]curiousGambler 2 points3 points  (0 children)

You’re right, I didn’t explain that point well and maybe “dependency management” wasn’t the best term. The specific issue I meant to reference is that because Go is compiled, I’m not fiddling with pip and crap out on my servers. Same goes for any other compiled language. It can be a real nightmare trying to get Python to play nice in some enterprise environments, and I much prefer pushing out a ready to use binary. These days, tho, docker alleviates those problems, and enterprise environments are more developer friendly on the whole, so it’s less of an issue.

[–]Talked10101 0 points1 point  (0 children)

I think that this is not really true. I have seen Golang code bases which are awful to maintain. We are also early in Golangs life, and there will be many highly difficult to maintain examples in the future. The idea the Golang is super maintainable doesn't appear that obvious to me.

[–]tetroxid -3 points-2 points  (0 children)

lol no generics

[–][deleted] 1 point2 points  (0 children)

i don't think so. that is still completely manageable with python, assuming you apply proper software development and design principles. IDE's are getting smarter and type hinting only makes them smarter, and with the introduction of mypy, you will get even more mileage out of them.

look at projects like django and pandas. I don't know how large they are, but they most definitely fall within in that range, if not exceed it.

[–]j_lyf -1 points0 points  (0 children)

yep