I still can't get my head around prefix notation. I heard Scheme is easier though. Seriously, why do practitioners of Lisp-like languages claim it's so good? I honestly cannot see the big deal, it's an old, slow, awkward and overall clunky language to use.
Name:
Anonymous2007-12-05 14:26
lol holy shit you fucking faggots
If you just learned lisp yesterday (or you're slow and you've been learning it for 10 years but still think it's the best thing in the world), infix arithmetic is better!
Simply fucking is you idiot.
The reason prefix notation is better is because you have a single uniform representation of code and [u]data[/d], the language is homoiconic.
(= CODE DATA) ;; BITCH DO YOU UNDERSTAND??
something like 2 + 4*x is BETTER than (+ 2 (* 4 x)), ALSO 2 + (4*x) is just TOTALLY STUPID LEARN TO CONTEXT FREE PARSE IN YOUR HEAD!!!!
Look I doubt any of this is getting through to the smug lisp newbies and the C faggots (even more inexperienced than smug lisp newbies) but as a summary:
* Every language (ignoring shit ones) is different and will stretch your mind and let you program in a new way
* Lisp has prefix notation and s-expression because this works beautifully with homoiconicity, macros etc
* Infix arithmetic is more readable, easier to manipulate algebraically so it IS simply better -- this does not detract from the beauty and elegance of Lisp
* THERE IS NO LANGUAGE WAR/CONTEST, IF YOU DONT KNOW HOW TO PROGRAM WELL IN EVERY SINGLE LANGUAGE YOU FAILED ARUGING ABOUT PROGARMMING LANGUAGE CHOICE IS FOR CHILDREN AND REDDIT USERS.
.... I think that I had a point..... didn't I?
Name:
Anonymous2007-12-05 14:56
The reason prefix notation is better is because you have a single uniform representation of code and [u]data[/d], the language is homoiconic.
If you mean the fact that in Lisp everything is a car, a cudder, or a paren (a list generally), then yes, I agree. The car of anySEXP is the operator; the cudder are the arguments. This way, you can clearly see the operator of any expression. The prefix notation also makes the INDENTATION prettier.
>>41
Nothing in your post made any sense whatsoever.
And you also fail at BBCode.
An hero tiem.
Name:
Anonymous2007-12-05 16:59
>>41
The reason fucking men in the ass is better than fucking women is because you have a single uniform representation of gender, the fucking is homosexual.
(= PENIS ASS) ;; BITCH DO YOU UNDERSTAND?
I DO NOT NEED TO EXPLAIN THIS ANY FURTHER, THE TERM HOMOSEXUAL SHOULD BE PROOF ENOUGH.
>>56
Don't you mean (setf a (apply #'* (list 4 (apply #'+ (list 73 5)))))?
Name:
Anonymous2007-12-05 18:47
>>59
It's a macro which allows you to make closures.
Name:
Anonymous2007-12-05 18:52
>>61
But why do you guys keep talking about it like it's standard?
Name:
Anonymous2007-12-05 19:05
Because it's in the CL ansi standard.
Name:
Anonymous2007-12-05 19:43
>>62
it's not standard, then again neither is (iter), yet everybody uses it. It's a general binding macro, includes let, multiple-value-bind, and stuff.
Name:
Anonymous2007-12-05 19:50
>>64
Iterate I know, but I've never seen with mentioned outside /prog/.
>>68
yes.
but i'm not >>59. then again it's not a macro to create closures.
Name:
Anonymous2007-12-05 22:28
>>14
wow, what a fail language.
here's fizzbuzz in a much cleaner language: : d dupd mod zero? ;
100
[
1+ 15 d [ drop "FizzBuzz" ]
[
3 d [ drop "Fizz" ]
[
5 d [ drop "Buzz" ] when
] if
] if .
] each
Name:
Anonymous2007-12-05 23:04
>>70
That CL version is maybe more verbose than necessary.
>>74
Your first example is insufficiently verbose.
Name:
Anonymous2007-12-06 0:33
(loop for i from 1 to 100
do (cond ((= 0 (mod i 15)) (format t "FizzBuzz~%"))
((= 0 (mod i 3)) (format t "Fizz "))
((= 0 (mod i 5)) (format t "Buzz "))
(t (format t "~a " i))))