~sircmpwn/hare#663: 
Consider making subtyping explicit

e.g. via a new keyword or something

type my_stream = struct {
    vtable: subtype io::stream,
};

Dunno about the specific syntax

Status
REPORTED
Submitter
~sircmpwn
Assigned to
No-one
Submitted
2 months ago
Updated
2 months ago
Labels
idea

~yerinalexey 2 months ago

Is there a problem/bug caused by implicit subtyping?

~sebsite 2 months ago

I found a discussion about this in my IRC logs. Here's an example given of how the implicit behavior could cause a subtle error: https://pastebin.com/raw/6bRqkJEB

There were discussions on restricting viable subtypes to user-defined types or structs, but none of those options work very well. Explicit syntax seems like the best option here IMO, especially since preferring explicit behavior to implicit behavior is one of the design principles of Hare.

Register here or Log in to comment, or comment via email.