News for hackers. Stuff that matters.
Re:Use Your Type System by Spivak on Thursday July 24, 2025 @02:26PM (#44674268)
Well yeah, because variables in what you consider to be a strongly typed language are allocating the storage for those variables. When you say int x you're asking the compiler to give you an int shaped box. When you say x = 1 in Ruby all you're doing is saying is that in this scope the name x now refers to the box holding a 1. You can't actually store a string in the int box, you can only say that from now on the name x refers to the string box.

There are no comments on this comment yet.