On 10/5/2017 6:13 AM, Steven Schveighoffer wrote:
On 10/3/17 10:00 PM, Walter Bright wrote:
On 10/3/2017 5:24 PM, Steven Schveighoffer wrote:
It also can be cheaper to pass a small struct by value.
Should not be a problem if the compiler inlines it.
That's not always possible.
Right. But then the question becomes how much more complexity do we want to add
chasing that last percent of perfection?
For example, right now I'm in my 3rd day of attempting to resolve
https://issues.dlang.org/show_bug.cgi?id=17635
which is a regression brought about by layers and layers of fixes over time for
a seemingly simple issue - implicitly converting a unique return from a pure
function into an immutable.
For another example, it took Martin and I months to implement the new import
lookup scheme. It turned out to be fairly complicated, and there were many
regressions. There are probably still issues lurking in it.
We need to keep the language rules simple enough to understand and simple enough
to implement, and there will be compromises with that.