Open alexmozaidze opened 9 months ago
The big problem here is that it will almost certainly conflict with existing identifiers in a large number of existing codebases. Until we have a mechanism to opt in to new built-in macros, I don't think we can introduce these as it will be a breaking change.
Having simple macros like
string?
,number?
,table?
,nil?
, etc. would increase the readability of code that may use them.The only thing I'm worried about is the existing
table?
in macro context. iirc, it checks if an AST node is a table literal, as opposed to runtime type of table. I think it wouldn't be unreasonable to rename AST checking macros to be:table-literal?
,sequence-literal?
, etc.