[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loss of abstraction

This page is part of the web mail archives of SRFI 72 from before July 7th, 2015. The new archives for SRFI 72 contain all messages, not just those from before July 7th, 2015.

Andre van Tonder wrote:
On Wed, 24 Aug 2005, Marcin 'Qrczak' Kowalczyk wrote:
Andre van Tonder <andre@xxxxxxxxxxxxxxxxx> 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

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

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