I like having the export with the function/data; good to know I'm looking at something that escapes into the wild.

But I also like to know what contract the file has simply by looking at the top of the file.

Allow an optional statement, for example `contract`, with only names and not definitions. If the contract statement exists then any/all names in the contract must be exported from the file, otherwise there's an error. In addition, if something is defined with export then it is an error if it does not appear in the contract,  For example,

   vim9script
   contract f1, f2
   export def f1
   enddef
   export def f3
   enddef

The above has two errors. f2 is in the contract, but not defined. f3 is exported, but is not in the contract.

Note the word `export` could be re-used instead of adding a new keyword.

-ernie

(I am unable to file a feature request on github. Cockpit error or ???)

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/db63e88a-0a51-04a8-8f6d-63cea40a0cc5%40raelity.com.

Raspunde prin e-mail lui