Arc Forumnew | comments | leaders | submitlogin
Should stdin, stdout have parens around them? (awwx.posterous.com)
2 points by akkartik 5134 days ago | 3 comments


3 points by fallintothis 5134 days ago | link

pg doesn't think so.

  $ grep "(xdef stdout" ac.scm -A2
  (xdef stdout current-output-port)  ; should be a vars
  (xdef stdin  current-input-port)
  (xdef stderr current-error-port)

-----

1 point by rntz 5123 days ago | link

Yes, they should, because they can be changed within dynamic scope by 'w/stdout etc, and this doesn't work unless they correspond to parameters in mzscheme, which need to be called to get their current value.

Using your dynvar hack, you could avoid this, but that's hardly "not changing the language", now, is it?

-----

1 point by aw 5123 days ago | link

You are correct on all points: the std ports do need to be parameters, I am using my defvar hack to do that, and this is a change to the language.

-----