Object-Oriented equivalent of LISP's progn function?

Posted by Archer on Programmers See other posts from Programmers or by Archer
Published on 2014-06-05T18:41:34Z Indexed on 2014/06/05 21:40 UTC
Read the original article Hit count: 284

I'm currently writing a LISP parser that iterates through some AutoLISP code and does its best to make it a little easier to read (changing prefix notation to infix notation, changing setq assignments to "=" assignments, etc.) for those that aren't used to LISP code/only learned object oriented programming.

While writing commands that LISP uses to add to a "library" of LISP commands, I came across the LISP command "progn". The only problem is that it looks like progn is simply executing code in a specific order and sometimes (not usually) assigning the last value to a variable.

Am I incorrect in assuming that for translating progn to object-oriented understanding that I can simply forgo the progn function and print the statements that it contains? If not, what would be a good equivalent for progn in an object-oriented language?

© Programmers or respective owner

Related posts about object-oriented

Related posts about programming-languages