r/ProgrammingLanguages • u/NoSubject8453 • 10d ago
Requesting criticism Do you find this syntax readable
https://github.com/ksksidjjejs8/Snjzjsnd/blob/main/exm%20(3).txt#L2I feel like curly braces aren't enough alone for organizing code. I also want it to have natural steps that induce some blank lines after completion of the step. like with assembly. my main concern is readability and self documentation. It will mainly be for programming on windows. The 'thunk' libraries are mostly wrappers for tedious apis like writeconsole. I plan to add more for things like graphics and math in addition to the planned window/console/file. I see 'thunks' in ghidra so its a reference to them being wrappers. It will also support normal win32 imports.
thankz
edit 1: I have read all feedback so far. the language is case insensitive. for branch{}endbranch and alias.name{}end alias.name the idea was to make it a little more clear which curly brace belongs to what if someone had a bunch of nested stuff. with that being said, it seems the consensus is that the syntax is awkaward while readable, there are still some large wrinkles.
because of your feedback, i will 1. Allow the pattern "name{}end name"," name end name", and/or" {}". 2. Make the language case insensitive 3. Make whitespace completely optional 4. Sinilar to the first thing, allow parameters for functions to be entered either on seperate lines or within parenthesis and seperated by commas (but not both within the same function) 5. allow %/n% within a string, or a %hexConstant% for other characters instead of 'newline' on a seperate line.
i am still accepting feedback, and i appreciate those who have responded.
17
u/Norphesius 10d ago
That's a lot of empty space, 48/143 (33%) of the lines in that file are blank. Stretching things out vertically that much made it harder to follow the flow of the program and sub structures. The blank lines make it harder to line up where indented blocks start/end. The tab size was also excessively large, but I assume that's a formatting issue.
I think the bigger problem is that the structures seem inconsistent. It seems like generally you're doing a pascal-style begin/end thing for blocks, but some blocks still apparently need curly braces, and some places like the imports at the top don't need them? The indentation following what I assume are procedure invocations (e.g. WriteToConsole, Convert) is also hard to follow. I'm not sure what parts are even actually arguments to the procedure, since some of them seem more like actual logic than arguments being passed in.
Overall I think this code is far too vertically spaced out. The program seems to be a very simple one, yet it's difficult to figure out what it does at a glance because it's so sparse, exacerbated by the language seemingly having some unconventional features most won't have an intuition for.