In practice, however, the type system constrains the programmer in many ways that are unacceptable to Lisp programmers: data cannot be interpreted as programs, lists must be homogeneous, and functions are not easily redefned without recompiling other dependent functions.
Name:
Anonymous2011-04-19 21:24
In practice, however, the slavery system constrains the plantation owner in many ways that are unacceptable to White men: cattle cannot be interpreted as programs, lynchings must be homoerotic, and functions are not easily redefned without recompiling other dependent functions.
>>8
Don't group all Lisp programmers as the same. >>1 data cannot be interpreted as programs,Untrue, you can write an interpreter in most languages. You can also write compilers or even JITs, but things get a lot more complex and unportable there. lists must be homogeneous, Only in some languages, such as those derived from ML (including Haskell), but there are ways around it even there. and functions are not easily redefned(sic) without recompiling other dependent functions.Partially true, but if arguments and their types don't change it's possible. In CL such possibilities cost you an indirection when calling functions (however it's possible to optimize this away with the right declarations).
I tried a recent version of an ENTERPRISE language (C#/.NET) and was surprised they now offer a way to dynamically recompile functions of applications you're debugging using MSVS, so at least they're getting some nice features that come for free in Lisps.
Name:
No. Just 2deep4u2011-04-20 8:39
>>8
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.
Name:
Anonymous2011-04-20 8:41
Syntax of statically typed languages tends to be more complicated than that of untyped languages. -- Benjamin C. Pierce
>>8 smart, sane, average, a bit stupid/somewhat insane and so on have all abandoned ship long ago. So yes, the remaining ones are all fucked up like you couldn't imagine.
Name:
Anonymous2011-04-20 8:45
>>9 Untrue, you can write an interpreter in most languages. You can also write compilers or even JITs, but things get a lot more complex and unportable there.
LISP interpreter - one page of code
Haskell interpreter - what?!!
>>14 I just said it's possible.
Are you jewish? Because honest people say "possible" only about actually possible stuff, not some infinite convergence ponzi schemes.
>>17
That argument would only work if a lot of languages didn't already have interpreters for them. Some of those interpreters may very well be huge in code size, but they work, which means not only that it's possible, but usable.
Also, eval in some CL implementation is just (defun eval (code) (funcall (compile nil `(lambda () ,code)))), which in other languages can be accomplished by calling the compiler and loading the compiled module dynamically in memory and calling the functions (I can't say it's as nice as in CL, but it does work just fine).
And no, I'm not of the nationality you mentioned. Most languages have eitehr compilers or interpreters or both as viable implementations, which shows how possible this is. I did not claim this is something you could do in your afternoon, but you can always use code others have written.
Name:
Anonymous2011-04-20 10:21
>>18 Some of those interpreters may very well be huge in code size, but they work, which means not only that it's possible, but usable.
"Usable" for what? Lisp allows to interpret code with macros. That is its use. If these were "huge in code size", Lisp would be useless.
One can even conjecture that Lisp owes its survival specifically to the fact that its programs are lists, which everyone, including me, has regarded as a disadvantage. -- John McCarthy, "Early History of Lisp"
Name:
Anonymous2011-04-20 10:22
>>19 If these macros were "huge in code size",
self fix.
I'm not a fan of Lisp (for personal reasons) but I agree with >>1 that statically-typed languages kill the programmer's freedom big-time.
Name:
Anonymous2011-04-20 10:36
>>21 statically-typed languages kill the programmer's freedom big-time.
We should start some kind of a project aimed at having a completely Free, completely dynamically typed software stack.
I mean, you can be completely Free, as a programmer, when your LISP interpreter is written in Unfree C. Freedom just doesn't work this way.
So you should have a dynamically typed, Free, interpreted interpreter, running on top of dynamically typed, Free, interpreted OS, with dynamically typed, Free, interpreted drivers, and all that runs on FPGA. Except that we need the New Kind of FPGA, which allows reprogramming during execution, in the true dynamically typed, Free, interpreted fashion.
>>19
Macros are a compiler-hook, not an interpreter-hook.
Interpreters tend to be slow, compilers not so much.
You need to understand the differences between interpreters and compilers. eval - usually interpreted, unless it calls the compiler. defmacro - running code during compilation.
>>25
Interpreters can have macros. (loop (print (eval (macroexpand (read))))).
Name:
R to the Immis Rimmis2011-04-20 11:41
>>24
Is it possible to use static typing to guarantee Freedom for the end user?
Like, so that a program which uses your code in any way has to provide a dynamically-typed scripting language interface, or be rejected by the type checker.
Or from a different angle: it must not be possible for another programmer to impose any additional static restrictions if she uses your types.
a real language:
1. does not natively support tail call optimization
2. moves all functional programming capabilities into libraries... but would ideally have none of that fp bullshit at all
3. limits anonymous functions to one statement
4. makes using useless things like closures more difficult by having no way of disambiguating local name creation and rebinding existing names; unfortunately whiny fp fanboys wont shut up so this gets implemented anyway
>>25
There is no difference. Lisp code gets macroexpanded into x86 opcodes, which're interpreted by CPU. Even reading this post you interpret it somehow, maybe using some precompiled routines in your brain.
Name:
Anonymous2011-04-20 20:21
I never understood the meaning of public/privated/protected bullshit in JAVA. It's just too abstract and jewish.
>>21
You'd do well to define "freedom" better. The problem with freedom is that it is a loaded word - one that sounds very nice. It is implicitly manipulative when not backed with a more concrete definition of what freedom means (and this is why GNU defines the core freedoms to define what freedom means to them).
For the definition of freedom that involves the ability to make whatever you want, it's blatantly false. Lisp is no more free or less free than any other language. In fact, one might argue that it is less free because you have to have an intimate knowledge of every single corner of the code. There are almost no useful libraries to reuse or use to solve parts of problems.
Name:
Anonymous2011-04-20 22:21
>>38
Haskell gives you "freedom from"
Lisp gives you "freedom to"
That is, I can put anything anywhere in Lisp with any side effects I want. Haskell, on the other hand, free from side effects and typing anarchy
Name:
Anonymous2011-04-20 22:21
>>39
Haskell also free from syntatic anarchy, because it forces predefined syntax.
Name:
Anonymous2011-04-20 22:27
Of course "freedom to" also allows "freedom from", like ideal democracy allows to vote for communist government, but not other way around: commies wont allow you to vote for any other government.
Name:
Anonymous2011-04-20 23:17
It’s a mistake to assume freedom means ‘do as you please’. Freedom always comes with restrictions if it is just and equal, because your freedom to do something often implies a restriction or cost for me. This assertion leads to the question, "whose freedom becomes more important?"
Negative liberty is the absence of obstacles, barriers or constraints. One has negative liberty to the extent that actions are available to one in this negative sense. Positive liberty is the possibility of acting — or the fact of acting — in such a way as to take control of one's life and realize one's fundamental purposes. While negative liberty is usually attributed to individual agents, positive liberty is sometimes attributed to collectivities, or to individuals considered primarily as members of given collectivities.
Name:
Anonymous2011-04-21 0:07
As Berlin showed, negative and positive liberty are not merely two distinct kinds of liberty; they can be seen as rival, incompatible interpretations of a single political ideal. Since few people claim to be against liberty, the way this term is interpreted and defined can have important political implications. Political liberalism tends to presuppose a negative definition of liberty: liberals generally claim that if one favors individual liberty one should place strong limitations on the activities of the state. Critics of liberalism often contest this implication by contesting the negative definition of liberty: they argue that the pursuit of liberty understood as self-realization or as self-determination (whether of the individual or of the collectivity) can require state intervention of a kind not normally allowed by liberals.
Name:
Anonymous2011-04-21 0:08
Many authors prefer to talk of positive and negative freedom. This is only a difference of style, and the terms ‘liberty’ and ‘freedom’ can be used interchangeably. Although some attempts have been made to distinguish between liberty and freedom, these have not caught on. Neither can they be translated into other European languages, which contain only the one term, of either Latin or Germanic origin (e.g. liberté, Freiheit), where English contains both.
Name:
Anonymous2011-04-21 0:14
One might say that while on the first view liberty is simply about how many doors are open to the agent, on the second view it is more about going through the right doors for the right reasons.
Name:
Anonymous2011-04-21 0:16
>>48
>on the second view it is more about going through the right doors for the right reasons.
Exactly the philosophy of static typing.