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

Macro-writing challenge

Name: Anonymous 2016-01-16 13:19

Write a macro check-arguments-non-nil to be used in function definitions, that would expand to assertion about every argument being non-nil.
The intended usage of this macro:

(defun foo (a b c d)
(check-arguments-non-nil)
foo-body)


This should expand to:

(defun foo (a b c d)
(assert (and (not (null a)) (not (null b)) (not (null c)) (not (null d)))
(a b c d)
"Null argument in FOO")
foo-body)


The macro must work whatever the number and names of the function parameters.

Name: Anonymous 2016-01-23 11:19

>>82
H a s k e l l & L i s p u s e w h i t e s p a c e a s a s e p a r a t o r . W h y t h e f u c k d o y o u n e e d m o r e p u n c t u a t i o n t h a n t h a t ? C s y n t a x i s j u s t m e s s y a n d b a c k w a r d s i n i t s g o a l s : H a r d e r t o p a r s e , h a r d e r f o r t h e h u m a n t o i n p u t , h a r d e r f o r t h e h u m a n t o r e a d.

When(C) came.out();
everybody? was:railing; against== the ridiculous semicolons everywhere;
because other languages weren't stupid enough to do that;
You're= just= living( in(an,nage))->of Stockholm Syndrome;

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