Re: Seeking computer-programming job (Sunnyvale, CA)

T

Thomas M. Hermann

No, it's two different Lisp users contradicting each other about Lisp
here that I'm pointing out, not a Lisp and a Java user disagreeing.
(Though we've had lots of that, too.)

That is the problem with relying on a usenet thread for your
information about Lisp. If you are interested in understanding Lisp,
you would be much better served referencing a Lisp text and the Common
Lisp Hyperspec.
How ugly. Imports shouldn't genuinely change package membership, just
visibility. Now people can use my-package:sym when sym is really foo:sym!

Imports don't genuinely change package membership. People will not be
able to use my-package:sym if sym is really foo:sym.
Furthermore, the explicit :use #:cl must be something like having an
explicit import java.lang.*; in Java. Java does that automatically so
you don't have to. That's one more point in favor of Java, albeit a very
minor one.

Having the option of not using the external symbols of the COMMON-LISP
package is particularly useful when you are implementing a DSL or even
creating a new language on top of Common Lisp. This is neither a point
in favor of or against Common Lisp, it is merely a feature to
facilitate certain types of programming.

Hope that helps,

Tom
 
S

Series Expansion

I agree on both counts.  This weekend has been very entertaining.
It's like the standard formula for SitComs on TV, where the
protagonist gets the entirely wrong idea about some reality, and the
interactions with the antagonists generates the humor to the delight
of the audience.

These tiresome personal attacks do not constitute rational arguments
in favor of either Lisp or Java, Duane, Scott, and Thomas.

[rest deleted]
 
S

Series Expansion

Both are absent at the same time through the magic of killfiles.

These tiresome personal attacks do not constitute rational arguments
in favor of either Lisp or Java, "Lew" and Larry.
 
A

Alessio Stalla

That would be even worse: not only would methods and classes both have
to be scoped, so thing.method() would have to have two scopes decided
somehow (and the type of "thing" cannot be a factor in compile-time name
resolution, since as far as the compiler is concerned it could be
anything), but method names and class names could now collide with one
another, and possibly with other things too!

They don't, because a name can refer to more than one "thing" at once,
and the intended meaning is apparent from the context:

(make-instance 'name ...) ;class name
(name ...) ;function, macro or special operator
(setq name 45) ;variable

etc.
At first this might not seem so bad, since nouns and verbs are mostly
nonoverlapping sets. But some common cases are exceptions: a jump vs. to
jump, for example.

There has been some example code and other text that collectively
implied that Lisp identifiers are not case-sensitive, which means that
using a Java-esque convention of Jump for the noun and jump for the verb
would not avoid a collision.

Worse, this also means JUMP for a global constant will collide with both.

What a mess!



In at least one instance, that is not true.



The methods, yes. It's the little bit of code containing the dispatch
table that concerns me.
Someone has to add a (YOUR:quux YOUR:quux) dispatch to MY:frobnobdicate, for example.

Only if he/she wants to use MY:frobnobdicate with YOUR:quux, which may
or may not make sense depending on what MY:frobnobdicate and YOUR:quux
mean.

For example, it is very sensible to do:

(defmethod common-lisp:print-object ((object my-library:my-
class)) ...printing code for my objects...)

- I have explicitly used common-lisp: here even if it's superfluous
(like java.lang) to make things clearer -

it probably does not make much sense to do

(defmethod db-library:eek:pen-transaction ((transaction-manager picture-
library:jpeg-picture)) ...whatever...)
If that someone is you, then
you may become a bottleneck in the development effort. If that someone
is the owner of YOUR, then everyone can trample your MY:frobnobdicate
garden. Either way, as team size increases there will be growing pains.

Add to that the misery of the user of these methods having to sort them
all out and explicitly scope at least part of at least three of them and
all of at least one of them.



Encapsulation, among other things I've already explained in previous posts.

You can have encapsulation even if packages are not tied to classes,
since packages have the concept of internal ("private") and external
("public") symbols. Which, due to the generality of symbols,
automatically can make private/public anything - classes, functions,
variables, anything that can be named by a symbol.
That's when you're referring to just one of those. I'm discussing the
commonplace situation when you're referring to one of each. Then you
need to specify 2 packages. Somehow.

You *need* to specify 2 packages only if you have imported *neither*
symbol in your package, which is quite unusual. Else, you can use
symbols unqualified, and this is the general case.
If you could actually do that, the above sentence would actually be
relevant to this discussion.



The (foo foo) (bar bar) syntax does not allow to "define a general
case", save if all project objects inherit from some class, say Object,
and you put in a dispatch for (Object Object) (Object Object), and this
respects inheritance, so any call lacking a more specialized applicable
dispatch with arguments both inheriting from Object will get that dispatch.

Then the real fun begins: enforcing "NO CLASSES NOT DERIVED FROM
OBJECT!!" everywhere in the project. Unless CLOS already has an
omni-superclass like Java's java.lang.Object class.

Guess what? It has, it's the class named T. So I can:

(defmethod do-something (arg1 arg2) ...) ;arg1 arg2 can be of any
class - generic behavior
(defmethod do-something ((arg1 my-class) arg2) ...) ;behavior specific
to my-class
(defmethod do-something ((arg1 subclass-of-my-class) arg2) ...) ;more
specific method

Nobody mentioned method combinations, and I won't now - already too
many things being discussed - but that's another of the big strengths
of CLOS.
It is easy to express precisely nowhere. CLOS lets you lump everything
to do with X, Y, and Z together in the same place. So? This might easily
end up meaning pretty much the whole project. So much for namespaces,
nevermind encapsulation, which we'd already given up on ages ago.

A fantasy example:

(defgeneric print (object medium))

(defmethod print ((object text) (medium terminal)) ...)
(defmethod print ((object text) (medium laser-printer)) ...)

(defmethod print ((object image) (medium terminal)) ...)
(defmethod print ((object image) (medium laser-printer)) ...)

This is easy to express in CLOS, not that easy to express in Java or C+
+ or Python or any other single-dispatch OO system.

One option is to arbitrarily make one of the two classes "more
important":

interface Printable {
public void printOn(Medium medium);
}

class Text implements Printable {
public void printOn(Medium medium) {
if(medium instanceof Terminal) {
...
} else if(medium instanceof LaserPrinter) {
...
} else {
throw new IllegalArgumentException("Don't know how to print " +
this + " on " + medium);
}
}
}

....same for Image...

Another option is to concentrate the printing code in a third class:

abstract class Printer {

public void print(Printable object, Medium medium) {
if((object instanceof Text) && (medium instanceof Terminal)) {
...
} else ... //you get the idea
}

}

Neither option is good imho, since both force you to explicitly code
dispatch tables and manually maintain them - exactly what you DON'T
have to do with CLOS.
I do not know, though strongly suspect "appearing to be the victor of a
particular Usenet pissing match" to be among his motives. Nonetheless,
what he claimed flies in the face of logic.


That statement makes several insulting and false insinuations about me.

I'm sorry, but I genuinely think you are in error, else I wouldn't
write here. The same is true for you wrt. me, I suppose.
I'm glad that particular dispute is finally settled.



Sophistry. It doesn't change the base class itself, and indeed, code
that uses the base class won't be affected unless someone passes it a
reference to a derived-class instance.

Then, it changes the class, since you get different results while
still using the same class.
Since there aren't separate "base" and "derived" generic functions in
Lisp, however, the above does not apply there, and the "base itself" IS
changed.

Uh-oh.

*in this context*, the following analogy more or less holds:

generic function --> abstract class
method --> concrete class
more specific method --> concrete subclass

The generic function is not changed any more than the abstract class
is.
Given all the places things can be squirreled away, a) defining such a
convention to be both complete and consistent will be non-trivial and b)
so will enforcing it.

In fact, the potential complexity of the system you've described may
suffice to invoke the incompleteness theorem, ensuring that NO
convention could EVER be devised to be both complete and consistent.


But the more ways there are to do a thing, the worse it gets; indeed,
you can easily get a combinatorial explosion like the one that nuked
perl as a viable language for large-scale development efforts.

That's subjective, and I won't debate it here. I prefer the there's-
more-than-one-way-to-do-it philosophy, but it's just personal
preference.
Java needs relatively few conventions BESIDES how to name packages. Lisp
will need a convention the documentation of which would consume 74,172
trees (plus or minus five) to print and massing 11.3 tons. Looking up
anything in the convention will take 1 month, 17 days, 3 hours and 11
minutes, plus or minus one, assuming it's found on average halfway
through. The one upside is that it will make one hell of a paperweight
or doorstop.

Interesting, and which studies back up your precise data?
Yes. Thomas said you'd not use "close" for everything that closes, which
means Fun With Your Thesaurus time folks!


This vs. Java's fileStream.close(). And you guys said *Java* is bloated
and looks like vomit?!

I personally don't think Java the language + standard library is
generally bloated. I believe some widely-adopted practices, and some
widely-used libraries, do favor bloat in Java.
I also don't think Java looks like vomit, if you don't make it look
like that. Though I do think that expressing some things in Java is
not as easy as in Lisp.
For what I know, both Java and Common Lisp have been accused of being
"bloated" for a period of their respective history.

I can only say - only personal experience, no scientific data - that
writing both Java and Common Lisp, I generally find Common Lisp more
expressive and more readable, even if I have much more experience in
Java than in Lisp. This might simply mean Lisp is more close than Java
to my own way of thinking.
 
S

Series Expansion

Do us a favor and let it wind down off the Java group, hm?

These tiresome personal attacks do not constitute rational arguments
in favor of either Lisp or Java, "Lew" and Paul.
 
S

Seamus MacRae

That statement makes several insulting and false insinuations about me.
OK, that's comedy gold right there.
[a lot of flamage and no worthwhile content]
I don't even know you. Why appear out of nowhere just to conduct a
drive-by flaming of a random bystander?

Because on the (remote) offchance that somebody who's curious about CL
is still reading this thread, I would hate for them to believe the
misguided nonsense you have posted.

I have posted no misguided nonsense. On the other hand, you have so far
devoted all three of your posts to this thread to exactly that.
The word "nonsense" is justified because [insult] and you have not shown
any interest in providing any corroborating evidence (or even a cogent
argument).

Those are damned lies! I have supplied lots of cogent arguments and the
occasional citation or other form of evidence.

The closest to "evidence" you lot seem to get, meanwhile, is anecdotes,
assertions, and holier-than-thou attitudes.
Note that I did not call you a liar, because I do not know you.

Perhaps you could extend this courtesy to some of the other
participants?

Certainly, but not to you; you publicly called me several inapplicable
names when you should have known better, and that makes you a liar.
Jamie

PS: "drive-by flaming" is marvellous. Thanks!

Well, that's no longer applicable now that you've unfortunately decided
to return to the scene and then become a repeat offender.
 
P

Pillsy

Pillsy said:
I do not know, though strongly suspect "appearing to be the victor of a
particular Usenet pissing match" to be among his motives. Nonetheless,
what he claimed flies in the face of logic. [...]
That statement makes several insulting and false insinuations about me..
OK, that's comedy gold right there.
No, that's an intentional and dishonest misquotation of me that takes
one of my comments out of context.

Or not. In one paragraph, you're complaining insulting insinuations
about a third party (Thomas A. Russ), and in next, you're complaining
about someone making insulting insinuations about you.
[...]
Clearly the first paragraph by me refers to Thomas and the second to
some text that Thomas wrote.

So clearly, in fact, that my change did nothing to obscure that fact.
Your lucid writing almost makes up for your hypocrisy and willful
ignorance. FSVO "almost", anyway.
intentionally misquote me

Well, if you insist!

Pillsy
 
A

Alessio Stalla

Yes, really, as explained previously. No clever attempt at a
workaround will fail to contain some subtle flaw, if not an overt one.


Use of global variables, of course, is the flaw in this instance. And
not a subtle one.

*sigh* I purposedly declared a global variable to show how my macro
DOES NOT use global variables! It's the user-supplied code - "(incf
generated-variable)" - that accesses and modifies the global variable.
The macro does not interfere at all with this!

In fact, part of the output of the macro is

"Global variable?" NIL

NIL means false. The macro is checking whether the temporary variable
it introduces is globally bound, and finds it isn't - it cannot be,
since its name is guaranteed to be unique! If you don't believe it,
this is the same macro without any global variables:

* (LOGICALLY-IMPOSSIBLE-MACRO (print 3))

3
("Using generated symbol: " #:G622 "Multiple Evaluation?" NIL
"Global variable?" NIL "Variable hiding?" 42)

As you see, user code is evaluated only once - the 3 is printed once -
no global variables are used, no variable capture can occur since the
*local* variable introduced by the macro - #:G622 in this case - is
guaranteed not to clash with any other variable. Yes, it uses a trick,
generating a unique symbol, which is probably only used in Lisp and
not widely known elsewhere, since Lisp is the only language I know of
where symbols are first-class objects. Well, there's Prolog too IIRC,
but I don't think Prolog has macros ;). Is it clear now?

Alessio
 
A

Alessio Stalla

Not as nicely as I'll bet you can do it with Lisp macros or just
diddling those dispatch tables.

Ah, you mean the DEFGENERIC and DEFMETHOD macros?
It is not.

Then, by the same principle inheriting from a class gets you very
little in Java. I don't believe that.
Only because in Lisp there seems to be no encapsulation to break.

There can be slots named with internal symbols. These are private,
since you cannot import those symbols in your own package. There is a
way to get at them, just like there is reflection in Java, but it's
generally considered bad practice.
but which does NOT exist for the compiler. It's just data, like dates in
a java.util.Calendar.

Which Lisp compiler(s) have you studied to be sure about this?
My point, which you are intentionally trying not to get, is that if that
doesn't *do* much useful beyond save a peck of typing and document the
relationship, then you might as well just document the relationship.

My point, instead, it's that it's NOT documentation because IT HAS
EFFECTS on the behavior of the program!

(defmethod m ((x some-class)) 42)

(defclass c1 () ())
(defclass c2 (some-class) ())

(m (make-instance 'c1)) => error, no applicable method!
(m (make-instance 'c2)) => 42
It changes runtime behavior in ways I just explained how you could
accomplish by other means, using the powers of the macros YOU have been
touting.

I'm already using those powers, by using the macros DEFCLASS,
DEFGENERIC, and DEFMETHOD. I could accomplish the same things with
other means maybe, but why, since there's a perfectly working built-in
solution?
Not if you manually diddle the dispatch table in lieu of subclassing SHAPE.


That is obvious. Perhaps you should clean your reading glasses.

Where in the code I posted do you see a dispatch table?
[naught left but flamage]

Well, this is becoming increasingly useless.

Man, you're right on this one.
 
P

Pillsy

Pillsy wrote: [...]
Well, that's cheating. You're not doing the same exact thing as I was,
which will render any comparison meaningless and result in you failing
to prove that Lisp does it more efficiently, which I assume is your goal.

Why would I do the exact same thing, when doing a somewhat different
thing is more idiomatic Lisp and gets the job done without any more
trouble? I don't know about you, but I don't slavishly immitate
languages I don't use when I work with languages I do.
[...]
This remark does not seem to be relevant.

Of course it's relevant, because the most natural approach to the
problem in Lisp is to group the package definition and the imports
together.
[...]
Except this was in response to, basically, "how does Lisp do import
foo;?". Apparently it was not actually an accurate answer to the posed
question!
That may be because [excuses, excuses]
Are you endeavoring to assist in getting to the truth of the matter of
which language has the more efficient syntax for imports, or are you
intentionally muddying the waters?

The former. But thanks for asking!
 From what you said earlier, it's the other way around, with Lisp
intertwining package declarations and imports and Java keeping them
separate (though all at the top of the source file).

Well, OK, then.
[...]
You were the one to originally raise the question as to which was
easier, in
<[email protected]>:
You implied the Java way of doing things wasn't; by implication, that
the Lisp way of doing things was the easier instead.

So, because I said that I don't think the Java way is much easier than
the Lisp way, I must be implying that the Lisp way must be much easier
than the Java way?

Yeah, your logic is flawless alright.

Sheesh,
Pillsy
 
A

Alessio Stalla

A generic full-fledged IDE. An IDE is more than just the text editor
inside it!

Right: it's the text editor inside it, plus "things" around it. How
silly of me.
 
D

duane

I agree on both counts.  This weekend has been very entertaining.
It's like the standard formula for SitComs on TV, where the
protagonist gets the entirely wrong idea about some reality, and the
interactions with the antagonists generates the humor to the delight
of the audience.

These tiresome personal attacks do not constitute rational arguments
in favor of either Lisp or Java, Duane, Scott, and Thomas.

[rest deleted]

Ah, yes, the attacks. If you're so tired of them, why don't you stop
them?

Duane
 
S

Seamus MacRae

Alessio said:
They don't

Sure they do. Either two identical names collide, or they reside in
distinct namespaces. You just insinuated that methods and classes do not
reside in distinct namespaces (quoted material, very top of this post).
Therefore if one of each with the same name resides in a single one,
they collide. It's elementary logic, Alessio.
Only if he/she wants to use MY:frobnobdicate with YOUR:quux, which may
or may not make sense depending on what MY:frobnobdicate and YOUR:quux
mean.

In your example, though, this combination was used, along with all three
other combinations of whose frobnobdicate and whose quux.
it probably does not make much sense to do

(defmethod db-library:eek:pen-transaction ((transaction-manager picture-
library:jpeg-picture)) ...whatever...)

I don't see why not. Storing jpegs as BLOBs in a DB is not unheard-of.
You can have encapsulation even if packages are not tied to classes,
since packages have the concept of internal ("private") and external
("public") symbols.

You can have THAT level of encapsulation in C, FFS. (Using or
withholding "extern" and with judicious omissions from the .h file.)
Which, due to the generality of symbols,
automatically can make private/public anything - classes, functions,
variables, anything that can be named by a symbol.

But only at the granularity of whole packages. Not single classes or
smaller scales, aside from what Series elsewhere described as the
"natural encapsulation" of functions whereby ordinarily changes to the
function's body that don't change its signature or semantics don't break
code elsewhere in the program.
You *need* to specify 2 packages only if you have imported *neither*
symbol in your package, which is quite unusual. Else, you can use
symbols unqualified, and this is the general case.

Verb collisions are the issue. So many things will have close methods,
for example. If you use several of them in one area, you'll only be able
to import one and you'll have to FQ the others. Unless of course the
library designer did as someone else recently suggested here and cracked
open his thesaurus. (Yuk.)

This is the flipside to the many-times-more-nouns-than-verbs thing. A
lot of verb collisions occur among a small set of especially
frequently-used verbs. The power-law scaling of word frequencies serves
to amplify the difference of nearly an order of magnitude in the numbers
of nouns vs. verbs.
Guess what? It has, it's the class named T.

They have a problem with code readability or something? That reads like
true, a temporary, or, worst, a generic type parameter, not a class name.
Nobody mentioned method combinations, and I won't now - already too
many things being discussed - but that's another of the big strengths
of CLOS.

I'll interpret this as "another of the big headaches of CLOS". It sounds
like one of the biggest headaches of Lisp is the sheer amount of stuff,
special forms, &c. that you'd have to learn to be able to read other
peoples' code written in the stuff. OK, perl is much worse, but still.
A fantasy example:

(defgeneric print (object medium))

(defmethod print ((object text) (medium terminal)) ...)
(defmethod print ((object text) (medium laser-printer)) ...)

(defmethod print ((object image) (medium terminal)) ...)
(defmethod print ((object image) (medium laser-printer)) ...)

This is easy to express in CLOS, not that easy to express in Java or C+
+ or Python or any other single-dispatch OO system.

Eh, Java has already expressed this and very easily. Look at the Java2D
API. Corresponding to "text" and "image" we have Shape and subclasses,
which can draw themselves onto a Graphics2D (polymorphically). And
Graphics2D is gotten by various means, but is itself a polymorphic class
that knows how to turn turtle-graphics commands using the generic
Graphics2D interface into results on particular media. If you're
prepping a print job you'll draw on one subclass of Graphics2D, if on a
window you'll get another. No terminals though, Java2D is all about
bitmapped graphics.

For your example a Java programmer might make a Printable interface with
a printOn(Medium) method specified. Implementations would call Medium
methods such as outputString(String), toggleBold(), or whatever was
supported. VT100Terminal would send appropriate escape sequences for
things like toggleBold() and the string for outputString(String) to
System.out. LaserPrinter would send suitable printer control commands to
the parallel port.

Then you could have aText.printOn(aVT100), etc.

I don't know what you were hoping to do with images there; error when
the target was a terminal and print on a printer? That might require
Java2D and adding a getGraphics() to Medium, returning null for
VT100Terminal -- an OOB not-available value printOn would check for.
Image might attempt to gracefully degrade showing a Lynx-style "[IMAGE]"
or attempting to cruft up an ASCII-art approximation using some
algorithm or another, or just complain with an exception. Alternatively,
Medium could throw a GraphicsUnsupportedException or similar from
getGraphics() instead of returning null if the target didn't support
graphics.

All of this with single dispatch.

Where I find myself most wanting double dispatch is when there's two
type hierarchies that need some combined operations, but there's no
natural way to orthogonalize the operations. With most forms of drawing
or printing, though, you can turn the document into a series of
primitive operations of some kind at the document end, and implement the
primitive operations on the medium end. The Graphics2D class is a good
one to check out as its API contains such a set of primitive operations.

http://java.sun.com/javase/6/docs/api/java/awt/Graphics2D.html

A lot of the methods are inherited from

http://java.sun.com/javase/6/docs/api/java/awt/Graphics.html
One option is to arbitrarily make one of the two classes "more
important":

interface Printable {
public void printOn(Medium medium);
}

class Text implements Printable {
public void printOn(Medium medium) {
if(medium instanceof Terminal) {
...
} else if(medium instanceof LaserPrinter) {
...
} else {
throw new IllegalArgumentException("Don't know how to print " +
this + " on " + medium);
}
}
}

...same for Image...

Bletcherous. See above for the alternative that avoids switch, enum,
instanceof, or any other similar kludge.
Another option is to concentrate the printing code in a third class:

abstract class Printer {

public void print(Printable object, Medium medium) {
if((object instanceof Text) && (medium instanceof Terminal)) {
...
} else ... //you get the idea
}

}

Neither option is good imho, since both force you to explicitly code
dispatch tables and manually maintain them - exactly what you DON'T
have to do with CLOS.

Except that a) I just showed how to avoid doing so -- in this case at
least -- in Java, and b) Anonymous C Lisper does exactly that with CLOS
to judge by his one major post containing sample Lisp code.
That statement makes several insulting and false insinuations about me.

I'm sorry, but I genuinely think [repeats insults]

Think what you want, but please restrain the urge to blurt out uncivil
things in public. Weren't you taught any manners as a child?
Then, it changes the class

It does not.
*in this context*, the following analogy more or less holds:

generic function --> abstract class
method --> concrete class
more specific method --> concrete subclass

Except when you subclass a class, you're making an altered copy in
essence; when you add to a generic method, you're fiddling with the
original, not a copy, and maybe it wasn't "yours".

See above re: MY:frobnobdicate with YOUR:quux.
The generic function is not changed any more than the abstract class
is.

Sure it is. The abstract class still contains exactly the same methods.
The generic function contains new ones. Viewing both as lists, one grew
and one didn't.
That's subjective, and I won't debate it here. I prefer the there's-
more-than-one-way-to-do-it philosophy, but it's just personal
preference.

It's a preference that suggests you tend to work alone or on a small
team. Working on a large team results in there's-too-many-ways-to-do-it
being a very real possibility, with everyone doing the same "it"
differently and everyone having to know every single language feature,
however obscure.

Without the javadocs Java's standard library might plausibly have caused
some trouble of a similar nature by its sheer size. It helps though that
there's generally only one or a few clearly-near-optimum use patterns
for a given job, and that everything (mostly) has descriptive names too.
ListIterator and MessageDigest are names that convey quite a bit about
what they do; defgeneric and #:cl #:foo somewhat less so. :)

Which topic came up again; see above.
I personally don't think Java the language + standard library is
generally bloated. I believe some widely-adopted practices, and some
widely-used libraries, do favor bloat in Java.

I'd agree with that assessment. But I didn't say *you specifically* said
Java code looked like vomit. Certainly *one* of you did, though, a few
days ago, and others appeared to hold comparable opinions.
I also don't think Java looks like vomit, if you don't make it look
like that. Though I do think that expressing some things in Java is
not as easy as in Lisp.

Including especially the things that will fry your coworkers' brains, no
doubt. (Though you can be pretty evil with the reflection API, static
initializers and constructors with side effects, asserts with side
effects, ClassLoader tricks, and so forth.)
For what I know, both Java and Common Lisp have been accused of being
"bloated" for a period of their respective history.

Java's library and Common Lisp's object system, I'll bet. But users
don't have to learn the whole library and do have to learn the whole
object system...
I can only say - only personal experience, no scientific data - that
writing both Java and Common Lisp, I generally find Common Lisp more
expressive and more readable, even if I have much more experience in
Java than in Lisp. This might simply mean Lisp is more close than Java
to my own way of thinking.

Subjective statements like that cannot resolve many of the questions
here; at worst they might fan the flames, though maybe with "Lew"
apparently bowing out of it the worst of those are over.

I actually don't think most people here disagree with my main thesis,
which is that Java and Lisp have relative tradeoffs, with neither
invariably superior to the other. The sticking points all seem to
involve specific things claimed to make Lisp superior at one time or
another by only a handful of the most extreme pro-Lisp partisans, and
why these features don't *actually* do so.
 
S

Seamus MacRae

Thomas said:
That is the problem with relying on a usenet thread for your
information about Lisp. If you are interested in understanding Lisp,
you would be much better served referencing a Lisp text

Don't have one, sorry.

My point stands: if you guys can't be arsed to get your act together and
present your case MUCH better, you can hardly complain if you find you
don't manage to acquire many new converts or if you find your various
errors or disagreements being nitpicked by people you'd previously flamed.
Imports don't genuinely change package membership.

But Alessio said "declares that all symbols from packages x and y are
also in package my-package" ...

Sigh. See above.
 
T

Thomas M. Hermann

Don't have one, sorry.

That paragraph does not assign anything to you, so there is nothing
for you to have or not have. It states the problem with relying on
information about a programming language from posts on usenet is that
the information has no assurance of correctness. To avoid this
problem, you should refer to the appropriate texts documenting the
programming language.
My point stands: if you guys can't be arsed to get your act together and
present your case MUCH better, you can hardly complain if you find you
don't manage to acquire many new converts or if you find your various
errors or disagreements being nitpicked by people you'd previously flamed..

There is no case to present. I am not trying to convert anyone. I'm
not complaining about anything. I only wish to provide the necessary
information back by the appropriate references to reduce the confusion
about the behavior of Common Lisp.
But Alessio said "declares that all symbols from packages x and y are
also in package my-package" ...

Sigh. See above.

Fortunately, the behavior of Common Lisp is not specified by what
Alessio said on usenet. Rather, it is specified by the ANSI standard,
accessible online through the Hyperspec.

http://www.lispworks.com/documentation/HyperSpec/Front/index.htm

Specifically

http://www.lispworks.com/documentation/HyperSpec/Body/m_defpkg.htm

Implementation dependent behavior will be specified by the relevant
implementation documentation.

Hope that helps,

Tom
 
A

Adlai

That paragraph does not assign anything to you, so there is nothing
for you to have or not have. It states the problem with relying on
information about a programming language from posts on usenet is that
the information has no assurance of correctness. To avoid this
problem, you should refer to the appropriate texts documenting the
programming language.


There is no case to present. I am not trying to convert anyone. I'm
not complaining about anything. I only wish to provide the necessary
information back by the appropriate references to reduce the confusion
about the behavior of Common Lisp.








Fortunately, the behavior of Common Lisp is not specified by what
Alessio said on usenet. Rather, it is specified by the ANSI standard,
accessible online through the Hyperspec.

http://www.lispworks.com/documentation/HyperSpec/Front/index.htm

Specifically

http://www.lispworks.com/documentation/HyperSpec/Body/m_defpkg.htm

Implementation dependent behavior will be specified by the relevant
implementation documentation.

Hope that helps,

Tom- Hide quoted text -

- Show quoted text -

Supplant to that free books such as PCL and On Lisp. Since you both
(Series and Seamus) seem to mistrust links posted in messages, just
google "Practical Common Lisp", or "Paul Graham" "On Lisp" and you'll
get the respective links.

- Adlai
 
S

Seamus MacRae

Alessio said:
Then, by the same principle inheriting from a class gets you very
little in Java.

No, for reasons I've already explained. In Java you get:
* Assignability to references of the base type(s) (compile-time "is-a")
(no Lisp equivalent),
* Polymorphism (in Lisp you can easily get this without inheritance),
* Tidy delegation of unspecialized methods to base type(s) (in Lisp
you can get this without inheritance with a bit of work),
* Documentation of is-a relationship (in Lisp you can get this with
actual documentation), and
* Access to protected members of base type(s) (no Lisp equivalent).
There can be slots named with internal symbols. These are private,
since you cannot import those symbols in your own package.

So, private in Lisp == "has to fully qualify name" rather than actually
private. How fascinating.
Which Lisp compiler(s) have you studied to be sure about this?

The ones that know about numbers, strings, symbols, cons cells,
functions, macros, and very little else*. You know -- Lisp compilers!
My point, instead, it's that it's NOT documentation because IT HAS
EFFECTS on the behavior of the program!

Effects that I have now had to explain THREE TIMES Lisp lets you get
anyway, unlike Java where you *have* to implement an interface or extend
a class.
(m (make-instance 'c1)) => error, no applicable method!

Yep. Kablooey!
I'm already using those powers

Strange then that when it suits you you appear to suddenly forget they
ever existed.
Where in the code I posted do you see a dispatch table?

I'm thinking of the one in the code Anonymous C Lisper posted. You
neglected to include one in your earlier posts.
About all you get is the least useful OO feature: inheritance of unoverridden
base-class methods.
Read carefully what I wrote above and ask yourself if your statement
above is true.
Your public insinuation that I'm a liar is rude and unwelcome. Please
refrain from engaging in such behavior in the future.
[naught left but flamage]
Well, this is becoming increasingly useless.

[implied insult]

Useless.

* Except parentheses. Lots and lots of parentheses. They're experts in
those.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top