Traister101

joined 1 year ago
[–] [email protected] 2 points 5 days ago

Eh? How's that work. I'm not going to sit here and say there isn't too many factories in Java but as a concept it's extremely useful. You hand off a "factory" to something which actually creates the object. This is really useful in for example serialization. How so? You could register factories (mapped to some sort of ID) which get passed the serialized data and return some sort of created object. Now the core serialization code doesn't know nor care how exactly any particular type gets serialized. Pretty nifty huh?

Some languages have better ways to encapsulate this functionality but that's what the factory concept is

[–] [email protected] 5 points 1 week ago (5 children)

No python is statically typed. You have type hints, which makes the language tolerable but like their name implies it's a hint at the type. You can perfectly legally pass in something completely different that doesn't conform whatsoever.

The primary thing static languages provide is static typing, that being the ability to determine before runtime that all the types are valid. A good example of this is how C++ programs will refuse to compile if you try to invoke a method that doesn't exist on the type. That's because it's statically typed. At compile time you know that the code is wrong. Dynamic languages fundamentally don't work like that. You cannot know until runtime if the method you called or the field you are trying to touch exists or not. Again type hints help a lot with this but that doesn't change how the language actually operates.

[–] [email protected] 10 points 1 week ago (7 children)

They specified statically typed languages. Python would be dynamically typed

[–] [email protected] 6 points 2 weeks ago

Well damn. That sucks

[–] [email protected] 18 points 3 weeks ago (1 children)

And the entire stack trace

[–] [email protected] 26 points 3 weeks ago (1 children)

What parallel universe did you come from? Nintendo is like the company known to be a bad guy when it comes to IP lawsuits. They went after a Smash Bros tournament for emulating a game they literally don't sell anymore for a console they also no longer produce.

[–] [email protected] 6 points 4 weeks ago

Just one more lane bro it'll fix traffic

[–] [email protected] 18 points 1 month ago
[–] [email protected] 8 points 1 month ago (3 children)

"Significantly" Going by the comparison Sony felt large enough to brag about there's hardly a noticeable difference

[–] [email protected] 3 points 1 month ago* (last edited 1 month ago) (3 children)

So the big important part of git is that it's a collection of commits. A branch is just a labeled commit and each commit is a list of what changed from the parent. Rebasing (the most confusing one for people) is when you fiddle with a commit from underneath yourself. Or in even more simple terms editing a parent commit. Rebasing is extremely powerful but most useful for when you notice a bug you wrote a couple commits ago. Fixing such issues via rebase (or !fixup commits you auto squash at the end) keeps your history clean. It's as though you never wrote the bug. The other thing you do a lot with rebasing is moving your branch up in the history cause somebody updated the remote.

[–] [email protected] 6 points 1 month ago

I wouldn't be shocked if it was astro-terfing

[–] [email protected] 16 points 1 month ago* (last edited 1 month ago) (5 children)

Everyone from the lemmy.blahaj.zone instance that I've interacted with or seen have been trolls. Those guys are super weirdos idk what their deal is. It's baffling seeing what they claim to stand for

view more: next ›