Designing Custom Kotlin Variant For Hobby Project (Discussion)

Hey everybody! I’ve been using kotlin for almost a year and I am really happy with it. Right now I’m working on a big long term project using kotlin. It’s not for profit, however it is for my own personal enjoyment, research, experimentation, and resume building. I do have a job, I’m a ride operator at Silverwood Theme Park, and I’m a full time software development student at Spokane Community College (none of this stuff I learned in college, I taught myself). I’ll explain the project and get into the meat of the post.

So some background: I am a Minecraft mod “researcher”. I don’t necessarily make and release mods, however, I do play around with Minecraft Forge and participate in various modding communities. One community I am involved in is the MrCrayfish Device Mod community, as it includes an api for making applications for the ingame laptop. The mod includes the aforementioned laptop, a printer, a router, a gaming chair, and the ability to make applications and print pictures from the laptop (using a premade painting app) using the ingame printer. There’s also an ethernet cable. I’ve made a few pull requests for it on github including a slight modification to the use of the gaming chair, an automatic registry system using annotations (I isolated that into an actual small framework that I did release and currently using in my project), and a slight modification to the way that app infos are written in json files (there’s a lot more details to go into that are actually rather irrelevant. If you wanna know more about all of this stuff, just go to the github repo for the mrcrayfish device mod). One thing that many people (including myself) would like to see in the mod is the ability to create custom oses and install them on the laptop and have different kinds of hardware that vary and influence the os and the software running on the os. MrCrayfish has stated many times that it is too much cause he has other mods to make and it’s overambitious in his eyes and not what he’s going for in the device mod.

Back in october, a friend and I decided to make an IDE inside of this mod as an addon. My friend kinda stopped cause of life and timezones but I continued it. Turns out that the way that files work in the mod don’t like my IDE so I couldn’t complete it properly. So I decided to basically make my own device mod that is more-or-less designed after real life operating systems, with a proper filing system, a terminal, and even modeling it after arch linux to give people the ability to create and put together different packages to create a desktop environment. It’s going along pretty well. I’ve implemented a way to have memory and a working terminal and currently working on networking by creating ports and a more realistic approach to sending data between devices. I have to basically create everything all over again including the router. I was planning on using the router in the device mod but they are not friendly with each other, so looks like it’s not gonna be an addon after all and rather it’s own independent mod. One big reason that I had for starting this was for my original project with the IDE. If I make this and implement the IDE while it’s modeled after arch linux, then why not start out by making something like emacs or vim and allow people to write code inside the terminal like in minimal linux installations (talking arch linux still, but whatever others there may be like a minimal debian installation) and write applications and packages just like you would in arch linux, so why not create a way to emulate full on low level programming. Since I’m targeting people that are in the whole high-level programming world and are also younger and newer to computer science, I wouldn’t be able to take a language like rust or c or C++ and implement it (would be harder since I’d have to write the lexical and parsing engines for it ingame which would be a waste of time and resources and completely unrealistic (a bit like my project overall lmao)). I could take a rather high-level language that already has a jvm implementation and do that like ruby, python, javascript, or crystal. But even then I’d have to learn those languages and figure out the code behind them (I know that crystal is open-sourced but I know nothing about crystal/ruby tbh). I thought I’d take kotlin and change it to be more functional and concise (and somewhat more original while still being a variant/sublang/child of kotlin) to implement into the game since that kotlin is made for jvm (and js if you wanna be technical) which means it’s already optimized for running in jvm and even has a JSR implementation for custom program implementations. If I can take that, change it to fit my needs (and even play around with the syntax and the backend for personal research) then I won’t have to do too much more work.

Now all of this can be discussed but what I really want to discuss is changes to the language. Now this isn’t being made to trump over kotlin in anyway whatsoever. It’s for research (I wanna get into language design so this would be good practice) and also for fun. I already have a basic example of how I want it to look but it obviously needs a critical eye to it. Also, it doesn’t show every single feature, just the ones I could come up with right before bed last night (writing this right before bed too lmao I’m a mess). Here it is:

I’m using kotlin syntax here but obvi it’s not kotlin:

I’m obvi not happy with what I’ve got so far and I’m sure you can see some interesting details I’ve whipped up such as the syntax for a private function, types are declared the same way with different name cursors (such as ‘[Example]’) as well as object preinit, init, and postinit for different construction stages for checks/validations, initializations, and perhaps doing things before/after an object is constructed but every time it’s constructed; but it needs some work. This isn’t until way later when I get my main project working but I just thought I’d open a discussion about it.

Feel free to be triggered by any of my proposed syntax, even I’m a little triggered, hence the discussion here lmao