Hey everyone!
So I mentioned in my introduction post that I’m designing and implementing a new programming language called Beagle. I’m calling it a “mid level” programming language. Here’s why:
Beagle lets you write high level code in a way that takes into account what hardware you’re building for. This means you’ll be able to write common modules that provide common abstractions over platform specific modules (similar to Kotlin). Beagle provides new abstractions that make marrying the two different kinds of type systems cleaner (much cleaner than PHP and Scala you know what I mean?) Beagle provides tools for class inheritance and data structure composition. The class inheritance follows a Kotlin style approach (grammatically and semanticaly) while the struct composition follows a Rust style approach (semantically, not grammatically). This means Beagle has interfaces and abstract classes for classes, and traits for structs.
By convention in a multiplatform environment, so say I know I’ll be building for x86 and arm architectures (windows, mac, linux, raspberry pi, etc), you would use an abstract type, which can be implemented by either a class or a struct. Meanwhile, interfaces are limited to classes, and traits are limited to structs. This allows you to build high level common abstractions that can be agnostic to type system specifics. An example would be Iterables. Iterables can be either classes or structs. Class based iterables, in your typical collections library, include lists, sets, maps, and queues. Struct based iterables include scalars, vectors, tables, and tuples. These wouldn’t be limited to hardware as that would be rather counter intuitive. Maybe I want to make a class property a table rather than a map. Or vice versa. You can name your modules however you want, it’s up to you.
Raspberry Pi is known for being limited yet its best programming tool is Python (I guess?). Part of my job is writing backend code for our cloud based software, which may run on Raspberry Pi or desktop. I would like to have a high level programming language that allows you to take into account hardware environments like in this situation, where I need to. I would like a high level language that lets me write my code in a way where I can choose how to compile and structure my types. Structs are much more efficient with minimal abstraction costs, while classes come with runtime metadata for polymorphic programming (type checks, casts, inheritance, etc) but are much more costly.
Classes bode really well on platforms where they thrive with lots of resources (like your typical desktop machine), but not so well on limited hardware (like a raspberry pi). Structuring your modules in a way where you can choose how your high level abstractions and types are compiled for what kind of hardware architecture would be super useful.
That’s all I’ve got for now. There are many other things I would love to talk about like type ignorance, def macros, vcs scripting, memory management, etc, but I’ll leave those for their own topics.