Ideas for new syntax is programming? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Ideas for new syntax is programming?

So I have this idea for a programmign language where the blocks begin with colon ,the statements end with period and the statements inside blocks and loops end with commas. But how would you do it for nested loops? any ideas?

3rd Aug 2018, 11:51 PM
Stanislav Vladev
Stanislav Vladev - avatar
10 Answers
+ 2
Well it does sort of look confusing. What example code syntax did you have in mind, compared to mine?
4th Aug 2018, 1:13 AM
Andre Daniel
Andre Daniel - avatar
+ 2
I was thinking like you, until I remembered the nested blocka. Maybe a semicolon will be useful to separate them.
4th Aug 2018, 1:14 AM
Stanislav Vladev
Stanislav Vladev - avatar
+ 1
line of code, main block: line of code, line of code, for loop: line of code, if statement: line of code, ; line of code, ; line of code, . This is sanely confusing to use, but if you're solely doing the language for the fun of it, go at it. Stanislav Vladev
4th Aug 2018, 1:03 AM
Andre Daniel
Andre Daniel - avatar
+ 1
Instead of a fullstop? Maybe that is a better idea. Looks more readable and less confusing than a .
4th Aug 2018, 1:18 AM
Andre Daniel
Andre Daniel - avatar
+ 1
A bit inconsistent don't you think? But I guess if that's the rule, it can work.
4th Aug 2018, 1:20 AM
Andre Daniel
Andre Daniel - avatar
+ 1
More like Main block: Statement. Statement. If y = 5 then Statement, statement, statement; If condition then statement, statement.
4th Aug 2018, 1:26 AM
Stanislav Vladev
Stanislav Vladev - avatar
0
put before the colon put some text - class/struct/if etc yes, it can be confusing if the code is stuffed.... I actually design it seriously.
4th Aug 2018, 1:04 AM
Stanislav Vladev
Stanislav Vladev - avatar
0
Just like you normally use { and }, the only difference if you want : and . instead.
4th Aug 2018, 1:08 AM
Andre Daniel
Andre Daniel - avatar
0
Exactly! I Want the code to look like a real sentece, but looks liek when you use nested blocks it becomes confusing and not like a sentence really. Unless one build a compicated code to check this.
4th Aug 2018, 1:10 AM
Stanislav Vladev
Stanislav Vladev - avatar
0
No, a semicolon to separate nested blocks inside the main block. The main is still ended with a period.
4th Aug 2018, 1:19 AM
Stanislav Vladev
Stanislav Vladev - avatar