Skip to main content
added 151 characters in body
Source Link
giraff
  • 2.3k
  • 21
  • 28

What you are trying to create is a Domain-Specific Language. The rationale behind this kind of (programming) language is: keep the syntax as simple as possible, while simple refers to "human readable", by removing all non-needed features.

Difficulties of C-Syntax

What makes C-Syntax hard to write:

  • Missing trailing ;. I saw many beginners curse on this one.
  • Missing } or ).
  • The concept of pointers (you probably won't need this one)(you probably won't need this one)
  • Variable scopes
  • copy-by-value vs. references

So ifIf you take a small subset of language features, it will make the code both easier to read and to write (as long as it is consistent).

Example

let'sLet's say, the code needs to express that Process A is dependent on Process B.

Process A = "Cook something";
Process B = "Go shopping.";
depends_on(A, B);

or:

Cook something <- Go shopping

In the second example, the "coder" doesn't even need to know the concept of parameters!

Technical Complexity does influence usability

In the end, what may be at least as important: a decent compiling/debugging environment, error messages that help to solve the actual problem, etc. And because of the technical difficulty of parsing C, its compiler often throws errors that are only faintly related to the real cause. So a simple syntax will help here, too.

What you are trying to create is a Domain-Specific Language. The rationale behind this kind of (programming) language is: keep the syntax as simple as possible, while simple refers to "human readable", by removing all non-needed features.

Difficulties of C-Syntax

What makes C-Syntax hard to write:

  • Missing trailing ;. I saw many beginners curse on this one.
  • Missing } or ).
  • The concept of pointers (you probably won't need this one)
  • Variable scopes

So if you take a small subset of language features, it will make the code both easier to read and to write.

Example

let's say, the code needs to express that Process A is dependent on Process B.

Process A = "Cook something";
Process B = "Go shopping.";
depends_on(A, B);

or:

Cook something <- Go shopping

Technical Complexity does influence usability

In the end, what may be at least as important: a decent compiling/debugging environment, error messages that help to solve the actual problem, etc. And because of the technical difficulty of parsing C, its compiler often throws errors that are only faintly related to the real cause. So a simple syntax will help here, too.

What you are trying to create is a Domain-Specific Language. The rationale behind this kind of (programming) language is: keep the syntax as simple as possible, while simple refers to "human readable", by removing all non-needed features.

Difficulties of C-Syntax

What makes C-Syntax hard to write:

  • Missing trailing ;. I saw many beginners curse on this one.
  • Missing } or ).
  • The concept of pointers (you probably won't need this one)
  • Variable scopes
  • copy-by-value vs. references

If you take a small subset of language features, it will make the code both easier to read and to write (as long as it is consistent).

Example

Let's say, the code needs to express that Process A is dependent on Process B.

Process A = "Cook something";
Process B = "Go shopping.";
depends_on(A, B);

or:

Cook something <- Go shopping

In the second example, the "coder" doesn't even need to know the concept of parameters!

Technical Complexity does influence usability

In the end, what may be at least as important: a decent compiling/debugging environment, error messages that help to solve the actual problem, etc. And because of the technical difficulty of parsing C, its compiler often throws errors that are only faintly related to the real cause. So a simple syntax will help here, too.

Source Link
giraff
  • 2.3k
  • 21
  • 28

What you are trying to create is a Domain-Specific Language. The rationale behind this kind of (programming) language is: keep the syntax as simple as possible, while simple refers to "human readable", by removing all non-needed features.

Difficulties of C-Syntax

What makes C-Syntax hard to write:

  • Missing trailing ;. I saw many beginners curse on this one.
  • Missing } or ).
  • The concept of pointers (you probably won't need this one)
  • Variable scopes

So if you take a small subset of language features, it will make the code both easier to read and to write.

Example

let's say, the code needs to express that Process A is dependent on Process B.

Process A = "Cook something";
Process B = "Go shopping.";
depends_on(A, B);

or:

Cook something <- Go shopping

Technical Complexity does influence usability

In the end, what may be at least as important: a decent compiling/debugging environment, error messages that help to solve the actual problem, etc. And because of the technical difficulty of parsing C, its compiler often throws errors that are only faintly related to the real cause. So a simple syntax will help here, too.