r/Compilers • u/Mean-Decision-3502 • Jun 12 '26
Code Readability Comparison
/r/programmer/comments/1u3x0z8/code_readability_comparison/
0
Upvotes
r/Compilers • u/Mean-Decision-3502 • Jun 12 '26
View all comments
Show parent comment
1
u/Mean-Decision-3502 Jun 13 '26
You are developing a new language! You don't have to carry on the errors of the C!
For me these are the big design errors in C:
/can result either floating point or integer*for multiplication, pointer type signalization and pointer dereference[]on pointers do dereferencingFurthermore in C the type preceeds the identifier, which makes the language hard to read by humans. In a good, human readable language the identifiers should align to a column.
In DQ:
The variables naturally align to a column, the types are manually aligned.
I strongly recommend to consider this principle in your language.
It is sad, that lot of developers don't know the modern Pascal (after Delphi). FreePascal has more dialects and features, you have to activate at least "objfpc" to get them. It supports pointer arithmetics,
[]on pointers (with dereferencing like C). Pascal has a stronger type system, with these very important features:float->intimplicit type conversions/is always floatThe Pascal works with these rules for more than 40 years.
Why do you need
:=for assignment? Why not only=? Here is the symbol density very high:This is also harder to read.