this post was submitted on 08 Sep 2023
530 points (94.0% liked)

Programmer Humor

19187 readers
1299 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 22 points 1 year ago (11 children)

I'm kind of a beginner... Can someone explain why you would make/use/have a dynamically and/or weak typed language? Is it just to not write some toInteger / as u64 / try_from()? I mean the drawbacks seem to outweigh the benefits...

[–] [email protected] 12 points 1 year ago* (last edited 1 year ago) (7 children)

If you are writing small and simple apps it will give you more velocity and much less boiler plate.

As apps grow it becomes harder to keep track of things and can quickly grow into a mess. You then start to need external tools to give you the features of a strong static type system.

Also from a web point of view you don't want the website to crash and burn with every error. JS will power through things like invalid types. Imagine if any error caused the website to just stop.

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

But a statically typed language would catch those errors before it even compiles...

[–] [email protected] 3 points 1 year ago

The fact it doesn't need to be compiled is also a big reason why it's used on the web.

But I absolutely agree. I'm not a fan of dynamic typing at all.

load more comments (5 replies)
load more comments (8 replies)