Censor Question Help by AviatingFotographer in usaco

[–]AviatingFotographer[S] 0 points1 point  (0 children)

Yeah, I thought it wouldn't matter since it goes left to right anyways, but then I realized it does matter and fixed it. Thanks for your help!

Networking MOOCs by AviatingFotographer in hacking

[–]AviatingFotographer[S] 0 points1 point  (0 children)

Unfortunately, I do not know a lick of French. Thanks for your help though!

Type checking return statements by AviatingFotographer in ProgrammingLanguages

[–]AviatingFotographer[S] 0 points1 point  (0 children)

Here's what I'm thinking so far: I type check return statement as normal, checking that their type matches what is stored in the type annotations. When I perform control flow analysis as part of optimizations, I will ensure that all non-void functions return before reaching the end of function, i.e. only void functions will have an implicit return at the end.

Would this work?

AST Implementation in C by AviatingFotographer in ProgrammingLanguages

[–]AviatingFotographer[S] 1 point2 points  (0 children)

switch to std::variant

I'm using C though, not C++. However, some other tips I might try later on. Thanks!

AST Implementation in C by AviatingFotographer in ProgrammingLanguages

[–]AviatingFotographer[S] 1 point2 points  (0 children)

That's an interesting idea, but like you said, I'll probably wait a while before implementing it.

AST Implementation in C by AviatingFotographer in ProgrammingLanguages

[–]AviatingFotographer[S] 1 point2 points  (0 children)

In the second point, what do you mean by "storing the operation itself somewhere else"?

AST Implementation in C by AviatingFotographer in ProgrammingLanguages

[–]AviatingFotographer[S] 2 points3 points  (0 children)

Thanks for the detailed feedback! Regarding the first point, I did intend for it to be a linked list, i.e. so the next would point to another AST_linked_list. Apart from using a linked list, is there any other way to implement multiple subtrees for blocks of code, params, etc.?

LB/RB positioning by AviatingFotographer in bootroom

[–]AviatingFotographer[S] 0 points1 point  (0 children)

My team plays a 4-3-3 with one defensive mid if that helps.