On 05/10/13 01:55, deadalnix wrote:
D has some really serious flaw when it come to functionnal style.

Really?  That's a shame. :-(

  - Function aren't first class.
  - Delegates break type system.
  - Immutable object have identity issue that wouldn't show up in a functional
language. It is unsure what the semantic around them is (and if identity must be
preserved, then functional style is badly impaired).
  - Many qualifier do start to not make any sense when using functions as
arguments (inout for instance).
  - Expect for type qualifier, it is impossible to express return qualification
depending on the input(s qualification (and see point above, that do not work
when using first class functions/delegates).

On implementation side, heap allocated values aren't optimized to go on the
stack, ever. And the GC is unable to take advantage of immutability. Note that
because everything is immutable in functional programming, both are mandatory if
you don't want to trash your performances.

How much of this is actually a language problem (I imagine the first-class functions and delegate issues are) and how much is to do with implementation?

Reply via email to