Should we add `a * b` for vectors?
Joakim
dlang at joakim.fea.st
Thu Oct 5 22:44:34 UTC 2017
On Thursday, 5 October 2017 at 19:40:05 UTC, Walter Bright wrote:
> 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.
The impression I have, correct me if I'm wrong, is that users-
and since you're writing a compiler, your users are developers
themselves- pay no attention to simplicity and principles and
expect software to always guess correctly about whatever they
intended, similar to how dmd offers spelling suggestions for
other functions when you typo a function name.
Sometimes this is possible in simple, non-invasive ways like
spelling suggestions, but you will go mad trying to create and
maintain a complex system that mirrors their contradictory
expectations. Without having delved into the complex import
lookup scheme you and Martin set up, I agree with Timon that
someone should try to boil it down to some simple principles
again.
More information about the Digitalmars-d
mailing list