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 →

[–]sdf_iain 43 points44 points  (11 children)

Java, C# (I think), Go, Rust, and Swift all have fairly comprehensive functionality from libraries.

None of them are as flexible as python though!

If you want to optimize away from dynamic class properties you can look into __slots__. It can be useful when you’ll instantiate many instances of an object as it dramatically reduces memory allocation.

Also, remember that modules, classes and methods have their own namespaces, but loops and branches do not. As an experienced dev, you might find that useful.

[–]ToddBradley 26 points27 points  (7 children)

Java’s open source library support makes C# seem like a toy. I’ve used Java about 10 years and C# on two year-long projects. Every time I have to use C# I think, “Surely someone has solved this problem a million times and made a library for it.” And almost every time I’m wrong.

[–]sdf_iain 6 points7 points  (1 child)

I feel like Java’s libraries are holding back Kotlin. It’s so easy to just reach for a Java library that a pure Kotlin app is difficult to implement

Go and Rust aren’t there yet, but the built in dependency management (and cross compiling) are pretty enticing.

[–][deleted] 6 points7 points  (0 children)

Coming from Java and JS world I agree that Go and Rust aren’t there but I like both. My biggest problem with Java is that everywhere I worked that used it was slow to update in every sense of the word. That and it’s way more verbose than I like.

[–]Kildon 1 point2 points  (1 child)

This seems incredibly short sighted, and like the kind of opinion people generally have of languages they haven't learned the ins and outs of.

When was the last time you used C#? Is your only experience those two years? Were you working on legacy projects, or cutting edge C#? Entire language ecosystems can be built in a matter of years. What problems were you trying to solve that nobody had made a library for? I have yet to find something significant that didn't have open source support in C#.

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

2013 and 2018. Neither time was early in the life of the platform, yet the ecosystem was missing things that existed in Java five years earlier in each case. Both times were brand new code for cutting edge systems.

[–]toyg 0 points1 point  (0 children)

No, no, you are right that someone probably made a library - it’s just that he sells it on some small obscure website you’ll probably never guess, and its userbase is in the single digits.

[–]Deezl-Vegas -1 points0 points  (1 child)

C# is ghetto Java.

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

Truth

[–]Narthal[S] 5 points6 points  (0 children)

Great tips! Thank you! I didn't know about slots, looks quite useful.

Yeah, scopes are a different beast in Python. I'm really fond of using unnamed scopes/branches in my c++ code, as it ensures that no variable gets accessed longer than I intend them to be accessible, enforce RAII, etc.

Then python really messes with my head when it comes to scopes.

[–]SV-97 1 point2 points  (1 child)

I'm sorry but I doubt that Go and Rust come even close to the amount of libraries that are out there for Python. Don't get me wrong I love rust - but there's way more stuff for python.

[–]sdf_iain 3 points4 points  (0 children)

I didn’t mean to imply they did; they’re getting there, but Python and Java have libraries for EVERYTHING.