Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > Re: introspecti...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 36 of 103 Topic 2681 of 3037
Post > Topic >>

Re: introspection in SML

by Rainer Joswig <joswig@[EMAIL PROTECTED] > Dec 4, 2007 at 03:42 PM

In article <fj3kjg$ccv$1@[EMAIL PROTECTED]
>,
 Vesa Karvonen <vesa.karvonen@[EMAIL PROTECTED]
> wrote:

....

> > An interesting point of view, but I am still convinced that one can
have
> > *both* abstraction and efficiency without loosing introspection and
> > interactivity, as Common Lisp shows.
> 
> Common Lisp gives fairly good performance, good enough for many uses,
> but I must challenge you to transliterate my vector arithmetic example
> to Common Lisp.  There really are many reasons as to why a language
> like Common Lisp is much more difficult to compile to efficient
> machine code.  If there is a Common Lisp compiler that can *safely*
> optimize high-level functional code as well as MLton, then I would be
> pleasantly surprised.  Just the simple fact that any top-level binding
> might be mutated at almost any point (any time you call a procedure
> that the compiler doesn't know) makes many optimizations significantly
> more difficult to perform *safely*.  That is why you can declare the
> level of safety you want (UGH!) in Common Lisp (or at least some CL
> implementations).  Unless you have the whole program, and I'm not
> aware of any whole program compiler for Common Lisp, you can't safely
> evaluate even something as simple as the expression (+ 1 2) statically
> in Common Lisp.  But, really, I have nothing against Common Lisp.  It
> has some features that I find interesting.  However, being amenable to
> static analysis is *not* one of the features of Common Lisp.

....

That's not completely true. You might need to check out the
chapters about compiling code in the ANSI CL standard.

See here for semantic constraints for the compiler:

  http://www.lispworks.com/do***entation/HyperSpec/Body/03_bbc.htm

The standard for CL for example says

* any Common Lisp built-in construct is not changeable.
  The compiler does not need to make them changeable.
 
  this (CL:+ 1 2) has always a fixed semantics and is using
  the CL function +

  You are not allowed to redefine CL:+ .

  Many implementations have the idea of protected packages
  and will (warn or give an error) when you attempt
  to redefine a built-in function or macro.

* the compiler can assume inside a function that all references
  to the function itself do not change

* the compile can assume that inside a file the
  function defined and used does NOT change.

Several compilers have the idea of larger compilation units
and make assumptions based on those.
See for example the chapter on block compilation
in the manual of CMUCL :

http://common-lisp.net/project/cmucl/doc/cmu-user/compiler-hint.html#toc176

So, in Common Lisp calls do not go necessary through some
dynamic lookup mechanism - there are also situation, where
static assumptions can be made.

....

-- 
http://lispm.dyndns.org/
 




 103 Posts in Topic:
introspection in SML
"michele.simionato@[  2007-12-01 22:57:46 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-02 12:29:39 
Re: introspection in SML
stephen@[EMAIL PROTECTED]  2007-12-12 04:29:43 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-12 12:09:12 
Re: introspection in SML
Paul Rubin <http://phr  2007-12-12 19:54:28 
Re: introspection in SML
George Neuner <gneuner  2007-12-13 01:15:15 
Re: introspection in SML
stephen@[EMAIL PROTECTED]  2007-12-13 03:48:06 
Re: introspection in SML
Joachim Durchholz <jo@  2007-12-13 12:30:35 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-13 12:09:24 
Re: introspection in SML
Joachim Durchholz <jo@  2007-12-13 19:17:57 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-13 20:25:28 
.net
Joachim Durchholz <jo@  2007-12-14 10:54:42 
Re: .net
Jon Harrop <usenet@[EM  2007-12-14 10:45:26 
Re: .net
Joachim Durchholz <jo@  2007-12-14 21:30:03 
Re: .net
Jon Harrop <usenet@[EM  2007-12-14 21:55:11 
Re: .net
Paul Rubin <http://phr  2007-12-14 14:45:47 
Re: introspection in SML
George Neuner <gneuner  2007-12-13 14:23:15 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-13 11:56:14 
Re: introspection in SML
stephen@[EMAIL PROTECTED]  2007-12-14 03:43:12 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-14 09:48:46 
Re: introspection in SML
stephen@[EMAIL PROTECTED]  2007-12-15 03:22:38 
Re: introspection in SML
Paul Rubin <http://phr  2007-12-14 19:30:15 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-16 00:15:30 
Re: introspection in SML
stephen@[EMAIL PROTECTED]  2007-12-16 03:19:46 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-16 04:32:16 
Re: introspection in SML
stephen@[EMAIL PROTECTED]  2007-12-16 16:58:45 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-16 21:26:46 
Re: introspection in SML
"michele.simionato@[  2007-12-02 05:53:58 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-02 19:21:18 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-04 09:13:44 
Re: introspection in SML
stephen@[EMAIL PROTECTED]  2007-12-17 00:34:20 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-17 13:42:35 
Re: introspection in SML
"michele.simionato@[  2007-12-02 22:33:29 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-04 08:47:26 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-04 13:27:12 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-04 15:42:47 
Re: introspection in SML
Pascal Costanza <pc@[E  2007-12-04 16:06:56 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-04 18:35:13 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-04 20:37:24 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-04 20:26:57 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-04 21:46:16 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-04 21:49:25 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-04 22:59:39 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-04 23:24:15 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-05 00:48:18 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-05 15:18:29 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-05 18:26:05 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-05 17:43:26 
Re: introspection in SML
George Neuner <gneuner  2007-12-06 01:55:46 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-11 14:49:44 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-05 07:01:35 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-04 18:23:23 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-04 20:50:35 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-04 08:44:08 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-04 10:04:33 
Re: introspection in SML
"michele.simionato@[  2007-12-04 02:35:04 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-04 10:50:40 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-04 15:00:59 
Re: introspection in SML
"michele.simionato@[  2007-12-04 22:10:33 
Re: introspection in SML
Paul Rubin <http://phr  2007-12-04 22:55:22 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-05 07:58:10 
Re: introspection in SML
Paul Rubin <http://phr  2007-12-05 00:25:34 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-11 17:31:25 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-11 18:21:58 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-11 19:57:41 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-11 20:26:45 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-11 21:41:51 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-11 22:14:00 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-11 23:43:34 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-14 14:32:06 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-11 20:19:53 
Re: introspection in SML
Joachim Durchholz <jo@  2007-12-12 13:40:03 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-05 22:38:17 
Re: introspection in SML
"michele.simionato@[  2007-12-05 08:22:07 
Re: introspection in SML
rossberg@[EMAIL PROTECTED  2007-12-11 16:38:54 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-12 01:55:14 
Re: introspection in SML
rossberg@[EMAIL PROTECTED  2007-12-11 17:22:20 
Re: introspection in SML
Rainer Joswig <joswig@  2007-12-12 02:32:44 
Re: introspection in SML
Pascal Costanza <pc@[E  2007-12-12 08:04:13 
Re: introspection in SML
Paul Rubin <http://phr  2007-12-11 23:37:53 
Re: introspection in SML
Pascal Costanza <pc@[E  2007-12-12 09:23:57 
Re: introspection in SML
"michele.simionato@[  2007-12-11 22:53:33 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-12 08:34:11 
Re: introspection in SML
Vesa Karvonen <vesa.ka  2007-12-12 08:59:00 
Re: introspection in SML
rossberg@[EMAIL PROTECTED  2007-12-12 00:01:43 
Re: introspection in SML
rossberg@[EMAIL PROTECTED  2007-12-12 00:12:41 
Re: introspection in SML
Pascal Costanza <pc@[E  2007-12-12 09:24:36 
Re: introspection in SML
"michele.simionato@[  2007-12-12 00:50:11 
Re: introspection in SML
rossberg@[EMAIL PROTECTED  2007-12-12 01:05:12 
Re: introspection in SML
Pascal Costanza <pc@[E  2007-12-12 13:23:56 
Re: introspection in SML
"michele.simionato@[  2007-12-12 01:16:11 
Re: introspection in SML
"michele.simionato@[  2007-12-12 04:39:28 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-12 13:10:31 
Re: introspection in SML
"michele.simionato@[  2007-12-12 05:48:51 
Re: introspection in SML
Jon Harrop <usenet@[EM  2007-12-12 15:49:28 
Re: introspection in SML
rossberg@[EMAIL PROTECTED  2007-12-12 07:50:27 
Re: introspection in SML
Pascal Costanza <pc@[E  2007-12-12 17:26:12 
Re: introspection in SML
Paul Rubin <http://phr  2007-12-12 11:47:44 
Re: introspection in SML
Pascal Costanza <pc@[E  2007-12-12 22:59:03 
Re: introspection in SML
rossberg@[EMAIL PROTECTED  2007-12-12 09:13:50 
Re: introspection in SML
Pascal Costanza <pc@[E  2007-12-12 20:27:50 
Re: introspection in SML
Florian Weimer <fw@[EM  2007-12-15 13:50:58 
Re: introspection in SML
Philippa Cowderoy <fli  2007-12-16 22:06:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 6:38:11 CDT 2008.