On Feb 23, Guillermo J. Rozas wrote:
>
> >> That's why you use a generator, which can examine all the names
> >> at once, use an algorithm for mapping them, and report any
> >> collisions, if any.
> >
> > In other words, you *can't* *automate* it.
>
> Not true. It depends on your algorithm.
>
> For example, your algorithm can canonicalize case as long as there
> are no aliases. If there are aliases, it doesn't canonicalize case.
By "automate", I mean through a macro. A macro that will do this kind
of inference is dangerous -- if I use it as:
(define-foreign foo ...)
(define-foreign BAR ...)
... many more ...
;; and in a client library
(define blah (bar))
everything works fine. When someone else edits the file, and adds:
(define-foreign Foo ...)
at the bottom, the algorithm will notice the aliasing, and will define
`BAR' instead of `bar', breaking the client library.
> It's automatic, perfectly predictable, and trivial to implement.
> Just unexpected if there happen to be aliases, which is why it tells
> you about it, even though it completes. But as everyone agrees,
> that is rather rare.
If by "tells you about it" you mean some warning or error, then, like
I said, it requires manual intervention therefore it's no longer
automatic.
> Furthermore, you'd have the same problem if you ever want to link
> with a language that allows, say, spaces in identifiers.
In *that* case I'm willing to use |...|s. Given the syntax for all
current practical language, this is unlikely enough.
> > Describing your particular obfuscation algorithm is a wart; one
> > that the language should help you avoid instead of encouraging it.
>
> Changing your language to be compatible with, say C, is a wart all
> on its own.
C is just one popular representative -- there are many, many others.
(The only two examples of modern case-insensitivity that you came up
with are not languages.)
> > Please look at that URL; Scheme users are worth more -- most of
> > them wanted the change.
>
> No. Those who read and answered the poll. I wasn't one of them,
> for example. And I'm sure that there are others.
That's why it's a poll and not an exhaustive questionnaire that any
Schemer in the world was required to answer.
> And even a majority is a weak argument here.
Why? Most of *us* -- active Scheme users, apparently liked the
change.
> >> And your problems seem to be one sided.
> >> [...]
> >> Most other languages ('-' denotes infix subtraction) do not.
> >>
> >> You have to mangle one way anyway, as these other languages don't
> >> have a quotation mechanism to add a non-standard identifier.
> >
> > Of course, but there's nothing to do about that (it's the
> > elf/dll/etc format that dictates what can go in).
>
> Sure you could. We could restrict Scheme identifiers to exactly the
> same rules as C. Why aren't you proposing that?
Because as a Scheme hacker I control the Scheme code that goes out;
not the foreign code that comes in.
> >> Yes, but you've quoted me out of context. I was teaching it to
> >> people who did not know English at all (a few did). But case
> >> folding was not a problem for them, as they were used to it.
> >
> > Right, so your answer was irrelevant to this thread. (Unless Sam
> > was just interested in general whether you taught people who are
> > not English speakers out of curiosity.)
>
> That's what the question asked. I answered the question as asked.
> If he wanted to hear the answer to something else, he should have
> asked something else.
My claim was that students in countries that lack capitalization
suffer from using mixed capitalization in code; you objected; Sam
asked whether you ever taught people who don't know English. I
somehow doubt that this was out of general curiousity.
> >>> It's not an issue of 'real' language vs. not.
> >
> > Yes, it's an issue of attitude. "American" was a demonstrational
> > tool.
>
> It demonstrated nothing to me.
(Yes I know. I'll avoid the obvious jokes.)
> >>> Let me translate to the random pedestrian who suffered all the
> >>> way to this point: "Four people spent a number of years thinking
> >>> how to make a language that is easy to teach; I spent absolutely
> >>> no time doing the same; and yet I can conclude based on my
> >>> 0-year effort that the 4*N year design that they came up with is
> >>> misguided".
> >> [...]
> >> At any rate, you are using an argument based on 'authority', and
> >> I generally find those pretty weak.
> >
> > [Countering an authority argument with your own personal
> > assumptions is weaker.]
>
> No. It is no weaker. It ends up being the same thing. To a third
> party it is, in both cases, 'so and so says X'.
Of course it's not the same thing -- imagine a court scene where the
an expert witness finishes a long explanation, and the other side's
lawyer stands up and says "well, in *my* opinion, you're confused and
wrong, and I base that on absolutely nothing!".
(Apologies to South-Park.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss