this post was submitted on 01 Jul 2023
14 points (100.0% liked)
Programming Languages
1190 readers
1 users here now
Hello!
This is the current Lemmy equivalent of https://www.reddit.com/r/ProgrammingLanguages/.
The content and rules are the same here as they are over there. Taken directly from the /r/ProgrammingLanguages overview:
This community is dedicated to the theory, design and implementation of programming languages.
Be nice to each other. Flame wars and rants are not welcomed. Please also put some effort into your post.
This isn't the right place to ask questions such as "What language should I use for X", "what language should I learn", and "what's your favorite language". Such questions should be posted in /c/learn_programming or /c/programming.
This is the right place for posts like the following:
- "Check out this new language I've been working on!"
- "Here's a blog post on how I implemented static type checking into this compiler"
- "I want to write a compiler, where do I start?"
- "How does the Java compiler work? How does it handle forward declarations/imports/targeting multiple platforms/?"
- "How should I test my compiler? How are other compilers and interpreters like gcc, Java, and python tested?"
- "What are the pros/cons of ?"
- "Compare and contrast vs. "
- "Confused about the semantics of this language"
- "Proceedings from PLDI / OOPSLA / ICFP / "
See /r/ProgrammingLanguages for specific examples
Related online communities
- ProgLangDesign.net
- /r/ProgrammingLanguages Discord
- Lamdda the Ultimate
- Language Design Stack Exchange
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'm still working on a simple language, and I haven't finished code gen yet bc I redid the parser and lexer using parser/lexer generating libraries instead of by hand in order to clean up the code and hit edge cases more easily.
This redoing led to a redesign of the language in many ways and to refinement on the purpose.
There is a niche of simplistic languages. C is king, and C-likes follow in pursuit. These languages are simple in terms of syntax. Very few features/keywords. However, I feel they don't always hold up to their simple ideals. In other words, C is a simple language that doesn't stay simple.
What do I mean?
C is "math-based" (like most programming languages) in that it has things like expressions and functions. It's a high level language, although less high and more simple than many others. I think that's a compromise. It's not high level enough to make full use of the abstractions the math stuff gives it, but its fundamental orientation towards expressions and functions means the deeper you get in a library or function that calls others, the more complex and less C-like it gets. Assembly, on the other hand, stays simple but 1) it's not uniform across devices and 2) it doesn't have much in the way of abstractions.
I wanted a language that lets me have my cake and eat it to. I need a language that's simple like assembly, based around jumps and mutating data, but has an abstraction system also built around that.
So I coined the term "mutator" to refer to a very strict, side-effecty function that can mutate certain kinds of data and created a trait-like system that can store mutators and be implemented for different kinds of data. Every mutator just calls into other mutators. This gives you equivalents to polymorphism and things, but as you get deeper it always stays simple.
On top of that I have an ML inspired syntax and a module system and have it compile to C, so you should be able to easily set up projects and build them anywhere.
I'm now like a third of the way through code generation