[M3devel] null type?

Rodney M. Bates rodney_bates at lcwb.coop
Thu Apr 25 19:36:11 CEST 2013



On 04/25/2013 08:20 AM, Hendrik Boom wrote:
> On Wed, Apr 24, 2013 at 09:06:32PM -0700, Darko wrote:
>> You're wrongly suggesting I object to single valued to single value types.  Read what I wrote, there's no such implication or logic since I'm discussing a special case. What I object to is the confusion created by allowing the use of the NULL typed variables in particular, evidenced by the error. It's not any more difficult to outlaw variables of NULL anymore than it is to outlaw the use of empty types.
>>
>> The type system and its mathematical simplicity is not affected by what the compiler deems acceptable, you still have the NULL type defined as before. The issue is acceptable variable declarations.
>>
>> Anyway, it's an idea. If you don't like it ignore it. If someone threatens to implement it, take it up with them, I'm sure they'll enjoy the discussion.
>
> Could the problem be just with NULL-typed variables where the NULL type
> is not mentioned explicitly in the declaration?
>
> These might merit a warning.
>
> By the way, what is done with
>     VAR x := 1;
>

No, the type of 1 is INTEGER, and the type of 1L is LONGINT.

But you could make something like that happen with
CONST OneOnly : [1..1] = 1;
VAR x := OneOnly;

> Is x implicitly of type 1:1?
>
> -- hendrik
>




More information about the M3devel mailing list