Re: Forum Software Sucks
(I ment the "X++" thread, not today's WTF thread.)
(I ment the "X++" thread, not today's WTF thread.)
And now it moved my followup post, that should have gone on to today's wtf, into the start of its own thread. I give up.
This forum was designed by the people we mock.
Lame forum software mangled my post. The following paragraphs should have been in there:
An S-expression is a list where the first element is an operator
(function, macro, or special form) and the subsequent elements are
arguments to that operator. Lists are a first class data
structure in Lisp, and there are a lot of built-in functions for
manipulating them, formatting them (the "pretty printer"), etc.
Thus, all Lisp programs are also lists, and can easily be manipulated
in Lisp.
Lisp doesn't include facilities for transforming Lisp to other
languages, but it does include facilities for transforming Lisp into
different Lisp. Its ability to do this is unmatched by any other
language, except Dylan (which is Lisp with a different syntax).
For example, if you wanted a control structure that randomly executed
one statement from a list of them, you could easily extend the language
with this feature:
(defmacro one-of (&rest statements)
`(case (random ,(length statements)
,@(loop for i from 0 and statement in statements collect (cons i statement))))
Then you could write:
(one-of
(print "apple")
(print "bannana")
(print "dog"))
And one of either "apple", "bannana", or "dog" would be printed.
The IT industry is doomed to spend from now until eternity reinventing stuff that Lisp did better.
@Rodyland said:
My knowledge of Lisp is minimal at best, but, IIRC my uni lectures
years ago where Lisp was mentioned, the ability to translate Lisp into
another language automatically was not mentioned.
Maybe I slept
through that bit.