Re:OCaml at Bloomberg
by paulddraper on Monday August 23, 2021 @05:04PM
(#28281907)
No, the type system parameterizes on types.
[ Parent
| on HN ]
People are downvoting but the GP's point does not really have anything to do with type systems. I think this example is closer to macro expansion than a typesystem.
How is paramerization of types on values not a typesystem-level property ? There's definitely nothing akin to macro expansion involved since you can do type-level computations that way
Re:OCaml at Bloomberg
by throwaway17_17 on Monday August 23, 2021 @07:32PM
(#28283398)
Iām pretty sure the implication is that since template instances are made specific at compile time and are done so in a way that is very analogous to AST based macro expansion. Specifically, C++ templates are a programming language which runs during the compilation of C++ code that acts by producing valid C++ AST components.
I have never seen a definition of type system which cares about things being done at compile-time or runtime, or that there even is a compile-time or run-time
Never heard of static vs dynamic type checks ?