Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Executable XML users challenge

Name: F r o z e n V o i d !!mJCwdV5J0Xy2A21 2011-12-08 5:01

provide any LISP macro with clear explanation of its structure and function
that is :
1.concise (max 10 lines)
2.does not have a C equivalent(at least not anything above 100 lines)
3.does not use any libraries or imported complex functions which are not in C
If you provide an exact explanation/commentary on what it does i'll try to make a C solution which
is equivalent to LISP one. If i fail to do so, LISP wins, if i provide a solution you can make another macro.
If all examples in the thread are provide with C equivalents, LISP loses.

Name: F r o z e n V o i d !!mJCwdV5J0Xy2A21 2011-12-09 6:24

>need a lexer/parser to avoid symbol conflicts
When i need a lexer to write macros, i'm actually writing a complex code-generation script inside C, which a nested design of layered architectures: this signals something deeply wrong in design.
Its common here to assume that nesting a command mode in VIM(and extra command processor) or nesting extra layer of (LISP interpreter) on top of LISP is easy and elegant solution to problem, while in fact such half-baked solutions are far harder to debug,use and maintain.
The textual macros which are inferior in expressive power, serve their purpose better and don't require another layer of C.
So using LISP-type macros would be "more powerful" nesting macros ad infinitum and abusing recursion, but once you write it, can you reuse it or modify such complex code? I can handle 5-6 layers of C macros, but i can easily see what #define it expands into since its pure text.
In LISP case,i need to mentally compile code and cope with the entire language. Macro which are not obvious text replace require an order of magnitude more work to understand, let alone use.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List