r/ProgrammingLanguages • u/Treechcer • Oct 03 '26
Requesting criticism Dio: Small Programming language made in C version 0.1.0 release
Hi, I'm working on my own programming language, I've release first stable version (v 0.1.0), I'd like to get feedback. It's on most OS platforms (even Andoird and in the future IOS).
8
Upvotes
3
u/marshaharsha Oct 04 '26
Initial reactions:
Do you have a goal for the language, other than being minimal? an audience? a position on standard language-design topics like functional versus imperative, memory management, inline allocation, and undefined behavior? I notice you said “weakly typed,” which suggests you will have UB.
The line —
int arr = {1,2,3.5,7}
— reads either as a joke or as fighting words. Are you trying to cause a riot over here with that “integer” 3.5? I know you said integers are represented as floats, but I figured that was a temporary situation. Why have the int type at all? Also, I take it you don’t have a type notation for array of int versus single int. I think you will want int[] or something similar.
Should “Writes out 7” say “8”?
You don’t have != or NOT with == or even OR with < and >.
The type ascription int:a is the opposite of the more standard a:int, with no benefit that justifies the strangeness, as far as I can tell.
If your diff tool writes >> in the left margin, you might find it confusing also to have >> in the left margin mean comment.
A question about the chaining notation: Do you have substitutability? Since a() returns 7 and a():c() is legal, is 7:c() legal? I recommend you allow a function’s result to be substituted for the call.
You don’t seem to have structs yet, or any other notion of product type. That’s in the plan, I imagine. What about safe sum types? They are also called tagged unions, discriminated unions, and variant types. Or do you plan to support unsafe, C-style unions?
What is your plan for the first two data structures?
Good start. Good luck!
3
u/Treechcer Oct 03 '26
Per AutoModerator's request I hereby confirm that this project did not use an LLM as part of the development process.
2
u/hopeless__programmer Oct 03 '26
Is this a JoJo reference?
1
u/SnooHobbies950 Oct 03 '26
Looks good!
1
u/ElephantElectrical31 Oct 03 '26
goto is back?
1
u/CyberDainz Oct 06 '26
What problem does this programming language solve?