Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Leandro Severino
Leandro Severino
12,674 Points

How does loosely typed Languages allocate memory for variables?

How does loosely typed Languages allocate memory for variables?

From some article online:

// start quote

You may be asking yourself, “But how will the computer know how much memory to allocate for that variable?”. The answer is that it just allocates “a lot” of memory.

“But doesn’t that have the potential to be wasteful? For example, we wouldn’t need more than one byte to store the age of a human.”

Yes, it does have the potential to be wasteful. This is the disadvantage to weakly typed languages.

But the thing is that computers these days have so much memory and are so fast that the wastefulness often ends up not mattering. This is a key point.

// end quote


SRC >> https://www.google.com/search?q=How%20does%20loosely%20typed%20Languages%20allocate%20memory%20for%20variables%3F