Skip to content
This repository was archived by the owner on Jun 14, 2022. It is now read-only.

Ignorable _ #15

@shviller

Description

@shviller

_ is traditionally used to denote an ignored argument/variable, and it frequently makes sense to have more than one:

function(_,_) return 0 end

So throwing

[Error] This variable will overwrite another same-named variable in the same scope

in this case is somewhat counterproductive.

I would've preferred to declare the function in question as function() return 0 end in the first place, but that opens a whole new can of worms, since neither

(function(integer, integer) --> integer) | (function() --> integer)

nor

function(...:integer) --> integer

are valid types. And

function() --> integer

is not a subtype of

function(integer?, integer?) --> integer

either.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions