"Goto" Keyword for DECORATE Multi-Blocks

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: "Goto" Keyword for DECORATE Multi-Blocks

Re: "Goto" Keyword for DECORATE Multi-Blocks

by randi » Fri Feb 19, 2016 12:45 am

Added, after a fashion. Jumping is now done by returning a state from the action function.

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Major Cooke » Fri Feb 12, 2016 9:27 am

That incorporates the return; functionality too, yes. It's quite a bit of a hassle forgetting to include returns and seeing them go complete sideways because of it. Also, because it's annoyingly redundant.

Though now that I think about it, a boolean to allow the rest of the function to process could be useful.

Of course, this doesn't make the return function defunct at all. The return function can still be used in a variety of places and in creative ways still.

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Graf Zahl » Fri Feb 12, 2016 9:26 am

In other words, an action function that always jumps, right, i.e. A_Jump without the randomness?

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Major Cooke » Fri Feb 12, 2016 7:29 am

Well we can still do it Gez's way. I say that's good enough.

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Graf Zahl » Fri Feb 12, 2016 7:29 am

It's the same word, so that's not a good idea. Currently it's as easy to say as 'A_Jump is different from Goto because...'.
If you introduce 'Goto' here it becomes, 'Goto is different from Goto, because...' and that's hard to communicate.

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Major Cooke » Fri Feb 12, 2016 7:25 am

That was not my intention at all.

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Nash » Thu Feb 11, 2016 11:06 pm

Why would you want to change the original behavior? Goto VS A_Jump(255) behaves VERY differently especially when inheritance is involved, there were specific situations where I HAD to use A_Jump instead of Goto in the past, and sometimes vice versa; it wouldn't have worked any other way.

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Major Cooke » Thu Feb 11, 2016 5:45 pm

I like Gez's style more.

Or does this all still fall under the same reasoning, graf?

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Xaser » Thu Feb 11, 2016 2:59 pm

I was gonna suggest adding a directive along the lines of "VGoto" (for "Virtual Goto") but "Jumpto" or just "Jump" sounds better. :P

Aside from its obvious use in multi-blocks, it'd be nice to be able to avoid the unintuitive "A_Jump(256, 'State')" for inheritance-friendly ("virtual" in the c++ sense) jumps.

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Gez » Thu Feb 11, 2016 4:48 am

Keyword: Jumpto

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Graf Zahl » Wed Feb 10, 2016 6:26 pm

I'm not really sold on thls.
Remember: In DECORATE the actual meaning of 'goto' is not the same as 'A_Jump' and having it be an alias here will ultimately only add confusion.

Re: "Goto" Keyword for DECORATE Multi-Blocks

by ZzZombo » Wed Feb 10, 2016 6:23 pm

As a keyword, it should not require parentheses around the parameter.

Re: "Goto" Keyword for DECORATE Multi-Blocks

by Tormentor667 » Mon Feb 08, 2016 11:23 am

Fully agreed

"Goto" Keyword for DECORATE Multi-Blocks

by Major Cooke » Mon Feb 08, 2016 11:08 am

It'd be nice to have a special goto keyword for DECORATE usage inside multiblocks, along with the Stop command.

Code: Select all

{ Goto("State"); } 
//Translates into:
{ A_Jump(256,"State"); return; }
Because typing that out over and over again is getting old. Fast.

Top