Skip to content

Commit 999314e

Browse files
committed
Draft plan and priorities for KCL 1.0
Signed-off-by: Nick Cameron <[email protected]>
1 parent 8bb8240 commit 999314e

File tree

1 file changed

+146
-0
lines changed

1 file changed

+146
-0
lines changed

one-point-oh.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# 1.0 plan and priorities
2+
3+
We don't have time for big changes or big features (dev time + time to marinate). We know vaguely where we're going (see other design PRs).
4+
5+
High level priorities:
6+
7+
- Stability and polish
8+
- bugs, performance, glitches, etc.
9+
- User experience
10+
- Goal: KCL is easy to read and comprehend
11+
- Feedback is useful (though perhaps not pretty)
12+
- IDE experience
13+
- Error messages (parser in particular)
14+
- Supporting core new features in engine, as required
15+
- Future compatibility
16+
- Not making tech debt worse
17+
- And ideally a little bit better
18+
19+
Related:
20+
21+
- [Modelling app roadmap](https://github.com/orgs/KittyCAD/projects/35)
22+
- [1.0 milestone](https://github.com/KittyCAD/modeling-app/milestone/2)
23+
- [CAD primitives roadmap](https://github.com/KittyCAD/modeling-app/issues/729)
24+
25+
Priorities in **bold**, dependencies in *italics*, task size in t-shirt sizes (taking into account breaking change management; m-l means uncertainty about which, not 'somewhere in between').
26+
27+
## As required
28+
29+
### Bug fixing
30+
31+
**P0**:
32+
33+
- high priority bugs as they emerge
34+
- plan to seek out and address lower-priority bugs during feature freeze
35+
36+
37+
### Non-language feature work
38+
39+
Priority follows from other team's priorities.
40+
41+
New or more flexible std lib functions and code mods are expected as side effects of other work.
42+
43+
New features which might require significant work:
44+
45+
- [Multiple profiles in Sketches](https://github.com/KittyCAD/modeling-app/issues/1876)
46+
- Assemblies?
47+
48+
49+
### Pre-paying technical debt
50+
51+
**P1**:
52+
53+
- Don't make things worse by adding hacks, especially around the API of KCL
54+
55+
**P3**:
56+
57+
- Supplying user-side IDs to engine
58+
- code mod API
59+
60+
61+
## Language priorities
62+
63+
**P1** (priority ordered):
64+
65+
- reserve keywords (s)
66+
- https://github.com/KittyCAD/modeling-app/issues/4486
67+
- and give meaning to underscore in identifiers
68+
- function args
69+
- named and optional args (m; *$0*)
70+
- only one non-named arg (m; *$1*)
71+
- ideally we make it the first arg, but doesn't have to be
72+
- could require it be called `self`, but I don't think we need to and that makes back-compat harder
73+
- simple tidying changes
74+
- automatic conversion of round floats to ints, remove the `int()` function (s)
75+
- record init: `:` -> `=` (s)
76+
- function decl: remove `=` and `=>`, `:` for type annotations (s)
77+
- return type syntax?
78+
- convert special strings (e.g., `END`, `XY`) to constants (s)
79+
- std lib
80+
- organise into modules (for docs, at least) (l)
81+
- potential issues: namespacing, collisions, receivers, name shadowing for std
82+
- ensure consistency, remove unnecessary or uncertain functions, check for anything we're badly missing (m)
83+
- *depends somewhat on $3, we should do this in any case, but how we do it will depend on whether $3 is achieved*
84+
- support optionally-implicit `%` in pipelines (m; *$2; depends on $1*)
85+
86+
87+
**P2** (priority ordered):
88+
89+
- std lib
90+
- remove use of anon records (l; *depends on $0*)
91+
- immutable model
92+
- well-defined rules for when engine calls cause a rendered object, add `construction` flag where necessary (m-l)
93+
- tagging
94+
- support `as` in pipelines (m)
95+
- remove `$` syntax (m)
96+
- where std lib functions take tags, ensure they're unambiguous and work with `as` variables (m)
97+
98+
99+
**P3** (priority ordered):
100+
101+
- std lib
102+
- reduce number of functions by using optional args (m-l; *$3; depends on $0*)
103+
- `var`/`roughly` syntax for unconstrained points/numbers (m-l)
104+
- changes how we do 'fixed point' constraints
105+
106+
107+
## Docs and education material
108+
109+
Planned for feature freeze period (**P3** until then). We should do some planning before-hand (**P0**).
110+
111+
- std docs
112+
- guide
113+
- reference
114+
- videos and other tutorial stuff
115+
116+
117+
## Open questions
118+
119+
- Tags (these might be things we want to change for 1.0), in particular the current approach of collecting all tags into a `tags` field and allowing users of the geometry to refer to internal tags seems sub-optimal:
120+
- source names are reified at runtime
121+
- construction (including tag names) of an object should be private by default
122+
- having a `tags` field violates the principle of tags being just variables
123+
- a more principled way to do it is `export` of variables, but this 'works' for block syntax sketches, not so much for pipelines, and not for deeply nested tags
124+
- Any other precautions we should take for future compatibility? Including (but not limited to):
125+
- higher order functions
126+
- used in `patternTransform` pattern function, `reduce` and `map`
127+
- are we happy committing to supporting higher order functions?
128+
- how would they fit into a type system?
129+
- Units of Measure
130+
- syntax (is `num id` valid syntax today?)
131+
- modules with units? (shouldn't be an issue since we only support imports within a project)
132+
- Are there things we want to 'tighten up'?
133+
- Indexing records (`foo['fieldName']`)
134+
- Implicit conversion from array to record (pretty sure this is unintentional and should not work)
135+
- Make arrays uni-typed?
136+
- `KclValue` top type? (IMO this is the internals of the implementation leaking into the surface syntax and should be removed)
137+
138+
139+
## Postponed
140+
141+
- [over-eager mutation](https://github.com/KittyCAD/modeling-app/issues/2728)
142+
- Performance or tech-debt work
143+
- point syntax (perhaps just change from `[]` to `()`? Or require `pt`/`vec`?)
144+
- [construction geometry](https://github.com/KittyCAD/modeling-app/issues/1553), implicit or explicit `show`
145+
- extensions to tagging
146+
- 'dynamic tagging', e.g., for edges of a `polygon`

0 commit comments

Comments
 (0)