Skip to content

Added "base types" to extension types. #41

Closed
wants to merge 1 commit into from

1 participant

@jmalloc
Eloquent member
jmalloc commented Jan 23, 2013

This allows for a syntax whereby an extension type is literally an extension to an existing type.
For example, in the constraints library I am writing I would like to be able to constrain an integer to a certain range,
the syntax extension in this pull requests allows the following:

@param integer:Constraint { min: 0, max: 200 }

I think this is quite expressive and allows for even greater flexibility. The previous syntax remains:

@param :Constraint { min: 0, max: 200 }

In this case, the "base type" simply defaults to a MixedType.

@jmalloc jmalloc Added "base types" to extension types.
This allows for a syntax whereby an extension type is literally an extension to an existing type.
For example, in the constraints library I am writing I would like to be able to constrain an integer to a certain range,
the syntax extension in this pull requests allows the following:

    @param integer:Constraint { min: 0, max: 200 }

I think this is quite expressive and allows for even greater flexibility. The previous syntax remains:

    @param :Constraint { min: 0, max: 200 }

In this case, the "base type" simply defaults to a MixedType.
c9e98ea
@jmalloc
Eloquent member
jmalloc commented Jan 23, 2013

Closed in favour of #42.

@jmalloc jmalloc closed this Jan 23, 2013
@jmalloc jmalloc deleted the unknown repository branch Jan 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.