[Enhancement] KCL user interface simplification and consistency including grammar and sematic #341
Labels
grammar
lang-design
Issues or PRs related to kcl language design and KEPs
long-term
semantic
Issues or PRs related to kcl semantic and checker
Background
The current KCL syntax and semantics are complex. In order to further improve the usability of KCL, ensure logical consistency, and reduce the difficulty of getting started, it is necessary to simplify the functions that are not commonly used in KCL according to the scenarios, and support more use scenarios with the least language features.
Overview
The simplification of KCL can be mainly divided into three aspects:
Consistency improvement
Grammar simplification
Semantic simplification
Goals
Simplification List
lambda x: int, y: int -> int
=>lambda [x: int, y: int] -> int {...}
name: "Alice"="Alice"
, which is easy to cause confusionany
type andany
keywords have the same name, which is easy to be confused._x
represents hidden (will not output to YAML/JSON) and mutable, perhaps there is a better distinction between these two points in terms of language, French, and semanticsmetadata.name = "123"
v.s.metadata: name: "123"
.In pkg, file1 and file2 are not visible to each other. In other words, when compiling file2, the definition in file1 cannot be used directly.
But if import pkg in file3, file2 and file1 are visible to each other
as
keyword need further clarification and clarification. Theas
keyword should consider both type guarding and runtime type conversion assertionsPrinciples for Redesign
A Possible Redesign
Grammar
The text was updated successfully, but these errors were encountered: