Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4669025yNo language is perfect, because if it was, devs would stop creating new ones.
Same with frameworks, libraries and any other level you want to talk about. -
The difference between most of your examples and js frameworks is, that js has n frameworks that solve the exact same problem the exact same way with slightly different apis
-
Voxera113885y@tekashi so?
The same exists in c# and others.
Js might have a few more, but just pick one you like, and if you do find one, ... just build your own perfect one :D -
Yeah I agree with you that all languages have a lory of frameworks each. But I don't think 0.1+0.2 is what a framework miscalculates. It's a language itself that acts unintuitively. And the primary purpose of any programming language is to be as easily understandable [readable/writable] as possible. Read: intuitive. Languages and frameworks are not invented for machines. They are created for people. Machines can easily work in binary. People can't, hence the need for human-readable/writable languages.
So when all your life you are taught that 0.1 + 0.2 is 0.3 and some language claims it's not, it's either broken or poorly designed. -
hitko31455y@netikras Not *some* languages, pretty much every single language unless specifically used for high-precision maths, since the other purpose of a programming language is efficiency and making sure 0.1 + 0.2 equals 0.3 is unnecessarily inefficient for most use cases.
-
hitko31455y@netikras Also the point isn't in floating-point maths, the point is floating-point maths makes perfect sense when you understand that representing a number with finite decimal digits in a different numerical system doesn't guarantee a finite representation, and complaining about such quirks more often than not just shows lack of basic knowledge and inability to understand the reasoning behind it.
-
Voxera113885y@hitko good point.
While in c# that specific example gives the right answer, going with a more complex can give the same error in c#.
The problem there is not the language but IEEE specification of float and double that prioritize speed over correctness.
In c#, using decimal is the best way to avoid it, but performance is worse which do affect high volume calculations like science or ai.
For fucks sake, just because you don't know anything besides JS, you don't have to constantly complain how it's "so fucked up"!
Yeah there's a lot of frameworks. So what? Python has 50+ wsgi frameworks just for server-side apps, Linux has literary hundreds of desktop environments, C++ has over 30 actively-developed UI frameworks, and let's not even get started on CMSs or game engines. And each language comes with its own dependency management or two, NPM discourages static linking & bundling dependencies until the very end, while some others only recommend dynamically linking widely-available dependencies & always bundling the remaining ones.
Software development is constantly evolving, and for most time there's no right or wrong approach. And when one approach is chosen over another, there's a reason for that. Imagine you just found a perfect library for your use case, but some idiot decided to only offer minified code with bundled jQuery? Or a different idiot made it impossible to have multiple versions of a dependency on your system without resorting to one of various third-party hacks?
Every language has a ton of various frameworks & libraries that ultimately do the same thing, every language has a bunch of design choices you probably don't understand at first, and every language was made with a purpose and the fact that you're using it proves it achieved that.
Last but not least, all devs had to learn about quirks in various languages, and they're fucking tired when someone who barely knows a language tries to act smart going "ahaha how the fuck 0.1 + 0.2 isn't 0.3".
rant