An Interface Is a Set of Functions
codestyleandtaste.com·2d·
Reactive Programming
Preview
Report Post

This article is not about your codebase. None of this is likely to apply to you, but it might be fun to see a different viewpoint. In this article, interfaces aren’t for abstracting but for being able to do work on types with wildly different behavior.

An interface is a type that describes a set of virtual functions. Usually, the interface has no implementation, but some languages allow it, which enables you to report a generic error for anything not implemented. Many people consider interfaces as an abstract object, such as a generic collection. Now, why a person may want to insert values into a collection that could be a queue, a stack, or a set, all of which iterate differently, and may not keep duplicate values? I don’t know, but more than one language has a collection int…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help