Tuesday, January 29, 2013; 1:55:17 PM Eastern
Javascript w/o curly braces
- Python doesn't have curly braces and semicolons because it considers the structure of the source code syntactically significant. We have something similar working with Javascript. Because I edit my code in an outliner, I have the curly braces and semicolons added as the text is generated from the outline. The result is a cleaner looking JS code, and less syntax to worry about.
- Here's a screen shot of what the code looks like w/o the CBASs. And the same code in a web page, after they have been generated. As you can see it's functional.
- This is possible because JS is consistent about its use of structural symbols. And the structure of the language maps well on outline structure. Not perfectly, but enough to make it worth using.
- The difficult construct is if-then-else. All other statements have a single summit but it has two.
- It's not ready for other people to use yet but it will be soon, Murphy-willing! :-)
- Update: This capability is now available in the worldoutline software, released today.