You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think null is actually a useful construct to have since it shows up a lot in C++/TS programming. Thoughts on what type it should have (I think it should be AnyTyp: anything can be null, but it doesn't interact with anything)?
Null is famously the billion-dollar mistake, so I think it's worth being careful about whether/how to add it. In particular, I don't think it's necessarily the case that something that shows up pervasively in C++/TS necessarily needs to be represented in Gator.
As sort of a follow-up to #97 (comment), consider this: you don't have to write code exactly the same way in Gator as you do in C++ or TypeScript. Idioms that make perfect sense in "real" C++ might not need to be duplicated in Gator code that you intend to compile to C++. Instead, the philosophy could be that you write Gator code in an idiomatically Gatory style—then, the compiler takes care of implementing that code in a way that works in the target (GLSL or TypeScript or C++). If the generated code needs to use null (for example), then so be it. But the higher-level, geometrically-focused source code in Gator might not need to.
Gator does not have a null keyword, but it is required for TypeScript, such as in functions that take in null as a parameter.
Current workaround:
declare void null
, which itself is a bug because it does not make sense for a variable to have type void.The text was updated successfully, but these errors were encountered: