xftjywx / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

Enhancement: Libraries, scope, development of big programs #201

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Dear Neil, Ellen and team!

For a few months on Wiki page one can see following:

 "The Blockly team is currently focused on small educational applications, 
which means nobody is currently pursuing these:"

with the list of most crucial questions. 

We, the community, do appreciate your job, creation of the system, support of 
its internationalization and work with different browsers, 
creating initial set of applications. 
Nevertheless, I doubt that extension of initial application set, at  expense of 
more critical system features, is what the community desires and expects from 
you, our native leaders. 

Thus, let me share a few thoughts about stuff currently 'not pursued'. 

Regarding libraries, scope and development of big programs, I would suggest 
following approach:

1. Library is a main unit. Library may include 
a) procedures
b) functions 
c) global constants (global variable doesn't look as a good and really required 
programming concept).

No name of entity in the library can be used more than in one category (though 
using the same name  
inside a category, for procedures or functions with different set of 
parameters, may be allowed, if possible). 

Every library has a unique name (like a package in Java)

2. Scope of entities in libraries is global: Procedures and functions in a 
library may use entities from any other library.
Entities in different libraries may have the same internal name. Full name 
library.entity is always unique as library name is unique. 

3. Procedures and functions use local variables, along with global constants 
from own and other libraries. 

4. Approach to visualization in Blockly. Implementation may be based on current 
approach: [scrollable] column of libraries.
Library may be opened, and any entity can be taken for procedure being 
developed. 
Any entity in a library should have a sign of that library (a pictogram, for 
example), thus entities with the same name from different libraries are 
visually differentiated.   

Thank you.

Original issue reported on code.google.com by mi_sem...@yahoo.com on 25 Jan 2014 at 10:32