1. Explain
2. Templates
3. Simplicity should be left to the programmer. The language itself should be able to do whatever the programmer needs. If lisp can't do what the programmer needs (which may often be imperative programming), then simplicity in a language merely means less features. You can write simple programs in C++, but were C++ a simple language, it would not be nearly as popular because it would not be able to achieve everything a programmer needs.
Name:
Anonymous2011-12-07 14:33
>>7
1. Use of the same data structure for everything.
2. Templates are static -> not general engough.
3. C++ lefts no simplicity to the programmer. It's standard is much biggers than Scheme's.
Name:
Anonymous2011-12-07 14:37
>>7 You can write simple programs in C++, but were C++ a simple language, it would not be nearly as popular because it would not be able to achieve everything a programmer needs.
Simplicity/complexity has nothing to with C/C++'s popularity. C/C++ became popular due to its legacy-compatibility, which makes C/C++ bloatware by default.
>>13 All serious CL implementations have hash-table, arrays, and vector types.
There's a similar opposition between the use of lists to represent things and the use of "objects" with named, typed fields. I went through a stage, after I'd been programming in Lisp for 2 or 3 years, where I thought the old way of using lists to represent everything was just a hack. If you needed to represent points, surely it was better to declare a proper structure with x and y fields than to use a list of two numbers. Lists could contain anything. They might even have varying numbers of elements.
I was wrong. Those are the advantages of using lists to represent points.
Over the years my appreciation for lists has increased. In exploratory programming, the fact that it's unclear what a list represents is an advantage, because you yourself are unclear about what type of program you're trying to write. The most important thing is not to constrain the evolution of your ideas. So the less you commit yourself in writing to what your data structures represent, the better.
that might work for small things like points, but seems to fall apart on larger structures.
you have to know what position the thing you want is in the list. for points, knowing that "y" is at index 1 is obvious and you don't have to think about it. but for some other data structure -- say a "user" with an "email" property -- a dict/map/hash/object is a lot nicer because you can just say user.email and not be concerned with the order of things inside your data!
Name:
Anonymous2011-12-07 20:27
I'd recommend you use Scheme or Lisp as opposed to one of the 3 most mainstream languages(C++, C#, Java), but that would be completely and utterly RETARDED.
>>31 >>30-san meant to say, thats what balanced immutable red black trees are for, or alternatively, thats what immutable almost complete binary trees are for
Name:
Anonymous2011-12-08 16:54
>>32 New /prog/ challenge: find a compiler (AOT or JIT) that is able to optimize (immutable) cons into destructive operations on arrays or hash tables, depending on their use, without any kind of hint on the part of the programmer.
Deadline: Heat death of the universe.
Name:
Anonymous2011-12-08 17:02
>>34
You can use Finger Trees to implement Lists. FTs allow fast access to the hot points, called "fingers".