What is the rationale for progn, progv, block, let, flet, let* and return-from being special forms? They all could be simulated with TAGBODY and a few SETQs. C/C++ goes well with just {} being tagbody.
Common Lisp is stupid.
Name:
Anonymous2013-07-27 11:32
Moreover, FLET already works like a tagbody.
And Scheme can either use letrec or continuations instead of gotos.
Name:
Anonymous2013-07-27 11:46
LISP-family has these features:
1. retarded prefix syntax, the #1 reason no sane person would touch it. Ironically the inventor of prefix notation said ``I came upon the idea of a parenthesis-free notation in 1924. I used that notation for the first time in my article Łukasiewicz(1), p. 610''
2.Parens, tons of them. The only constant in lisp is that its has parens by the boatload, requiring manual comprehension of the ASTs.
3.Freedom to create absolutely anything, without it being more useful or faster than anything. An academic exercise in 'semantic elegance' (an elegance of form not function), the problem is that x100 more verbose Java/C++ code can be reasoned about and debugged with more success.
4. Smaller size of programs, except that APL is still smaller.
Size doesn't mean quality: in fact the shortest, most high-level program is actually the slowest, most leaky and memory intensive POS.
No wonder LISP isn't used for games or anything useful besides academic mental masturbation.
A videogame in LISP? I would love to see how slow it will be compared to Minecraft
Name:
Anonymous2013-07-27 12:23
>>4
You can implement tagbody using continuations, which themselves could be represented by just lambda. A good enough compiler could optimize continuations back to gotos.
the only other fundamental form, besides lambda, is set!
>>3
>Size doesn't mean quality: in fact the shortest, most high-level program is actually the slowest, most leaky and memory intensive POS.
That simply isn't true.
>>7
I know, I know. It is that I can see why they were added as well, including many other things in the specification, that you can optimize by other means. Not disputing your point, just pointing the reason.
Name:
Anonymous2013-07-27 12:59
>>5
Complex games have interesting problems to solve. I find it fun to write games in a cross platform manner than actually running the games I write.
Name:
Anonymous2013-07-27 14:00
check em :D
Name:
Anonymous2013-07-27 14:09
>>11
checked. :D
Name:
Anonymous2013-07-27 14:19
Size doesn't mean quality?! Is that what you told her after she made a comment about your short penis?
Name:
Anonymous2013-07-27 14:30
>>13
Your mom must be full of quality, judging by her size.
Name:
Anonymous2013-07-28 8:40
How efficient is the following tagbody in Scheme? Does it compile to jmps in your favorite compiler? https://raw.github.com/barak/scheme9/master/lib/tagbody.scm
; Scheme 9 from Empty Space, Function Library
; By Nils M Holm, 2010
; Placed in the Public Domain
;
; (tagbody {<label> | <statement>} ...) ==> unspecific
; (go <label>) ==> undefined
;
; (load-from-library "tagbody.scm")
;
; Implement Common LISP-style TAGBODYs. Each symbol in the TAGBODY
; will be interpreted as a <label> and each list as a <statement>. The
; <statement>s are executed in order exactly like in BEGIN. However,
; when a <statement> executes (go <label>), then control will be
; transferred to the specified label immediately. GO never returns.
; TAGBODY does not deliver any meaningful value.
;
; Caveat: nested TAGBODYs are handled through a global variable.
;
; This construct has probably no practical use in Scheme and I am
; not sure why I wrote it in the first place.
;
; Example: (let ((x 10)
; (x0 1)
; (x1 1))
; (tagbody
; fib
; (if (zero? x)
; (go end))
; (let ((t x1))
; (set! x1 (+ x0 x1))
; (set! x0 t))
; (set! x (- x 1))
; (go fib)
; end)
; x1) ==> 144