On Thursday, 14 March 2013 at 05:12:51 UTC, Maxim Fomin wrote:
On Thursday, 14 March 2013 at 03:12:21 UTC, deadalnix wrote:
From " UFCS as delegates": example with function foo(ref uint
a) raises concern about ABI implementation. Currently context
pointer is passed through RDI and arguments are passed
differently. There would be a problem with functions like
foo() which do not know from where to take an argument - are
they called directly or like a closure?
I don't think ABI should be part of D spec. Or should it ?
Anyway, I don't see any reason to have all kind of different
ABI for function call, and this is a good opportunity to unify
everything using the context as a regular, first argument.
ABI, at least partly, is and should be part of the spec.
Otherwise it has some of the C++ problems. And the point was
not about ABI in a sense of adding piece of information to
chapter in dlang.org, but about implementing compiler. I am not
enthusiastic about most DIPs presented recently because 1)
without Walter and Andrei approval 2) without somebody willing
to implement it, DIP turns to be a paper intellect exercise and
corresponding ideas defence in the forum.
Timon Gehr and I are working on compiler. This isn't intellectual
masturbation.
As of ABI, it is right now insufficiently defined to have a
situation different than C++'s.
The problem is that there is 1 qualifier in current syntax and
two underlying objects.
Exactly. And theses are using different (and opposite) rules for
implicit casts.