-
Notifications
You must be signed in to change notification settings - Fork 16
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
Possiblity of adding Struct to nolol #62
Comments
Especially when combined with macros this would make some things pretty simple. When designing the type-system it should be done in a way that it is prepared for the future addition of structs. My only concern is, that it might make nolol harder to learn for beginners. |
I'm not sure why it would make nolol harder for beginners, as you can still use all the code without ever touching structs, can you not? |
Probably depends on how much structs are used in the standard-library. Its not really that I think this one specific feature will make it to complicated. It's more a general feeling that if every feature that somehow makes sense gets added, nolol will eventually become a horrible mess. (This is not a "no" to structs. I just want to be careful about feature-creep in general.) |
I see. Perhaps structs could be kept to their own, higher-level part of the standard library so that beginners do not have to deal with them. I think nolol having many features is a good thing, however they should probably be built in layers to allow for the user to choose what level they wish to use nolol at. I think nolol does a great job of this currently, by still allowing If nolol continues to implement new features with this downward compatibility principle, I believe it will become a language that is easy to pick up for beginners, yet offers helpful functionality for specific applications. |
Following #48/#63.
Perhaps give programmers the ability to create
Struct
s in nolol, as almost a precursor to classes.These
Struct
s would make it easier to group related variables and would be treated as a programmer-defined type, similar to C, and could be passed to macros which act almost as a class method.No actual YOLOL operations can be performed on a
Struct
, only on its child variables.Early into compilation all
Struct
s can be removed and their child variables be replaced by locals, asStruct
is merely a way to improve readability, understandability, and reusability of nolol code.An example of a potentially useful
Struct
, that could even be included in the "std" library is:I'm sure there would be many other possible uses for
Struct
.Thank you.
The text was updated successfully, but these errors were encountered: