Comparison of Common Lisp macros and Forth metaprogramming capabilities -



Comparison of Common Lisp macros and Forth metaprogramming capabilities -

every mutual lisp programmer knows macros powerful tool. mutual lisp macros have been used, among other things, add together object orientation on top of lisp without changing language specification; read-macros build mind bending capabilities.

another programme allows meta-programming forth. forth in different manner, using 'words' , 'generate words'.

i know, dabbled in both languages, if mutual lisp macros , forth constructs comparable in breadth/power: there can former can't latter? or vice-versa?

of course, not talking turing-completeness of 2 languages: talking metaprogramming capabilities. c turing-complete fool state c macros comparable in powerfulness mutual lisp ones.

in view, mutual lisp macros similar forth immediate words. (actually, similar lisp reader macros.)

they both procedural macros, i.e. can utilize total powerfulness of language.

they both have access source code input.

they both can output expressible in language. (e.g. object-oriented extension in lisp, or basic command flow constructs in forth.)

the main difference, perhaps, forth "macro" input character strings, while lisp macros operate on parse tree.

lisp common-lisp metaprogramming forth gforth

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -