Interfaces for Abstract Types
I think this feature request has not yet its own issue although it has been discussed in e.g. #5. I think it would be great if we could explicitly define interfaces on abstract types. By interface I mean all methods that have to be implemented to fulfill the abstract type requirements. Currently, the interface is only implicitly defined and it can be scattered over several files so that it is very hard to determine what one has to implement when deriving from an abstract type. Interfaces would primary give us two things: - self documentation of interfaces at a single place - better error messages Base.graphics has a macro that actually allows to define interfaces by encoding an error message in the fallback implementation. I think this is already very clever. But maybe giving it the following syntax is even neater: ``` abstract MyType has print, size(::MyType,::Int), push! ``` Here it would be neat if one could specify different granularities. The `print` and `push!` declarations only say that there have to be any methods with that name (and `MyType` as first parameter) but they don't specify the types. In contrast the `size` declaration is completely typed. I think this gives a lot of flexibility and for an untyped interface declaration one could still give quite specific error messages. As I have said in #5, such interfaces are basically what is planed in C++ as `Concept-light` for C++14 or C++17. And having done quite some C++ template programming I am certain that s
Posted by tknopp on May 26, 2014, 7:43 PM
Tags
Related issues
- To be fair, Inform7 can't succeed, generally, because there is no market for the kind of games that you create with Inform7.
- > The notion that somehow LR reliability is misunderstood by Consumer Reports, JD Power, Car & Driver, Automobile etc.
- Custom trigger IDs are not displayed in the new 2026.10 trigger selector
- I hate that too, but I think it’s more the ux than the concept of a default.
- > The biggest problem with UX developers is they know better than you AND force you into their paradigm.
- "Focus follows mouse" is what I use to keep the file manager from popping up when click-dragging files.
Raise real-world problems, find people facing the same issue, and discuss solutions.9,500 issues0 comments
ux (Other)
To be fair, Inform7 can't succeed, generally, because there is no market for the kind of games that you create with Inform7.
> The notion that somehow LR reliability is misunderstood by Consumer Reports, JD Power, Car & Driver, Automobile etc.
Custom trigger IDs are not displayed in the new 2026.10 trigger selector
I hate that too, but I think it’s more the ux than the concept of a default.
> The biggest problem with UX developers is they know better than you AND force you into their paradigm.
"Focus follows mouse" is what I use to keep the file manager from popping up when click-dragging files.
The biggest problem with this is if the target URL doesn't load but also doesn't quickly error out, like e.g.
Google wants to build up a private web here.
Interfaces for Abstract Types
I think this feature request has not yet its own issue although it has been discussed in e.g. #5. I think it would be great if we could explicitly define interfaces on abstract types. By interface I mean all methods that have to be implemented to fulfill the abstract type requirements. Currently, the interface is only implicitly defined and it can be scattered over several files so that it is very hard to determine what one has to implement when deriving from an abstract type. Interfaces would primary give us two things: - self documentation of interfaces at a single place - better error messages Base.graphics has a macro that actually allows to define interfaces by encoding an error message in the fallback implementation. I think this is already very clever. But maybe giving it the following syntax is even neater: ``` abstract MyType has print, size(::MyType,::Int), push! ``` Here it would be neat if one could specify different granularities. The `print` and `push!` declarations only say that there have to be any methods with that name (and `MyType` as first parameter) but they don't specify the types. In contrast the `size` declaration is completely typed. I think this gives a lot of flexibility and for an untyped interface declaration one could still give quite specific error messages. As I have said in #5, such interfaces are basically what is planed in C++ as `Concept-light` for C++14 or C++17. And having done quite some C++ template programming I am certain that s
Comments (0)
No comments yet. Start the discussion.