Skip to content
This repository was archived by the owner on Sep 9, 2019. It is now read-only.

Conversation

@thekid
Copy link
Contributor

@thekid thekid commented Sep 20, 2015

PHP

The syntax is callable as per https://wiki.php.net/rfc/callable. Supported in parameter and return types.

XP Language

The syntax is {signature -> return} where signature is either ? (any number of parameters), T (one parameter of type T) or ([T1[, T2[, ...TN]]). Supported in parameter and return types.

public {? -> int} adding() { }
public {() -> int} adding() { }
public {Collection -> int} counting() { }
public {(Collection) -> int} counting() { }
public {(string[], string) -> Map<string, string>} grouping() { }

@thekid thekid added the php label Sep 20, 2015
@thekid thekid changed the title Add function type syntax for XP language Add function type syntax Sep 20, 2015
thekid added a commit that referenced this pull request Sep 20, 2015
@thekid thekid merged commit 9345381 into master Sep 20, 2015
@thekid thekid added the feature label Sep 20, 2015
@thekid thekid deleted the feature/function-types branch September 20, 2015 17:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants