Jump to content
Sign in to follow this  
DavidRM

"inline" Keyword?

Recommended Posts

Inline is interesting but we have no immediate plans for it. The way JS contexts work makes sub-procedures and anonymous procedures more or less the same thing. Macros in the C/C++ style or templates is much more interesting.

Procedure TForm1.Something;
var
  x, y, z: integer;
  
  procedure SomethingElse(const CB: TProcedureRef);
  begin
  	if assigned(CB) then
    	CB();
  end;
  
 begin
   SomeThingElse( procedure ()
     begin
       writeln("Not sure we need inline under JS");
     end);
 end;

 

Share this post


Link to post
Share on other sites

OK. More curious than anything.

I'm porting an old ANSI C game into SMS (with Node.JS), and I had to sub in functions to mimic some C macro #defines. They're generally one-liners, so inline made sense. As the project continues, though, they'll likely be refactored out.

-David

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×