Skip to content

Conversation

@rfourquet
Copy link
Member

Having the shortcut make(2, 3) for make(Array, 2, 3), which mirrors
rand(2, 3), is convenient, but the form make(Int, 2, 3) leads to
ambiguities for types which take 2 integer args, e.g.
make(MyType, 2, 3). Let's favor simplicity for custom-defined types.

Moreover, the terminology "make" makes sense when the first arg
refers to the type to be "made", e.g. in make(Int, 2, 3) we didn't
make an Int, but an array, so the meaning of "make" was lost.

@rfourquet rfourquet added the breaking this is a breaking change label Jul 13, 2019
Having the shortcut `make(2, 3)` for `make(Array, 2, 3)`, which mirrors
`rand(2, 3)`, is convenient, but the form `make(Int, 2, 3)` leads to
ambiguities for types which take 2 integer args, e.g.
`make(MyType, 2, 3)`. Let's favor simplicity for custom-defined types.

Moreover,  the terminology "make" makes sense when the first arg
refers to the type to be "made", e.g. in `make(Int, 2, 3)` we didn't
make an `Int`, but an array, so the meaning of "make" was lost.
@rfourquet rfourquet merged commit 8cdc98a into master Jul 15, 2019
@rfourquet rfourquet deleted the remove-shortcuts branch July 15, 2019 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking this is a breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants