[plt-dev] Re: [plt-translators] Translations for test engine

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Apr 22 13:52:48 EDT 2009

On Wed, Apr 22, 2009 at 12:48 PM, Michael Sperber
<sperber at deinprogramm.de> wrote:
>
> Robby Findler <robby at eecs.northwestern.edu> writes:
>
>> If you're happy with your code only working in drscheme, that's fine.
>> But I wouldn't be happy with that for the HtDP teaching languages.
>>
>> In general, the HtDP teaching languages code does not depend on the
>> drscheme-level preferences and I would prefer to keep it that way.
>
> I still don't understand: There are all kinds of preference settings
> that apply to the HtDP teaching languages.

Unless there are bugs, these only apply to setting up of the initial
environment in which a teaching program is run. That same environment
is built into the binary when an executable is created from a teaching
language program.

> Moreover, there were even
> uses of string constants in the test-engine collection---note that
> test-display.scm already had a require of string-constants.  What
> concrete problem am I introducing?

This I'm not sure. I see that creating a distribution archive with a
'check-expect' expression in just ignore the check-expects, so maybe
there is special-case code in there already that takes care of
everything.

If you didn't add any 'require's to the string-constants library, then
you're probably safe. If creation of executables still works, then
you're probably safe.

>> The solution seems pretty straightforward, however -- just don't use
>> string-constants for this. Have two versions of the testing library, a
>> german one and an english one and just load the right one in the right
>> teaching language.
>
> You mean I should duplicate all the code in collects/test-engine?

I would use abstraction.

Robby


Posted on the dev mailing list.