What do you prefer between the two?
I personally like loose typing because I don't have to worry about the type of data I am using. This prevents a lot of errors as well.
For instance, in JavaScript, 1.0 and 1 are equal and I don't have to worry about int, long int, double etc like we have to in a strongly typed language. Wouldn't care about overflow errors as well.
I think there are pros and cons on either side.
Loose-typing, in my opinion, is more about making the developer's life easier; less choice = less worry. But the downside is that optimisations are hard to perform on variable data types by the runtime. Not to mention the bugs that arise from type changing.
Strong-typing is a pain at times. But it does lend itself really well for spitting out performant and optimised code. Also, bugs specifically related to data type changes are few and far between here.
That being said, I've spent far too much with loosely typed languages that it almost feels like home, so that's where my vote is going to go. π
I kinda think diversity is key. I went for loosely typed because that's what I have been working with for a long time.
I see programming languages as a tool. The end goal is work/creation. That's all there is to it. And the question of which tool is 'optimal' has so many variables in it that I do not think anybody on this planet can answer clearly.
You have not discovered the beauty of TypeScript then: typescriptlang.org
Jason Knight
The less code you use, the less there is to break
PREVENTS errors?!? Where in the name of Wirth did you get that bloody idea? Loose typecasting CREATES errors all the damned time in damned near every language that does it!