Re: Which programming language is better to start
- From: Jon Harrop <usenet@xxxxxxxxxxxxxx>
- Date: Tue, 21 Jun 2005 21:32:13 +0100
Matthieu Villeneuve wrote:
> "Jon Harrop" <usenet@xxxxxxxxxxxxxx> wrote in message
> news:42b80b7d$0$41911$ed2619ec@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> Matthieu Villeneuve wrote:
>> > Macros are the feature that allows syntactic abstraction (and makes it
>> > easy), making it possible to extend the language with new operators
>> > that are perfectly tailored for the application domain. I would really
>> > like to know how that can be called a "low-level feature".
>>
>> AFAIK, LISP macros are unsafe whereas camlp4 is not.
>
> Unsafe? Could you please expand a little on this?
I've heard that it is much easier to introduce bugs with Lisp macros as
opposed to camlp4.
>> > Dynamic typing also frees the programmer from many constraints,
>>
>> Don't try to argue that dynamic typing is high-level. It blatantly isn't.
>
> That's right, a type system isn't high- or low-level by itself. The type
> system is just a feature that can contribute to make a language lower
> or higher level. In the case of Common Lisp, including both static and
> dynamic typing clearly contributes to making the language very high
> level.
I've addressed this.
>> > especially compared to languages with required explicit declarations.
>>
>> So not OCaml then.
>
> Note the "especially". OCaml's type system makes programming much easier
> than C or Java's, but it is still not as flexible as Lisp's.
I've addressed that too.
>> I'm still not convinced that this is higher-level (as the OP claimed).
>> The changes do not appear to be in-line with OO theory, indeed they
>> appear to grate against it by puncturing abstraction and encapsultion and
>> as for the heavy use of macros...
>
> We're not talking about "OO theory" (which would need us to agree about
> a definition of OO), but about higher-level languages. Some say that
> Common Lisp is not a proper OO language because it doesn't enforce
> access controls to members of an object (probably not even knowing that
> this would mean Smalltalk is not a proper OO language... oh well),
> but I really don't care about that.
Sure. I just objected to the statement that Lisp's OO is much higher level
than OCaml's OO. I've seen no evidence of this.
> I want a powerful language, not a language that satisfies certain
> criterions.
What's the difference?
>> - how does a condition system know where the error occurred and what
>> exactly has been computed up to that point?
>
> That's the point, if you don't unwind the stack then you can inspect
> the state of the lower frames, and even modify it, before you decide
> of the action to take.
Do you need to know about stack frames to use it?
>> Although, to the best of my knowledge, the type inference and static type
>> checking of ML requires many fundamental features which cannot be
>> implemented in LISP, e.g. checking through pattern matches.
>
> Looks to me like your knowledge is out of date, Common Lisp systems
> such as CMUCL have used type inference and static type checking for
> ages.
Can you give an example of a Lisp program doing type inference and checking
over a pattern match?
>> > The compiler gives
>> > warnings every time it detects a potential type error, but the
> programmer
>> > remains free to do whatever he wants (after all, he knows the program
>> > design better than the compiler does).
>>
>> I believe there are no advantages to that freedom.
>
> For example, one can start running a partial implementation of a program,
> not having to provide dummy "stubs" in order for it to compile, and fill
> in the blanks gradually.
You can do the same thing more safely in OCaml with polymorphic variants
(but I wouldn't).
> It's also easier to change one's mind about type
> definitions while programming, without having to change the whole program
> just to validate another design change.
That is precisely why it is a bad idea and ill advised.
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com
.
- Follow-Ups:
- Re: Which programming language is better to start
- From: Matthieu Villeneuve
- Re: Which programming language is better to start
- From: CTips
- Re: Which programming language is better to start
- References:
- Which programming language is better to start
- From: hannnndy@xxxxxxxxx
- Re: Which programming language is better to start
- From: Matthieu Villeneuve
- Re: Which programming language is better to start
- From: Jean-Claude Arbaut
- Re: Which programming language is better to start
- From: Matthieu Villeneuve
- Re: Which programming language is better to start
- From: Jon Harrop
- Re: Which programming language is better to start
- From: Matthieu Villeneuve
- Re: Which programming language is better to start
- From: Jon Harrop
- Re: Which programming language is better to start
- From: Matthieu Villeneuve
- Which programming language is better to start
- Prev by Date: Re: puzzle
- Next by Date: Re: Which programming language is better to start
- Previous by thread: Re: Which programming language is better to start
- Next by thread: Re: Which programming language is better to start
- Index(es):
Relevant Pages
|