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 4559556
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:48:20+00:00 2026-05-21T17:48:20+00:00

EDIT: This question was misexpressed. What I’ve really wanted to ask was: Is there

  • 0

EDIT: This question was misexpressed. What I’ve really wanted to ask was:

Is there anything what cant be written in OO languages (with support for closures) using continuation-passing style?

You can google what CPS does mean or just stick with definition of function/method never returning anything, always pushing data somewhere – using passed callback.

And after yers from original question, I can even answer myself – there’s nothing like that. And moreover it’s actually very good OO principle called Tell Dont Ask

function getName(){
  return this.name;
}

console.log(xyz.getName())

vs.

function pushNameTo(callback){
  callback(this.name);
}

xyz.pushNameTo(console.log)

good, but this time it was named after how it does the thing, lets name it after what it does and make it even more OO:

function renderOn(responseBuilder){
  var b = responseBuilder;

  //or just string, whatever, depending on your builder implementation
  b.field("Name: ", this.name);
  b.field("Age: ", this.age);
  b.image("Profile photo", this.imageData);
}

person.renderOn(htmlBuilder);

the point here is – the object encapsulates not only its data but even behavior, the spirit, personality. Who else should be responsible for expressing person’s representation rather than person itself?

Of course this does not necessarily means you should have html in your code, builder serves this purpose. It can even generate some xml or other data-format for actual UI-rendering layer. But its always push instead of pull.

  • 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-21T17:48:20+00:00Added an answer on May 21, 2026 at 5:48 pm

    Nothing, of course. Consider: if you have a program that is completely sequential, you could simply insert it into some kind of wrapper, like document.onload(). Then the sequential program would be started asynchronously.

    Going the other way around, if all you have is a synchronous language, you can always write the asynchronous case by having a table of pieces to be executed, and an inner loop that looks to see what’s been enabled, and takes it from the table to execute. in fact, this would look very much like the underlying runtime in whoich your javascript runs.

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

Sidebar

Related Questions

Edit: This question was written in 2008, which was like 3 internet ages ago.
EDIT : This question doesn't really make sense once you have picked up what
EDIT: upgraded this question to MVC 2.0 With asp.net MVC 2.0 is there an
EDIT: This question is more about language engineering than C++ itself. I used C++
EDIT : This question duplicates How to access the current Subversion build number? (Thanks
(EDIT: This question is now outdated for my particular issue, as Google Code supports
I'm using markdown to edit this question right now. In some wikis I used
[EDIT] Hmm. Perhaps this question should be titled what is the default user-input dialog
Edit This question has gone through a few iterations by now, so feel free
EDIT: This question is a duplicate of What is the difference between managed and

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.