Another argument in favor of types is that it will enable Python to optimize code better. But since Python isn't built for static typing, the CPython bytecode interpreter has no facilities for exploiting the extra information. And even if it had, the V8 Javascript VM proves that you dont need static types to generate optimized code.
Revenge of the Types
11–20 of 137 posts
Re: Revenge of the Types
#12Random question for the type experts out there: is there any language that lets me track the units of my numeric variables? For instance, something like this: float drop(float x0, float duration) { float x = x0; float t = 0; float v = 0; float g = -10; float dt = 0.01; while (t /1000 ); // abbrev for a cast: (float ).001 } Then I want the compiler to check that I'm not mixing up my units. It seems like this would be…
Re: Revenge of the Types
#13Random question for the type experts out there: is there any language that lets me track the units of my numeric variables? For instance, something like this: float drop(float x0, float duration) { float x = x0; float t = 0; float v = 0; float g = -10; float dt = 0.01; while (t /1000 ); // abbrev for a cast: (float ).001 } Then I want the compiler to check that I'm not mixing up my units. It seems like this would be…
Re: Revenge of the Types
#14Random question for the type experts out there: is there any language that lets me track the units of my numeric variables? For instance, something like this: float drop(float x0, float duration) { float x = x0; float t = 0; float v = 0; float g = -10; float dt = 0.01; while (t /1000 ); // abbrev for a cast: (float ).001 } Then I want the compiler to check that I'm not mixing up my units. It seems like this would be…
Check out F#'s units of measure. http://msdn.microsoft.com/en-us/library/dd233243.aspx
Edit: removed unrelated Wikipedia article (Unit Type)
Re: Revenge of the Types
#15Random question for the type experts out there: is there any language that lets me track the units of my numeric variables? For instance, something like this: float drop(float x0, float duration) { float x = x0; float t = 0; float v = 0; float g = -10; float dt = 0.01; while (t /1000 ); // abbrev for a cast: (float ).001 } Then I want the compiler to check that I'm not mixing up my units. It seems like this would be…
Re: Revenge of the Types
#16Earlier quoted context omitted.
Check out F#'s units of measure. http://msdn.microsoft.com/en-us/library/dd233243.aspx
I've got to confess that I love how the design of MS languages regularly exposes my ignorance towards them. Edit: removed unrelated Wikipedia article (Unit Type)
Re: Revenge of the Types
#17Earlier quoted context omitted.
I've got to confess that I love how the design of MS languages regularly exposes my ignorance towards them. Edit: removed unrelated Wikipedia article (Unit Type)
Unit type is completely different concept in the functional languages. It does not track units and measures.
Re: Revenge of the Types
#18Re: Revenge of the Types
#19Random question for the type experts out there: is there any language that lets me track the units of my numeric variables? For instance, something like this: float drop(float x0, float duration) { float x = x0; float t = 0; float v = 0; float g = -10; float dt = 0.01; while (t /1000 ); // abbrev for a cast: (float ).001 } Then I want the compiler to check that I'm not mixing up my units. It seems like this would be…
Re: Revenge of the Types
#20Random question for the type experts out there: is there any language that lets me track the units of my numeric variables? For instance, something like this: float drop(float x0, float duration) { float x = x0; float t = 0; float v = 0; float g = -10; float dt = 0.01; while (t /1000 ); // abbrev for a cast: (float ).001 } Then I want the compiler to check that I'm not mixing up my units. It seems like this would be…