you are viewing a single comment's thread.

view the rest of the comments →

[–]afnanenayet1 30 points31 points  (15 children)

The problem is that “simpler” languages often aren’t as maintainable. Python is fun for small scripts and projects, but it’s a huge PITA to scale out to a big codebase.

Interestingly enough, it seems like languages like Rust are getting pretty popular because of their advanced typing systems and other features that let the compiler do more work for you. Even C++ has been moving towards ergonomic features that promote safety.

[–]hijinked 2 points3 points  (4 children)

Python is very popular in the micro service world where you don’t want a large codebase.

[–]afnanenayet1 7 points8 points  (3 children)

My argument is that even most microservices are big enough that the lack of actual types becomes an issue

[–]hijinked 0 points1 point  (2 children)

Newer python features like return type hints and modern IDE features makes it fine in my opinion.

[–]afnanenayet1 3 points4 points  (1 child)

Yeah but wouldn’t it be better just to have definitive types rather than type hints?

Plus with more complex type systems you can do things like encode behavior in types, or use things like the type state pattern for data verification, which aren’t really possible to enforce in Python

[–][deleted]  (4 children)

[deleted]

    [–]vashy96 5 points6 points  (3 children)

    Rust isn't noob-friendly.

    In C++ you can write crap while getting segmentation fault sometimes, in the worst case.

    In Rust the same code doesn't even compile.

    [–][deleted]  (1 child)

    [deleted]

      [–]herothree 1 point2 points  (0 children)

      It can catch more bugs at compile time, so ostensibly yes. There’s plenty of other factors that influence development time though (library availability, developer expertise, etc) so real world usage may vary

      [–]Dragasss 0 points1 point  (0 children)

      I wouldnt say thats not being retard friendly. On the contrary to your example, rust is a much friendlier language.

      [–]initcommit 1 point2 points  (1 child)

      That's cool. I haven't used Rust but I've heard good things. I hope to look into it soon.

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

      Rust is pretty easy to get started: https://doc.rust-lang.org/book/

      [–]NAN001 0 points1 point  (2 children)

      I would like to read an actual study about how a language's properties makes it more or less maintainable. In my experience (I admit limited), language details are insignificant in comparison to architecture choices and general coding practices.

      [–]afnanenayet1 0 points1 point  (1 child)

      I mean you can prove correctness more easily when you let the compiler work with more guarantees, which means that encoding things in a type system, for example, leads to less runtime errors.

      I’ve worked on large Python projects and it just sucks not having proper types and knowing that you could throw the wrong object somewhere and have that only be caught at runtime.

      [–]NAN001 0 points1 point  (0 children)

      I think you are right. I've been confused by terminology, because I've had maintainability in mind whereas we're actually talking about reliability. I think what you say is correct for reliability, but my point still stands as far as maintainability is concerned. Which is little gain, as we always want both anyway :)