Are there any plans to simplify the language? #8062
artsiommiksiuk
started this conversation in
Language Suggestion
Replies: 1 comment 1 reply
-
Hey @artsiommiksiuk can you explain a little more on how the syntax affect you as an emitter? The emitter do not see(shouldn't) the AST but the rendered type graph. In there templates, aliases are resolved to a common type as if they were written directly. See this playground showcasing 3 ways to construct a model with a stirng prop, in the type graph they all resolve to a very similar model type model Test1 {
name: string;
}
model Template<T> {
name: T;
}
model Test2 is Template<string>;
alias strAlias = string;
model Test3 {
name: strAlias;
}
![]() ![]() ![]() |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As an emitter writter I'd like it to be as simple as possible to write it. This requires as simple language as possible. While I understand that language expressivness requiers some complexity, I think current iterration of TSP is too complex to write emitters effortlessly. Meaning parsing all possible syntatic constructions is quite a burden atm.
alias
andis
kewords instead of justtype X = Y
, or TypeScript like ADTs.type X<T> = T
. Same construction with additional parameter.types - as means to model serialazable data points. Here goed standard typescript types capabilitied with just added possibilty to apply decorators onto them.
operations - as the means for communication, or simple message passing entrypoint.
packaging - namespaces (I don't like it much and prefer js/ts way of importing exporting stuff) and files.
[hierarchy modeling] - necessary for more OO style, which is why models as a separate keword probably fine, but I'd probably then stick to
type A extends B = C
.Point being, language surface is too large (relative to proposed idea) already to be considered easy enough to write emitters left and right.
I understand that development of such things is not an easy process, that's why I hope that language core wouldn't grow, and better - shrink instead. I've decided to write this because saw another discussion about composing decorators and there where new keyword and syntax proposed, which got me worried even more.
Beta Was this translation helpful? Give feedback.
All reactions