Am Dienstag, den 10.11.2015, 15:30 +0000 schrieb Soegtrop, Michael: > Dear Hendrik, > > > And of course, that C++ doesn't have first-class functions. Or has that > > changed recently? > > C++11 claims to be a functional language Hmmm, a language whose name is an assignment... > and supports anonymous functions and currying. That's only a small part of the story. I think more important is how much control a language gives you about side effects, and AFAIK C++ doesn't let you control much, and common programming practice goes into the opposite direction (e.g. think of stateful iterators). Gerd > But as you say: the syntax of types, especially function types, is rather messy in C/C++. > > > In any case, the problem with OCaml's apparent typelessness isn't that you > > don't have to write the types, it's that when you see someone else's code > > you can't read the types. > > I don't know how others handle this. I came to the conclusion that it might be a good compromise to write explicit types on interface functions and omit them on internal functions. But as newbie I can't tell how readable this is to others or to me in 5 years. > > Best regards, > > Michael > Intel Deutschland GmbH > Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Christian Lamprechter > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928 > > -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------