I also realized: since modules can be upgraded to the latest available version from any available source, including potentially untrusted bundles, Rabbit will probably have to include a system for signing modules, but idk how that would work and not be a pain in the ass
a. you will get weird bugs trying to transfer data between parts of the project that might not match each other and b. if you refactor by moving any code to another file you might forget to check if dependencies align and get weird bugs from that
idea: Rabbit releases can have codenames; modules can specify what codename they want to use and that would be the default version for all stdlib modules so you don't have to specify what version of threading you want every time you import it
so in a hypothetical future where Rabbit is commonly used, each user would probably have their own library, there would be a global library for all users (probably containing the stdlib), and the OS might have its own private library for internal stuff
@Jacob uh, most of the "planning" I've done is in the form of long chat monlogues
but if you have specific questions I can answer them
First I would remove classes and all related stuff
And go with structs that can have methods, preferably with impl
And traits, which do everything inheritance does but far better
I'd examine every aspect of the syntax with minimalism and visual cleanness in mind
It takes ten minutes to update your parser now and ten years to do it a decade from now
I'd make sure it's very easy to iterate on existing code, but also easy to plan things out from the start
Which is higher level than the syntax, but the syntax should reflect those values by being quick to visually parse or modify
And you get a couple weirdness points; you can afford to do a couple of nonstandard things with the syntax. Do more than two or three and you'll alienate people, but do nothing new and you're failing to take advantage of the opportunity
Separating the data fields from the functions does have some advantages tho, aside from being able to add more later. It makes it easier to remember that the data is really all that's being stored (assuming you're not doing it JS-style where methods are lambdas in properties).
but having a "thing", a solid object that I can interact with, makes more sense to my brain then a weird lump of data and functions that I can apply to it
Because sometimes that's useful, but sometimes looking at it as a weird lump is more useful
But also...the function isn't stored in the object, it's something you do to the object. They're not as much a single object as we train ourselves to think
And while you can think of it as "Dog is barking", 90% of the time in actual code it makes more sense to think of it as "I am barking Dog"
maybe it's that having two "things" which only work with each other and are specifically made for each other feels weird to me because I'm like "why have them be separate? they're made for each other so they should be one thing"
would this (adding traits to others' structs / adding/changing methods) be able to be used to add op overloading to native types? like for example making list addition vectorize instead of concatenate