help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs history, and "Is Emacs difficult to learn?"


From: Emanuel Berg
Subject: Re: Emacs history, and "Is Emacs difficult to learn?"
Date: Thu, 01 Aug 2013 16:39:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Rustom Mody <rustompmody@gmail.com> writes:

> The reason to make this distinction. Consider this C type:
> struct S { T x; struct S *a, *b; }
>
> Does this type represent a doubly linked list of Ts or a binary
> tree of Ts?
>
> The fact that it could be both (or something still different)
> implies that C does not have the tools for building genuine data
> structures, just for memory layouting.

Are you saying: C doesn't have hash tables, search trees, etc.,
you have to make them yourself with data types and pointers, and
put them into structs, and then have the algorithm traverse them,
and all this you do manually, with no support from the language?

It doesn't surprise me one bit that Haskell has all that fancy
stuff, because Haskell is much, much more recent, and with a
strong (the strongest?) tilt towards university people (of CS
*and* math), while C is something that were/is very robust in
practice, and is "engineering" in nature (as opposed to
scientific).

Even their *names* illustrate this. C is C because its predecessor
was B. Haskell is Haskell because of a math (?) guy who did
function theory.

Haskell people have neurotic hangups how thing "should" be,
especially with respect to side-effect: they even separate the
"pure" (yuk) part of their programs, so it shouldn't intermingle
with all those toxic side-effects. C people are more like, if it
works, that's the definition of a good program.

But what about *Lisp*? Lisp has lists, obviously, which can be
made into association lists, and just about anything else. Is
there anything more that didn't meet my eyes?

Yes, a struct is just a memory pattern. You are saying, a Lisp
list isn't - is it moving around in memory, is it fragmented, or
is allocation made dynamically based on the elements? Is that the
difference? With pointers, isn't that what you get in C?  Please
explain.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]