Re: Seeking computer-programming job (Sunnyvale, CA)
Adlai wrote:
On May 16, 7:46 am, Series Expansion <sere...@gmail.com> wrote:
[Some attributions are missing. Sorry.]
But that has nothing to do with dynamic typing...(Aside from the fact
that it is very hard (most likely impossible) to do this sort of stuff
in a statically typed language).
Do what sort of stuff? Accidentally wind up with a Float in a pack of
Strings? Why would you want to? :)
Do things like have a pack of THINGS, rather than a pack of strings.
You can do that in Java. List<Object>, anyone?
Paul Graham repeats often, for good reason, that one of Lisp's great
strengths is its flexibility. You can have a heterogenous list and
Lisp won't blink.
Series mentioned some Java myths being perpetuated in this thread: Java
is slow, Java lacks reflection, Java isn't Turing complete. Well, this
seems to be another one: Java doesn't have heterogeneous lists.
Heck, prior to version 5 it didn't have NONheterogeneous lists.
Sheesh!
You can have a function that returns some data, or
NIL if the data is unavailable.
Java can do this (return an object or null), and java.util.Map.get()
does it and is in the standard library.
Lispers, please at least *learn* a bit about Java before criticizing it!
You can bind the result of that function to a variable without
worrying about types.
Java programmers wish for a way to bind something to a variable that
WILL generate compiler errors if it might be null, and they want that
variable to have to be non-null. So they could write:
@NotNull String s;
{
String t = map.get(key);
if (t == null) {
// Do something;
} else {
s = t;
}
}
s.length();
and the compiler would check that the assignment of t to s cannot
possibly assign null.
Java 7 might have this feature.
At least Java meta-programming doesn't have the bane of macro-based
meta-programming: variable capture.
Variable capture is a useful tool sometimes, for example in anaphoric
macros.
No normal application developer is going to, or should need to, concern
himself with "anaphoric" anything. At least not unless he works in
engineering on the starship enterprise, where not a day goes by without
metaphasic this, polaric that, and all kinds of fluxes and subspace
whosits needing to be dealt with.
Java is meta-programming for JVM bytecode. Lisp is meta-programming
for Lisp. By being a meta-language for itself, Lisp allows you to
express a huge variety of concepts.
Including such doozies as "this statement is false"?
Unbounded self-referentiality reputedly drove Georg Cantor mad and led
to the reformulation of half of mathematics to avoid inconsistencies
like that.
Your imagination is really the only significant limit, second maybe
to carpal tunnel
In what dream world? Here in the real world we also have to worry about
code maintainability, code readability to other people, and bug hunting,
not to mention slippery requirements and user complaints of every stripe.