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

POLL: What's your favorite language?

Name: Anonymous 2009-07-12 16:09

One vote per person.  Posts that appear to be bot generated or same person will not be counted.

I'm going with java(and by that I really mean java+eclipse).  Programming without eclipse is like putting a screw into hard wood without pre-drilling a hole.

Name: Anonymous 2009-07-15 0:32

>>66
Yes, >>67 has the right of it. Common Lisp has separate namespaces for functions and variables, or said another way, a symbol has both a function cell and a value cell. If I bind a symbol to a value using “let”, or “defvar”, or if it's a parameter to a function, then that symbol's value cell is bound. If I define a function with “flet”, “defun” “labels”, or run “(setf (symbol-function 'foo) (lambda ...))”, then the function cell is bound.

Variable lookups use the value cell, and function lookups (for example when a symbol appears in the car of list to evaluate — a function call like “(foo)”) use the function cell. So for example, the following causes no collisions.
* (setf (symbol-value 'foo) 3)

3
* (setf (symbol-function 'foo) (lambda () (print 'something)))

#<FUNCTION (LAMBDA ()) {ACBA5C5}>
* foo

3
* (foo)

SOMETHING
SOMETHING


The upshot is that I can use names like “list” and “floor” for variables without clobbering any functions, which is absolutely wonderful. And even better, it means that I don't have to worry about accidentally clobbering functions that a macro I'm using relies on.

Scheme, for no reason at all, failed to copy this feature, and it's led to no end of trouble. Ugly variable names and bizarre “hygienic” macro systems are the big warts. Hey Scheme, maybe if you hadn't put your toilet in your kitchen, you wouldn't be freaking out over “hygiene”.

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