Skip to content

Commit c6c39a1

Browse files
committed
More editing on fn-star-talkin-bout-my-generation
1 parent 59e4fa6 commit c6c39a1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

_drafts/2025-09-07-fn-star-talkin-bout-my-generation.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The primary classes involved in function code generation are:
1616
<img src="{{site.baseurl | prepend: site.url}}/assets/images/objexpr.png" alt="Graph of all types related to ObjExpr" />
1717

1818
I have no idea why `ObjExpr` and `ObjMethod` are named what they are.
19-
`FnExpr` is the AST node that represents an `fn*` form. `FnMethod` represents an `invoke` method of the generated class.
19+
`FnExpr` is the AST node that represents an `fn*` form; `FnMethod` represents an `invoke` method of the generated class.
2020
`NewInstanceExpr` represents a `deftype` or `reify` form; `NewInstanceMethod` represents a method of the generated class.
2121
For these, a significant amount of code lies in the base classes `ObjExpr` and `ObjMethod`. We will focus here on `FnExpr` and `FnMethod`. Most of this analysis applies to `NewInstanceExpr` and `NewInstanceMethod` as well.
2222

@@ -33,9 +33,13 @@ Note: Do not confuse `NewInstanceExpr` with `NewExpr` -- the latter represents a
3333
| FnMethod.cs | 458 | 157 |
3434
| NewInstanceMethod.cs | 321 | 117 |
3535

36-
Doesn't seem like much? It's packed. And dependent on a some other goodies that we will get to shortly.
36+
Doesn't seem like much? It's packed. And dependent on a some other goodies that we will get to in due course.
3737

3838
## Out of control
3939

40+
If you try to track the flow of data in the parsing and code generation, particularly with respect to functions, you will soon find yourself in a pit of despair. I am going to ignore that aspect of the code for now.
41+
You can get the details in the upcoming [C4: Out of control][TBD] post.
42+
43+
What is important for now is to know that, by whatever obscure means, the parsing of forms in the methods of an `fn*` collects information that eventually is folded into either the `FnMethod` or the `FnExpr` instance that is being generated.
4044

4145

0 commit comments

Comments
 (0)