Re: [vhdl-200x] Implicit conversion, Overloading, & Strong Typin g


Subject: Re: [vhdl-200x] Implicit conversion, Overloading, & Strong Typin g
From: Evan Lavelle (anti.spam1@dsl.pipex.com)
Date: Fri Dec 19 2003 - 01:27:11 PST


Hamish Moffatt wrote:
> Bailey, Stephen wrote:
>
>>>> We actually discussed an alternative way to arrive at the same
>>>> functionality. Since people seem to be hung up on this
>
> [..]
>
>>>
>>> I don't agree. The "cond" operator is certainly just an example of
>>> the overloading that VHDL already has - the implicit call is IMHO
>>> unrelated, and the part that most object to.
>>
>>
>> Both Jim and I have attempted to demonstrate how this is nearly
>> identical to operator overload resolution. I'm sorry we have failed
>> to convince you that it is. I can't think of any better examples.

The problem is that you've had to invent invisible operators in order to
make the argument. Overloading clearly has the potential to break the
benefits of a strong typing system, but it's controllable because it
only applies in a very limited context. However, the proposal
effectively wants to overload certain *expressions*, in certain
contexts. This is clearly unacceptable - overloading expressions has no
meaning, and would be dangerous if it was possible - and so you've
invented invisible operators to do it. It's ingenious, but it's just a
formalism which gives you exactly the same effect. If you want this
effect, you should just say so, and say that the typing rules should be
relaxed in conditionals. This does exactly the same thing, and saves the
hassle of adding new invisible operators to the language.

Evan Lavelle



This archive was generated by hypermail 2b28 : Fri Dec 19 2003 - 01:29:37 PST