Haven't posted anything about yodascript in a while. I've still been working on it tho. Today I implemented binary search tree in yodascript. Going to likely change how references work slightly https://github.com/dvtate/ys-alpha/blob/master/examples/bs_tree.ys
Please #StopUsingMedium. It’s really annoying and makes me not read your content, no matter how good it is. Not specific for this author. This a general statement.
OOP in YodaScript 2!
this time objects actually have a sense of self. This example doesn't really show all the features, (especially since many operators still haven't been implemented yet).
Planned Features involving Objects:
- operator overloading - using member lambdas
- inheritance, and constructors - using references
On Zuckerberg’s “privacy” announcement yesterday, I’ve only found one article in my RSS feed this morning worth reading… 🔥
Photo: Planning out OOP for YodaScript 2.
I've run into some issues with the way I've implemented references which will hold me back in the future, so it will probably be a few days before I learn enough about safe pointers to where I can make a proper garbage collector and data access management system. But in the long run this should be good as it will prevent user-caused segfaults and should open the door for multi-threading.
The important thing right now isn't the short term success gained with new features, but the long term software design and how maintainable and scaleable it is. Testing out features rn mostly just to get a feel for how different things would work with the new system. And seeing if changes should be made. So far everything seems good, I just have to try and make the right decisions now instead of later once the interpreter is 10k lines.
I'm rewriting my old scripting language. Here's after 3 days work. The framework is almost done, after that I can just start implementing more useful stuff.
Things that need to get worked out before i add new features:
- presenting Errors and EOF to user
- **should I add an integer type?** or is long double & string good enough?
Things that work as of now:
- basic operators
Things which almost work: