D
D
dtestyk2012-03-22 18:45:50
Programming
dtestyk, 2012-03-22 18:45:50

Program as folder hierarchy?

Everyone has heard about the hierarchy of inheritance, the nesting of containers, but the hierarchy of scopes seems to me the most important. Imagine the program as a hierarchy of directories:
root
-mainObject.myMainClass.object(type: object, size: 1000 lines, number of elements: 3)
--somepropertyname1.property(type: property, size...)
--somepropertyname2.property
--somemethodname1.method
---anonimousif1.if(type: condition, condition: ....)
----somename3.for
-----print1.command
------length.function
--- ----somevariablename.link(type: link, link to: root/mainObject...)
-----whyiusethis.comment
-----sendMassage1.command
------message5.messagetype1.message( destination: ....)
So that you can walk through such "folders", change, run, assign access rights.
Features: you can name language constructs (for, while, if...), make references to them, the program can be written using a batch file.
Come to mind: powershell, Erlang OTP, Python interpreter, Spectrum BASIC48, classes in Java folders.
Maybe someone knows or heard about such or similar system.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Monnoroch, 2012-03-22
@Monnoroch

I'm afraid to even ask, why? =)

V
VenomBlood, 2012-03-22
@VenomBlood

Maybe someone knows or heard about such or similar system.

What you wrote, with a few clarifications, is called AST .
The question is, why do you need it while writing the code?

E
egorinsk, 2012-03-24
@egorinsk

In languages ​​like Java, the files are divided into directories anyway. Access rights can be set with annotations in files. You can write such a shell for them, but I doubt that it makes any sense.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question