News for hackers. Stuff that matters.
Re:OCaml at Bloomberg by paulddraper on Monday August 23, 2021 @05:04PM (#28281907)
No, the type system parameterizes on types.
Re:OCaml at Bloomberg by adamwk on Monday August 23, 2021 @06:08PM (#28282611)
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.
Re:OCaml at Bloomberg by jcelerier on Monday August 23, 2021 @07:04PM (#28283175)
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.
Re:OCaml at Bloomberg by jcelerier on Tuesday August 24, 2021 @01:37AM (#28285459)
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
Re:OCaml at Bloomberg by rixed on Tuesday August 24, 2021 @02:29AM (#28285718)
Never heard of static vs dynamic type checks ?
Re:OCaml at Bloomberg by jcelerier on Tuesday August 24, 2021 @02:42AM (#28285786)
Expressiveness of type systems is about which types (and thus type checks) you can express, not when the type checking occurs