-
-
Notifications
You must be signed in to change notification settings - Fork 224
Add flags and metadata #21
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
No, why do you want so much compile-time information in there? That would be very bad for performance. We want to leave |
The question is whether you are trying to put in enough flexibility to allow people to experiment with the library without modifying it (and potentially breaking other users). I understand your approach to leave all features until you need them... it is a consistent approach as long as you know how you would design it later. I am not about to go and design a DSGE model anytime soon, but if the interface doesn't support having a 2nd level of categorization (where totally different code would be generated based on it) then it wouldn't work for that application. The classic example is the categorization of variables into predetermined or not. You organize matrices in very different ways, check different eigenvalues, etc. If you are curious, you can see this in http://www.wouterdenhaan.com/numerical/BKconditionsslides.pdf For my immediate needs in solving continuous time methods, I am not sure I need it. Whether that needs to be available at compile-time is a design question for you. I come from a C++ TMP mindset where you almost always want type-safe compile-time information if possible in order to generate specialized algorithms, but maybe that is the wrong approach in Julia. |
Well the issue here is that this isn't really "Julia" proper. If you want to be technical, it's an IR written in Julia, which uses Julia as the compiler. Essentially this is a human-readable compiler language for scientific computing models. I would never write Julia code like this, but the Julia code it produces is type-stable which is what matters for performance. This kind of code pretty much will not be fully inferrable given the transformations it's doing, but it's not the code that any solvers will see since it will have to pass through the compilation process. I hope that explains why this throws out all of the "Julia best practices". That said,
If you need it, then we can add it. It would just be an untyped field which by default gets a |
Right now you have a single
subtype::Symbol
to differentiate types of variables. Since it is aSymbol
it seems very generic, but it also means you can only categorise by one type.I would like to be able to put in multiple levels of categorization given information known at compile-time. Could either the
subtype
be extended to support a named tuple of symbols, or could there be an additionalflags
which allows a set ofSymbol
flags (also preferably as a named tuple).The text was updated successfully, but these errors were encountered: