Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 689877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:22:40+00:00 2026-05-14T02:22:40+00:00

I’m currently developing a new language for programming in a continuous environment (compare it

  • 0

I’m currently developing a new language for programming in a continuous environment (compare it to electrical engineering), and I’ve got some ideas on a certain language construction.

Let me explain the feature by explanation and then by definition:

x = a U b;

Where x is a variable and a and b are other variables (or static values). This works like a union between a and b; no duplicates and no specific order.

with(x) {
    // regular 'with' usage; using the global interpretation of "x"
    x = 5;
    // effectively will do:
    // x = a U b U 5;
    // a = 5;
    // b = 5;
    // Thus, when "a" or "b" changes, "x" is still equal to "5".
}
with(x = a) {
    // this code block is executed when the "x" variable
    // has the "a" variable assigned. All references in
    // this code-block to "x" are references to "a". So saying:
    x = 5;
    // would only change the variable "a". If the variable "a"
    // later on changes, x still equals to 5, in this fashion:
    // 'x = a U b U 5;'
    // '[currentscope] = 5;'
    // thus, 'a = 5;'
}
with(x = b) {
    // same but with "b"
}
with(x != a) {
    // here the "x" variable refers to any variable
    // but "a"; thus saying
    x = 5;
    // is equal to the rewriting of
    // 'x = a U b U 5;'
    // 'b = 5;' (since it was the scope of this block)
}
with(x = (a U b)) {
    // guaranteed that "x" is 'a U b'; interacting with "x"
    // will interact with both "a" and "b".
    x = 5;
    // makes both "a" and "b" equal to 5; also the "x" variable
    // is updated to contain:
    // 'x = a U b U 5;'
    // '[currentscope] = 5;'
    // 'a U b = 5;'
    // and thus: 'a = 5; b = 5;'.
}
// etc.

In the above, all code-blocks are executed, but the “scope” changes in each block how x is interpreted. In the first block, x is guaranteed to be a: thus interacting with x inside that block will interact on a. The second and the third code-block are only equal in this situation (because not a: then there only remains b). The last block guarantees that x is at least a or b.

Further more; U is not the “bitwise or operator”, but I’ve called it the “and/or”-operator. Its definition is:

"U" = "and" U "or"

(On my blog, http://cplang.wordpress.com/2009/12/19/binop-and-or/, there is more (mathematical) background information on this operator. It’s loosely based on sets. Using different syntax, changed it in this question.)

Update: more examples.

print = "Hello world!" U "How are you?"; // this will print
                                         // both values, but the
                                         // order doesn't matter.
// 'userkey' is a variable containing a key.
with(userkey = "a") {
    print = userkey; // will only print "a".
}
with(userkey = ("shift" U "a")) {
    // pressed both "shift" and the "a" key.
    print = userkey; // will "print" shift and "a", even
                     // if the user also pressed "ctrl":
                     // the interpretation of "userkey" is changed,
                     // such that it only contains the matched cases.
}
with((userkey = "shift") U (userkey = "a")) {
    // same as if-statement above this one, showing the distributivity.
}

x = 5 U 6 U 7;
y = x + x; // will be:
// y = (5 U 6 U 7) + (5 U 6 U 7)
//   = 10 U 11 U 12 U 13 U 14

somewantedkey = "ctrl" U "alt" U "space"
with(userkey = somewantedkey) {
    // must match all elements of "somewantedkey"
    // (distributed the Boolean equals operated)
    // thus only executed when all the defined keys are pressed
}
with(somewantedkey = userkey) {
    // matches only one of the provided "somewantedkey"
    // thus when only "space" is pressed, this block is executed.
}

Update2: more examples and some more context.

with(x = (a U b)) {
    // this
}
// can be written as
with((x = a) U (x = b)) {
    // this: changing the variable like
    x = 5;
    // will be rewritten as:
    // a = 5 and b = 5
}

Some background information: I’m building a language which is “time-independent”, like Java is “platform-independant”. Everything stated in the language is “as is”, and is continuously actively executed. This means; the programmer does not know in which order (unless explicitly stated using constructions) elements are, nor when statements are executed. The language is completely separated from the “time”-concept, i.e. it’s continuously executed:

with(true) {
    a = 0; // only runs once (lazy execution)
}

with(a < 5) {
    a++;
} // this is a loop-structure;
  // how and when it's executed isn't known however.

with(a) {
    // everytime the "a" variable changes, this code-block is executed.
    with(true) {
        b = 3; // only 5 times (again lazy execution, but it's a sub-with)
    }
    with(b < 2) { // dependent on "b"
        // runs only 3 times * 5 times = 15 times.
    }
    with(b > 1) { // dependent on "b"
        b = b - 1; // runs 4 times * 5 times = 20 times.
    }
}

Update 3:

After pondering on the type of this language feature; it closely resemblances Netbeans Platform’s Lookup, where each “with”-statement a synchronized agent is, working on it’s specific “filter” of objects. Instead of type-based, this is variable-based (fundamentally quite the same; just a different way of identifiying objects).

I greatly thank all of you for providing me with very insightful information and links/hints to great topics I can research. Thanks.

I do not know if this construction already exists, so that’s my question: does this language feature already exist?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:22:41+00:00Added an answer on May 14, 2026 at 2:22 am

    I honestly find your explanation and examples difficult to follow (update: your blog is much better and reading Statement Ordering there I’m even more convinced that you are aiming at a form of dataflow programming).

    However, your final description:

    Everything stated in the language is
    “as is”, and is continuously actively
    executed. This means; the programmer
    does not know in which order (unless
    explicitly stated using constructions)
    elements are, nor when statements are
    executed. The language is completely
    separated from the “time”-concept,
    i.e. it’s continuously executed:
    saying that “a” is “b” and “b” is “a”
    is a simple loop-structure, for
    instance.

    .. induces me to think that the general term that you are searching for is dataflow programming (even if loops are not permitted in the more simple instances of dataflow programming). Quoting from Wikipedia:

    Dataflow is a software architecture based on the idea that
    changing the value of a variable
    should automatically force
    recalculation of the values of
    variables which depend on its value.

    Reactive programming and functional reactive programming are, as I understand them, variations on the same theme.

    Icon’s goal-directed evaluation is more restricted in scope (see this A Brief Introduction to Icon: The backtracking implied by the goal-directed evaluation mechanism is limited to the expression in which it occurs).

    See also this question on Stackoverflow: Dataflow Programming Languages.

    Update: Pindatjuh asks in comments “Can you also comment, whether this language is a new variation on the theme of dataflow?“. I think so, but the question is really about definitions and so about consensus. In a recent survey about dataflow languages, Advances in dataflow programming languages (published in ACM Computing Surveys, Volume 36 , Issue 1, March 2004), authors wrote (page 10):

    The best list of features that
    constitute a dataflow language was put
    forward by Ackerman [1982] and
    reiterated by Whiting and Pascoe
    [1994] and Wail and Abramson [1995].
    This list includes the following:

    1. freedom from side effects,
    2. locality of effect,
    3. data dependencies equivalent to scheduling,
    4. single assignment of variables,
    5. an unusual notation for iterations due to features 1 and 4,
    6. lack of history sensitivity in procedures.

    I haven’t read all your blog but just perused it lightly, so you are more qualified than me to judge about your programming language (which is a moving target anyway).

    Update: I unconsciously missed the word “new” in your question “… this language is a new variation on…“. It is an hard task: one needs to consider all the dataflow languages invented until now and carefully examine their semantics in detail to spot a novelty in your approach. I surely haven’t the necessary knowledge at this time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.