Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

why does Lisp always have dyamic variables?

Name: Anonymous 2012-04-04 21:17

Is it possible to make a Lisp dialect that has static types? Why cant type inference be used in Lisp instead of dynamic typing.

Name: Anonymous 2012-04-04 22:43

>>1
It could exist if you wanted to make one. The recognizable thing about lisp is its style of syntax, which could be used for any programming language.


(define (main (argc int) (argv (pointer (pointer char)))) int
  (printf "%s: Hello world!\n" (deref argv))
  (if (> argc 1)
    (printf "you passed %s for the first command line argument!\n" (deref (+ argv 1))))
  (return 0))


But it would be convenient to have some of the nice features when writing macros. It would be kind of annoying if you had to worry about freeing parts of the syntax tree that were not used or something.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List