DEV Community

Discussion on: Want to help development of a programming language?

Collapse
 
fennecdjay profile image
Jérémie Astor • Edited

Great!
I'd especially appreciate feedback/discussion from another language designer 😄


Example of syntax discussion

This morning I finally changed my auto-loop to be a foreach-loop

#! declare an array
int array[12];

#! old syntax
for(auto a :  array) {
  ...
}

#! new syntax
foreach(a :  array) {
  ...
}

I think given foreach ubiquity among programming language, this fits better mine. (it also simplifies lexer and parser).
But I'm still wondering if it could accept some iterator:

foreach(a : array : 2) #! iterate every 2 variables 
  ...
foreach(a : array : -1) #! iterate from the end of the array

Hoping to read you soon.
Cheers!


EDIT:

I'll try to update projects and create issue this week-end.