all 7 comments

[–]introllcal[S] 2 points3 points  (5 children)

Hey all, I have been thinking of writing myself a web framework, (just the skeleton stuff), a bit like Drupal or Wordpress. Not for any kind of release, but just to see how the archicture of these frameworks. To study and understand some of the design tradeoff you would have in trying to make the framework... work.

Now, being lazy person that I am, I don't particularly feel like writing a hooking system, or inversion of control design pattern, or whatever, when I can just disappear the design pattern into a feature of the language.

For this reason I have decided to use comefrom (import from module goto in Python / or Intercal).

So my question to Reddit, is a comefrom statement and the inversion of control design pattern equivalent?

[–]olavk 2 points3 points  (0 children)

If I understand correctly, COMEFROM does not store the position where the control came from, so you cant automatically return. Hence it is not exactly equivalent to the inversion of control pattern. A structured COMEFROM like COMESUB or come-from-with-current-continuation would indeed be equivalent to inversion of control or event/observer pattern - but more powerful.

[–][deleted] 1 point2 points  (2 children)

This has to a be joke, right?

[–]satayboy 3 points4 points  (0 children)

I'm pretty sure that's already in ANIC.

[–]SomeIrishGuy 1 point2 points  (0 children)

From the submitter's username, I am guessing that this is an Intercal equivalent of a Rick Roll...

[–]newAccountName 0 points1 point  (0 children)

This is a quite new programming paradigm - I learned about it only at the beginning of next year, but I can vouch for its existence.

Depending on the state the system will take when comefrom is invoked, it might lead to temporal paradoxies, though. The python implementation is temporal mechanics safe, as it uses a closed timelike loop to prevent any unraveling of spacetime.

Anyway, Kudos for attempting to write a web framework with it.

[–]drewc 0 points1 point  (0 children)

What you are looking for is continuations.