Re: Cons cell archaic!?
- From: "xahlee@xxxxxxxxx" <xahlee@xxxxxxxxx>
- Date: Fri, 10 Oct 2008 15:37:51 -0700 (PDT)
On Oct 10, 9:34 am, Majorinc Kazimir <fa...@xxxxxxxxxxxxx> wrote:
Anticomuna wrote:
How? Is there anything wrong with the concept? I thought it was so
easy to parse the S-expressions because of it. Is this really a
problem for Lisp or this is more of a non-Lisper automatic reaction to
something he is not used to?
Lisp can use other, alternative representations
of lists, without cons. Single linked lists, and
particularly Common Lisp and Scheme representation is
optimized for memory use, and designer accepted
some logical (or at least aesthetic) disadvantages
to achieve that.
One thing to keep in mind in this topic is the separation of syntax
and implementation.
For example, take lisp's cons. You can have a lang that walks and
quacks like cons, but the implementation can be nothing like linked
list. Conversely, many langs, in fact almost all langs, that has some
senes of list as a datatype, can implement it as linked list, array,
hash table. In fact, what exactly each of these jargons means is
pretty much dependent on the language now. (e.g. in PHP, a list is a
array and hashtable too. In Mathematica, List is what compiler geekers
typically a array. In Perl, Python, you have hashtable and dictionary.
In perl, list and array are distinct, but its list is nothing like
lisp's list. In many lang, some call these sequence, map, aggregate...
in Java, it separated things into the concept of Interfaces. Some lang
call these type of things sequence in their own idiosyncratic way
(e.g. Python, Emacs Lisp), some include strings as such type (e.g.
elisp, python) while not others (e.g. PHP, Perl). Then ther's also
“vectors”, ...)
So... it is important to have a clear idea of what we are talking
about. Are we talking about implementation? Are we talking about the
interface aspect (i.e. the language syntax)?
different lang in different degrees mix up the interface and
implementation concept. For example, Mathemtica goes for a pure,
interface, mathematical, aspect on threating this subject. Java makes
it clear by separating interface and implementation so that it
actually have a Interface language thingy. In PHP, it's all mushed up,
by a extremely practial point of view. Lisp, ties up its syntax of
cons with linked list tightly.
Further readings:
• Fundamental Problems of Lisp
Xah Lee, 2008
http://xahlee.org/UnixResource_dir/writ/lisp_problems.html
• The Concepts and Confusions of Prefix, Infix, Postfix and Fully
Nested Notations
Xah Lee, 2006
http://xahlee.org/UnixResource_dir/writ/notations.html
See also:
• Jargons of Info Tech industry
http://xahlee.org/UnixResource_dir/writ/jargons.html
plain text version follows:
--------------------------------
Jargons of Info Tech industry
(A Love of Jargons)
Xah Lee, 2002-02
People in the computing field like to spur the use of spurious
jargons. The less educated they are, the more they like extraneous
jargons, such as in the Unix & Perl community. Unlike mathematicians,
where in mathematics there are no fewer jargons but each and every one
are absolutely necessary. For example, polytope, manifold, injection/
bijection/surjection, group/ring/field.., homological, projective,
pencil, bundle, lattice, affine, topology, isomorphism, isometry,
homeomorphism, aleph-0, fractal, supremum/infimum, simplex, matrix,
quaternions, derivative/integral, ... and so on. Each and every one of
these captures a concept, for which practical and theoretical
considerations made the terms a necessity. Often there are synonyms
for them because of historical developments, but never “jargons for
jargon's sake” because mathematicians hate bloats and irrelevance.
The jargon-soaked stupidity in computing field can be grouped into
classes. First of all, there are jargons for marketing purposes. Thus
you have Mac OS “X”, Windows “XP”, Sun OS to Solaris and the
versioning confusion of 4.x to 7 to 8 and also the so called
“Platform” instead of OS. One flagrant example is Sun Microsystem's
Java stuff. Oak, Java, JDK, JSDK, J2EE, J2SE enterprise edition or no,
from java 1.x to 1.2 == Java 2 now 1.3, JavaOne, JFC, Jini, JavaBeans,
entity Beans, Awk, Swing... fucking stupid Java and fuck Sun
Microsystems. This is just one example of Jargon hodgepodge of one
single commercial entity. Marketing jargons cannot be avoided in
modern society. They abound outside computing field too. The Jargons
of marketing came from business practice, and they can be excusable
because they are kinda a necessity or can be considered as a naturally
evolved strategy for attracting attention in a laissez-faire economy
system.
The other class of jargon stupidity is from computing practitioners,
of which the Unix/Perl community is exemplary. For example, the name
Unix & Perl themselves are good examples of buzzing jargons. Unix is
supposed to be opposed of Multics and hints on the offensive and
tasteless term eunuchs. PERL is cooked up to be “Practical Extraction
& Reporting Language” and for the precise marketing drama of being
also “Pathologically Eclectic Rubbish Lister”. These types of jargons
exude juvenile humor. Cheesiness and low-taste is their hall-mark. If
you are familiar with unixism and perl programing, you'll find tons
and tons of such jargons embraced and verbalized by unix & perl
lovers. e.g. grep, glob, shell, pipe, man, regex, more, less, tarball,
shebang, Schwartzian Transform, croak, bless, interpolation,
TIMTOWTDI, DWIM, RFC, RTFM, I-ANAL, YMMV and so on.
There is another class of jargon moronicity, which i find them most
damaging to society, are jargons or spurious and vague terms used and
brandished about by programers that we see and hear daily among design
meetings, online tech group postings, or even in lots of computing
textbooks or tutorials. I think the reason for these, is that these
massive body of average programers usually don't have much knowledge
of significant mathematics, yet they are capable of technical thinking
that is not too abstract, thus you ends up with these people defining
or hatching terms a-dime-a-dozen that's vague, context dependent,
vacuous, and their commonality is often a result of sopho-morons
trying to sound big.
Here are some examples of the terms in question:
* anonymous functions or lambda or lamba function
* closure
* exceptions (as in Java)
* list, array, vector, aggregate
* hash (or hash table) ← fantastically stupid
* rehash (as in csh or tcsh)
* regular expression (as in regex, grep, egrep, fgrep)
* name space (as in Scheme vs Common Lisp debates)
* depth first/breadth first (as in tree traversing.)
* operator
* operator overloading
* polymorphism
* inheritance
* first class objects
* pointers, references
* tail recursion
My time is limited, so i'll just give a brief explanation of my thesis
on selective few of these examples among the umpteen.
In a branch of math called lambda calculus, in which much theories of
computation are based on, is the origin of the jargon _lambda
function_ that is so frequently reciprocated by advanced programering
donkeys. In practice, a subroutine without side-effects is supposed to
be what “lambda function” means. Functional languages often can define
them without assigning them to some variable (name), therefore the
“function without side-effects” are also called “anonymous functions”.
One can see that these are two distinct concepts. If mathematicians
are designing computer languages, they would probably just called such
thing _pure functions_. The term conveys the meaning, without the
“lamba” abstruseness. (in fact, the mathematics oriented language
Mathematica refers to lambda function as pure function, with the
keyword Function.) Because most programers are sopho-morons who are
less capable of clear thinking but nevertheless possess human vanity,
we can see that they have not adopted the clear and fitting term, but
instead you see lambda function this and that obfuscations dropping
from their mouths constantly.
Now the term “closure” can and indeed have meant several things in the
computing field. The most common is for it to mean a subroutine that
holds some memory but without some disadvantages of modifying a global
variable. Usually such is a feature of a programing language. When
taken to extreme, we have the what's called Object Oriented Programing
methodology and languages. The other meaning of “closure” i have seen
in text books, is for it to indicate that the things in the language
is “closed” under the operations of the language. For example, for
some languages you can apply operations or subroutines to any thing in
the language. (These languages are often what's called “dynamic
typing” or “typeless”). However, in other languages, things have types
and cannot be passed around subroutines or operators arbitrarily. One
can see that the term “closure” is quite vague in conveying its
meaning. The term nevertheless is very popular among talkative
programers and dense tutorials, precisely because it is vague and
mysterious. These pseudo-wit living zombies, never thought for a
moment that they are using a moronic term, mostly because they never
clearly understand the concepts behind the term among the contexts.
One can particular see this exhibition among Perl programers. (for a
example of the fantastically stupid write-up on closure by the Perl
folks, see “perldoc perlfaq7” and “perldoc perlref”.)
in the so-called “high-level” computing languages, there are often
data types that's some kind of a collection. The most illustrative is
LISt Processing language's lists. Essentially, the essential concept
is that the language can treat a collection of things as if it's a
single entity. As computer languages evolve, such collection entity
feature also diversified, from syntax to semantics to implementation.
Thus, beside lists, there are also terms like vector, array, matrix,
tree, hash/“hash table”/dictionary. Often each particular term is to
convey a particular implementation of collection so that it has
certain properties to facilitate specialized uses of such groupy. The
Java language has such groupy that can illustrate the point well. In
Java, there are these hierarchy of collection-type of things:
Collection
Set (AbstractSet, HashSet)
SortedSet (TreeSet)
List (AbstractList, LinkedList, Vector, ArrayList)
Map (AbstractMap, HashMap, Hashtable)
SortedMap (TreeMap)
The words without parenthesis are Java Interfaces, and ones in are
implementations. The interface hold a concept. The deeper the level,
the more specific or specialized. The implementation carry out
concepts. Different implementation gives different algorithmic
properties. Essentially, these hierarchies of Java show the potential
complexity and confusion around groupy entities in computer languages.
Now, among the programers we see daily, who never really thought out
of these things, will attach their own specific meaning to list/array/
vector/matrix/etc type of jargons in driveling and arguments,
oblivious to any thought of formalizing what the *** they are really
talking about. (one may think from the above tree-diagram that Java
the language has at least put clear distinction to interface and
implementation, whereas in my opinion they are one fantastic *** up
too, in many respects. (See On Java's Interface))
Xah
∑ http://xahlee.org/
☄
.
- References:
- Cons cell archaic!?
- From: Anticomuna
- Re: Cons cell archaic!?
- From: Majorinc Kazimir
- Cons cell archaic!?
- Prev by Date: Re: Cons cell archaic!?
- Next by Date: xmlisp problems
- Previous by thread: Re: Cons cell archaic!?
- Next by thread: Re: Cons cell archaic!?
- Index(es):