-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reserve more keywords in KCL #4486
Comments
My inclination is to not special-case things, keep things simple, and go with option 1. Update: |
IMO, import should become a full keyword too. |
For |
Before 1.0, we'd like to reserve more keywords so that users don't use them as variable names.
This is the list that was proposed:
_
(underscore)as
new
interface
type
record
struct
object
I think we should add to this list:
self
Pipelines, tagging, and for loops kcl-experiments#15array
- Could be a runtime conversion function or the type. We already support optional type annotations, likestring
,number
, andsketch
. We use[]
for the type, but it still may be useful to refer to the type or constructor by name.Should we consider others? Here's JavaScript's and Python's.
implements
to use the interface?data
,datatype
, orenum
;match
,case
, orswitch
.do
oryield
? Constraints design doc kcl-experiments#20These will not be reserved:
from
- It's used inimport
statements, but because of the syntax chosen, it's unambiguous. This will likely be used for named parameters.The text was updated successfully, but these errors were encountered: