Copyright 2012 by Shawn H Corey. Some rights reserved.
Licence under CC BY-SA 3.0
In reviewing my two last post, I think I made a mistake. In creating a grammar, I overlooked the possibilities of the IDE. The integration of the IDE is suppose to make programming easier. In following a grammar, I have made it more like an editor. Although editors have been used for decades, this project is suppose to be a better way.
Another Look at the IDE
In following a formal grammar, everything must be declared before it is used. That means the programmer needs a fair grasp on what to incorporate in order to declare it. But the design is suppose to make things easier by supporting search & click programming. This means getting rid of the
uses section. The IDE can add modules to the program as the programmer clicks in the subroutines. The modules in use will not be present on screen but the programmer can viewing through a menu command.
Searching can be done through names, tags, and descriptions. That way, all a programmer need guess is some keywords that will help him find an appropriate subroutine.
I been considering adding private subroutines. They could only be called from other subroutines in the module. This would allow the programmer to break the subroutines into smaller pieces and to reuse code. Since they are private, their interface can be changed without fear of cascading chances outside the module.
If private subroutines are allowed, then there is the possibility of dynamic-scoped variables. That is, variables declared in a public subroutine but usable as a global one in private subroutines. With dynamic-scoping, the variables would be in scope from where they were declared to the end of their block and in any private subroutine called from within that block.
With auto-threading, it is possible for two (or more) threads to call the public subroutine, but each instances is separated from the other. The dynamic-scoped variable in each call is different and not shared. Each thread would have its own localized version.
I hope this explains better the kind of IDE & language I want to create: one that frees the programmer from managing the details and allows him to concentrate more on the creative side of programming.