On Feb 22, Guillermo J. Rozas wrote: > > On Feb 21, 2009, at 10:29 PM, Eli Barzilay wrote: > > > > Same argument as before. "I mean you learn to speak american in > > school no? Why don't you use it then??" > > I have no idea what you are saying here.
Exactly. > > > > (define foo (get-foreign-function "foo")) > > (define bar (get-foreign-function "bar")) > > (define baz (get-foreign-function "baz")) > > This is what generators are for. > [...] > > > and you *can't* automate this with a macro for the obvious reason. > > 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. > > More than that, if you're unfortunate to have the foreign code provide > > a "Foo", for example, as some constructor, you'll now need to: > > > > (define make-foo (get-foreign-function "Foo")) > > > > From now own you inherit a new problem -- you can't say this in the > > documentation for your code: > > > > The whatchamacallit library provides all of the bindings of > > libwhatchamacallit. See the whatchamacallit manual for a detailed > > listing of the available functions. > > Yes, you report the algorithm for mapping the names. Describing your particular obfuscation algorithm is a wart; one that the language should help you avoid instead of encouraging it. > > http://lists.r6rs.org/pipermail/r6rs-discuss/2006-November/001093.html > > > > interesting. (The poll results page is still there.) > > Again, look at the analogous argument for C. Why are Scheme users > worth less? Please look at that URL; Scheme users are worth more -- most of them wanted the change. > > in the rare case that there is an identifier syntax that is not > > allowed in Scheme, having a macro generate an identifier through > > `string->symbol' will work as usual -- but I'll need to use |...| > > to access that binding. But in practice, can you name a popular > > language that is used to create dynamic libraries with identifiers > > that are not allowed in Scheme? (And no, C++ obfuscation is not a > > valid example.) > > C++ is valid. That's what a lot of industry uses. No, C++ obfuscation is invalid, because the obfuscation does not happen at the language level. A Scheme interface to a C++ library will need to reflect unobfuscated C++ identifiers. > 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). > So I guess you are only interested in importing things into Scheme, > and not exporting them out. No, the only obstacle in exporting things out is being able to generate dlls. On Feb 22, Guillermo J. Rozas wrote: > > On Feb 21, 2009, at 10:29 PM, Eli Barzilay wrote: > > > >> If they are already learning English, the hurdle is there, in > >> English. Scheme is just being consistent with it. > > > > As you said elsewhere: "[scheme keywords] were meaningless > > sequences of characters" -- now consider this in a language where > > capitalization is completely missing, not even different glyphs or > > different rules, the whole concept is not there. Surely if you > > know a keyword as a meaningless sequence fo characters it will be > > more complicated if each character in that sequence could be > > replaced by some other meaningless character (and often by a > > character that doesn't look the same)? > > 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.) > > But *this* is taking it ten steps further, and in a very self-assuring > > way. The young students in these countries -- the ones who are > > learning how to program, are also likely to be the ones who don't know > > English well. So when I re-used your reply above: > > > > The more you pile on, the higher the hurdle. Are you advocating for > > making things more difficult intentionally? > > > > what would be your true answer? Maybe something like "If your > > students were speaking a real language, then the hurdle wouldn't be > > higher."? How about "Just teach your kids to speak American like the > > rest of us."? > > It's not an issue of 'real' language vs. not. Yes, it's an issue of attitude. "American" was a demonstrational tool. > > 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.] -- ((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
