[MUD-Dev] TECH: programming languages (was: Re: TECH: STL / Heaps, etc.)

Miroslav Silovic silovic at zesoi.fer.hr
Thu Aug 23 15:55:46 CEST 2001


Ola Fosheim Grøstad <olag at ifi.uio.no> writes:

> True high level languages (like true LP, not prolog) are slow
> because you only specify the problem and not the strategy used for
> finding the solution. High level languages invite you to liberally
> use mechanisms which force a slower implementation.

Python (to take a more frequently used example) is not a high-level
language because it's slow, and neither is it slow because it's a
high-level language, it's slow because of its braindead design and
implementation. Namely, simplicity of the implementation had a
higher priority than efficiency or even language usability (this
reeks of the 'less is more' approach).

Absence of the constructs that can not be efficiently implemented
does not lower the level of the language, either. For instance, any
explicitely-typed language tends to be easy to make fast, but some
of them are very high-level (because type declarations do tend to be
a part of the problem specification).

Also, type inference can do wonders, you know.

> You can obviously avoid those if you know that they are slow, but
> then you are no longer primarily thinking on an abstract level,
> i.e. in terms of the problem rather than the specifics of the
> solution and the peculiarities of the implementation and the
> underlying architecture. I am not an expert on programming
> languages, but I don't know where you've found these efficient
> implementations...

Take a look at Mercury, Haskell, ocaml, or CMU Common LISP. In some
cases, they generate faster code than C, becuase, well, compilers
sometimes outdo humans at thinking about cache sizes and branching.

--
How to eff the ineffable?
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list