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
-
Dynamic typing appears to suck donkey balls. And for such reasons, I have no idea beyond "ooh, shiny" why PHP gets hate while JS gets love.
-
inaba46256y@d4ng3r0u5 neither python nor java script has this issue though. Running that in both languages will produce false
-
(friendly reminder that this problem doesn't occur in Python and JS and if you really hate dynamic typing both have static typing compatibility)
-
VinzuSama246yYeah, bashing PHP with "==" use instead of "===" and using "md5" which everybody knows is deprecated... Haha so funny and soooOOooo original.
-
for-Each5396yI just come here to look at the salty comments. Only developers can get so irritable over a post pointing out an obvious flaw. 😂😂
-
Meta33866yThis is a follow-up to the original tweet btw, for those interested:
https://twitter.com/dEnergy_dTime/... -
@d4ng3r0u5
I'll take you up on this one.
Weak typing sucks. I am originally a Haskell dev, working on aerospace & chem applications -- I love my types.
What does dynamic typing offer? Shortcuts. Less code to write. (Of course we have replaced typing systems with unit tests in those cases... but they are hardly mandatory).
Strongly/thoroughly typed languages such as Haskell and Rust are slow to develop in. Excruciatingly slow!
They are not prototyping languages. They are not Ruby, Python, PHP or Javscript -- you can't easily poop out a versatile web backend in an afternoon.
So why is PHP more hated than JS? Both are weak after all! JS is even weaker than PHP...
It's because languages aren't one-dimensional, it's not just weak vs strong.
It's because PHP is BOTH rigid and brittle, while JS is soft and malleable.
Strongly typed languages might be beautiful strong unyielding Marble, but for quick mockups Clay is still more useful to a sculptor than brittle Limestone. -
@forE
And to extend the material analogy:
No sculpting substance is absolutely superior (yet?).
Some are inferior for almost all purposes, and have been phased out. Basic is like cardboard, Fortran is like asbestos -- pays well, but bring your respirator.
Some seem superior for a while, but have surprising drawbacks. Don't build a whole skyscraper out of clay... at least not the foundation.
We have not even scratched the surface of what is possible. Golang, in my opinion, is like 3D-printed plastic. Not the best type system, sometimes it breaks, but it's both rapid, relatively strong and quite versatile.
Many languages are shifting. Java was concrete -- uglier than marble, but such a strong and mature standard language.
Yet people aren't "done" -- Kotlin has evolved out of Java to give it a bit of that JS malleability while mixing in some tough Scala, Groovy and C#-fiber.
We're trying to build space elevators... and it takes time to invent our carbon nanotube languages! -
Why are some people here bitching about md5? The hashing algorithmus you use in this example does not matter at all...
-
And JS has some real silly == conditions that "don't make sense". Welcome to programming.
-
inaba46256y@UnDeAdYeTii At least with JS's == the madness makes more sense than "these strings start with 0e so therefore we cast them to floats and because they contain non-number we can't parse them so let's just make it 0".
Type juggling is one hell of a drug -
@bigus-dickus you know there are reasons to use md5 that don't involve password hashing.
-
@VinzuSama md5 is deprecated. But not everybody knows it. Or some don't care. Let's remember there are still people out there who email you a plain text password when you forget it! And even more who watch "how do I make a login system safe?" Videos from 10 years ago, use MD5, no salt, and call it good until they get hacked.
Md5 should never be used anymore. But unless you can purge it from the internet, this is semi relevant.
Php is amazing. ☺
joke/meme