[nim-dev] Re: A few questions about Nim

  • From: brianrogoff <brogoff@xxxxxxxxx>
  • To: nim-dev@xxxxxxxxxxxxx
  • Date: Thu, 28 Jan 2016 23:12:39 +0000

**Jehan:** *The need for higher-kinded types can be obviated by having
higher-order modules (see, for example, the ML family of languages)*

They can, but I'm not so sure that pointing to this workaround is realistic. I
know a lot of OCaml programmers who'd argue against a functorized style of
programming, the same way that many argue that the OOP in OCaml is redundant.

In what way are Nim's modules higher order? That's news to me, tell me more!

Honestly though, having template template parameters (or generic generic
parameters in Nim speak) would be cleaner than some module based workaround.
The snippet I included is fairly obvious to most programmers. Nim is about
elegance.


**jester:** *Do you know any forum posts (or anything) where higher-order
modules are discussed/demonstrated?*

Higher order modules in ML are called functors.
http://caml.inria.fr/pub/docs/manual-ocaml/moduleexamples.html#sec20


Other related posts: