Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Optional support... in the parser#137

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
alexsnaps wants to merge2 commits intocel-rust:master
base:master
Choose a base branch
Loading
fromalexsnaps:optional

Conversation

alexsnaps
Copy link
Contributor

@alexsnapsalexsnaps commentedJun 12, 2025
edited
Loading

These few commits add support for the optional syntax (?) in the parser and AST nodes. Now, as it turns out, the golang implementation hasatype Optional struct, whichimplementstype Val interface...

So I can either "hack" that in the current interpreter (i.e. probably short-circuit interpretation, and "early" returnNull), or... I guess it's what I'd recommend anyways, I start revisiting the whole type system. Which also leads me to bunch of questions. Including the need forValue to own "thread safe" values... I never really got why this is dealt with at that level in the "graph". As a CEL expression is to be immutable (modulo some cases e.g. the accumulator in macros), and even if an expression is to be shared across thread for concurrent execution, wouldn't it be theContext that should be thread safe, and can't we consider the expression as immutable, possibly the expression being reference counted?

Anyways, I guess I'm opening quite a can of worms here. But I think I'd be tempted to start exploring revisiting the type system, leave thread-safety aside, if only for now. There, my first question becomes: should we go fordynamic dispatch (i.e. have a it all model with traits) or would it be nice to keep things as concrete as possible? I feel the go implementation has a bit of "interface derangement syndrome", but it might also all be for a good reason...

Signed-off-by: Alex Snaps <alex@wcgw.dev>
Signed-off-by: Alex Snaps <alex@wcgw.dev>
@alexsnaps
Copy link
ContributorAuthor

Openeda discussion on a related subject.

@alexsnapsalexsnaps mentioned this pull requestJun 16, 2025
10 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@alexsnaps

[8]ページ先頭

©2009-2025 Movatter.jp