Andre van Tonder wrote:
> On Wed, 24 Aug 2005, Marcin 'Qrczak' Kowalczyk wrote:
>> Andre van Tonder <xxxxxx@now.het.brown.edu> writes:
>>
>>> Should I be able to write Scheme code whose meaning depends on page
>>> layout, dots, whitespace, or comments?
>>
>> Yes, because it's useful to display source location information in
>> stack traces, and location is best expressed by line and column
>> numbers.
>
> Sure, but this can be done without giving the programmer procedural
> access to the information displayed in the exception's stack trace.
Lately I have begon seeing syntax-objects as a general tool to write
compilers. With that mindset the tools for manipulating syntax-objects
should be so general, that they can be used to implement other
languages. Part of this generality is the ability to associate
properties with all pieces of syntax including atoms. (I still can't
see how the hash-table implementation can associate properties with
atoms).
However, one could argue that such generality isn't needed for
the more focused goal of writing Scheme macros.
The philosophy of macros is to add constructs the language designers
didn't anticipate to the underlying language. Making the tools
for working with syntax-objects as general as possible, is to me,
an attempt to follow that philosophy. Allowing "strange" things
as the ones you mention doesn't mean they'll be used.
--
Jens Axel Søgaard