Editing
Programming Language
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
='Context' not 'arguments'= * Define implicit contexts. Don't want to specify them every time... * Probably need multiple contexts. A global context. Per-function context. (Maybe per thread? Initialisation context? Can a data structure have a context. Module/namespace context? Event context such as socket programming?). * main's global context for example could include: ** Command line arguments ** OS function/syscalls calls. os.gettime, filesystem access, etc... for example. * Contexts need to be overridable. So I could call Main from another program, and pass in the stdio streams and stuff... Unit testing and so on. What about garbage collection/memory models being specified in the context? What about supporting execution transfer. Moving a program across multiple cores, to other systems, etc... os calls could become RPC ones, or stay local os calls on the new machine? The transfer strategy would probably need to be part of the context. What about a mapping from literals to datatypes? For example int->int32/int64. But you make a function that does basic arithmetic using floating point numbers, complex numbers or some custom type for example. Allowing for dependant types. Do literals make sense in a language without text/syntax? How are these types passed in? What about the equivalent of 'keywords'? You could 'define' a for loop in the context. Or example a restricted for loop that has a hard timelimit. Consider number types as mathematical 'fields'? Compile time context vs runtime contexts? A function context would have the arguments and other stack stuff in it. Compile time would have type information. Allowing compile time at runtime would allow for a Python like dynamic programming language. A data structures with a context could be considered generics.
Summary:
Please note that all contributions to Hegemon Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Hegemon Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information