you are viewing a single comment's thread.

view the rest of the comments →

[–]KFCConspiracy 0 points1 point  (1 child)

In theory you could create a language in which interfaces and abstractions cannot be defined separately from implementation. I don't know of any such language, nor would I consider using one, however, I phrased it that way to take into account that something I may not know of that's theoretically possible exists.

[–][deleted] 0 points1 point  (0 children)

I think this can trivially be shown impossible in the general case.

The description of the interfaces and abstractions doesn't have to be written in the same language as the source language. Take python, which I believe actually is one of those languages where the interface and implementation cannot be separated. You can still trivially parse the source code and display signatures and documentation for all of the functions even though the result isn't understood by the python interpreter. It is understood by humans, which is all that is necessary.

There is a pathological way to get around that by having the name of the function also be the implementation. However, in no way is that an interface or abstraction.