code review

Chris Angelico rosuav at gmail.com
Mon Jul 2 23:57:50 CEST 2012


On Tue, Jul 3, 2012 at 5:06 AM, Thomas Jollans <t at jollybox.de> wrote:
> On 07/02/2012 08:22 PM, Rick Johnson wrote:
>> Agreed. I wish we had one language. One which had syntactical
>> directives for scoping, blocks, assignments, etc, etc...
>>
>> BLOCK_INDENT_MARKER -> \t
>> BLOCK_DEDENT_MARKER -> \n
>> STATEMENT_TERMINATOR -> \n
>> ASSIGNMENT_OPERATOR -> :=
>> CONDITIONAL_IF_SPELLING -> IF
>> CONDITIONAL_ELSE_SPELLING -> EL
>> ...
>
> You must be joking.
>
> In C, for example, it is possible to "create your own language" by going
>
> #define IF(cond) if (cond) {
> #define ELSE } else {
> #define ELIF(cond) } else if (cond) {
> #define ENDIF }
>
>
> and so on. There's a reason nobody does it.

I'll go one further. The "create your own language" is just a plain
text file, is in fact is NO LANGUAGE. If it's that flexible, what's
the use of calling it the same language?

Actually there is a lot of use in having that sort of commonality, but
at a different level: source control. Tools like git are
language-agnostic; I can have a repository with Javascript, PHP (ugh),
Pike (that atones), Python, C++, etc source files, a single makefile
that in the darkness binds them, and so on. But they're still all
different languages.

Oh and Rick? Nice troll there with the ellipsis. You fail grammar
forever, but hey, at least you win at trolling.

ChrisA



More information about the Python-list mailing list