I understand the importance of different implementations of the same language having the same semantics, but are there any reasons why it would be a bad thing to create a language , suspiciously similar to scheme, where () is self evaluating?
On 8/21/07, Bradley Lucier lucier@math.purdue.edu wrote:
On Aug 21, 2007, at 10:08 PM, naruto canada wrote:
(%which () %true)
I get: *** ERROR -- Ill-formed expression ()
You need a quote to denote the empty list: '()
Just two parentheses by themselves is a syntax error in scheme; it's a function call but without a function name.
Unfortunately, several scheme implementations accept it as an extension to mean the empty list and so it gets propagated to scheme sources throughout the internets ...
Thanks, it works now, this is what I did. first, "makeport" couldn't detect my OS, so I modify it:
;(set! *operating-system* ; (case *dialect* ; ((bigloo gambit guile mzscheme petite scm stk) ; (cond ((getenv "COMSPEC") 'windows) ; (else 'unix))) ; ((mitscheme) ; (cond ((get-environment-variable "COMSPEC") 'windows) ; (else 'unix))) ; ((pscheme) 'windows) ; (else ; (display "What is your operating system? [unix windows]") ; (newline) ; (read)))) (set! *operating-system* 'unix)
I changed makeport.scm to do
(set! *operating-system* (case *dialect* ((gambit) (if (getenv "COMSPEC" #f) 'windows 'unix)) ((bigloo guile mzscheme petite scm stk) (cond ((getenv "COMSPEC") 'windows) (else 'unix))) ((mitscheme) (cond ((get-environment-variable "COMSPEC") 'windows) (else 'unix))) ((pscheme) 'windows) (else (display "What is your operating system? [unix windows]") (newline) (read))))
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list