Re: [dev] lisp

From: Sanel Zukan <sanelz_AT_gmail.com>
Date: Sun, 30 Jun 2013 11:10:04 +0200

Hi,

On Sat, Jun 29, 2013 at 10:52 PM, Szabolcs Nagy <nsz_AT_port70.net> wrote:
> r5rs is much more limited in scope than c99, it has a synthetic
> design that provides the bare minimum to express high level
> computations, while c99 has an ugly pragmatic design, the result
> of long evolution and contradicting constraints
>
> the scheme spec does not give you enough semantics to reason
> about resource usage, latency of operations or to handle
> related failures, it cannot control the interaction with the
> underlying system without serious language extensions

Hm, not quite true: there are enough semantics so you can perform IO,
computations (R5RS provides fine model for it) or error/failure
handling. However, Scheme abstract those operations to much higher
level than C.

Also, C isn't much useful without libc and POSIX api either...

> this is not a big problem for scheme as it is not a
> systems programming language, but a scripting language
>
> i think the lack of syntax in scheme helps understanding
> certain concepts (and makes the spec simpler), but is not
> comfortable in practice, a language like lua (with simple
> syntax for associative arrays) goes a long way to be more
> practical

Again, more subjective... We (developers and users) today are more
used to think in terms of hardware and hardware approach of
computation than mathematical and abstract.

> but the fundamental reason why we see more mention of c than
> lisp is that all relevant operating systems have a unix like
> api for which the only detailed spec is posix, a superset of
> c99, while a lisp implementation needs to do a lot to bridge
> the gap and its abstractions are leaky and costly

'abstractions are leaky and costly'? How so? If you thing in terms of
using POSIX systems from Lisp, it is unnatural, the same as you would
try to use Genera (or other Lisp OS) from C. But, if you try another,
more abstract approach, things aren't that scary. For example,
instead:

  (define var (fopen "/foo/baz" "r"))
  (if var
    ...)

you could use:

  (with-open "/foo/baz"
    ...
    ;; or catch errors if you would like
    (catch
      ... here goes error handling))

> but there is good news for those who think c is bad: there are
> emerging platforms which may give rise to different languages:
> jvm on mobile and enterprise systems and the web with js..

Best,
Sanel
Received on Sun Jun 30 2013 - 11:10:04 CEST

This archive was generated by hypermail 2.3.0 : Sun Jun 30 2013 - 11:12:13 CEST