You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some recurring design patterns in Julia that could benefit from becoming formal language constructs:
Delegation: You build a type that wraps another type. For example, you build a Corpus composite type, which is a collection of Documents stored in an Array along with some metadata. You'd like to delegate functions like size, length and ref to fields of this composite type. Some basic examples are shown below.
Interfaces: Often, we use abstract types like OO languages would use interfaces. This raises a few difficulties: the foremost is that we don't provide any mechanism for insuring that a subtype of an abstract type fully implements a specified interface.
Examples of a @delegate macro: @delegate Corpus.documents size length ref.
Some recurring design patterns in Julia that could benefit from becoming formal language constructs:
size
,length
andref
to fields of this composite type. Some basic examples are shown below.Examples of a
@delegate
macro:@delegate Corpus.documents size length ref
.Examples of an
@interface
macro: https://gist.github.com/pao/2432554The text was updated successfully, but these errors were encountered: