in reply to Re: Re: Re: Re: How clean is your code
in thread How clean is your code

It doesn't make sense to say that "fcuk" exhibits incorrect syntax: it is a syntactically correct but currently undefined symbol.

As you pointed out, I'm a programmer rather than a linguist. As such, I generally consider an undefined symbol to be a syntax error.

P:\test> perl -wle"prnit 'hello world';" Unquoted string "prnit" may clash with future reserved word at -e line + 1. String found where operator expected at -e line 1, near "prnit 'hello +world'" (Do you need to predeclare prnit?) syntax error at -e line 1, near "prnit 'hello world'" Execution of -e aborted due to compilation errors.

Seems I'm not alone.

I agree that context is important, though I think intent is more so. In the TV sitcom "Father Ted", the writer's use the word "Feck" to bypass the censorship rules. When the characters say "Feck off", "You fecker" or "Oh feck!". The intent is clear. Dispite the entymology leading to derivations from old gaelic "to steal" and more recently Dublin slang, the intent and usage in the TV program is clearly a direct substitute for one of the 7 dirty words.

What surprises me, is that the use of such simple substitutions makes the difference between the same dialog being allowed, and the program containing it being able to gain such huge popularity and universal acceptance. It makes no sense to me that the substitution of a single character in "Feck you!", with all other things being the same--context, tone and intent--the dialog is instantly transformed from offensive to acclaimed?

Maybe I'm the only one who's finds this surprising, and frankly, bewildering. But I can assure you that my original post in this thread was made entirely seriously and was not a shot at "cheap humour". When I make such shots, I always include a smiley.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Timing (and a little luck) are everything!

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: How clean is your code
by Anonymous Monk on Feb 15, 2004 at 05:20 UTC
    As such, I generally consider an undefined symbol to be a syntax error.

    Well, it all depends on the grammar, and natural languages are a good deal more permissive than programming languages.

    On the issue of such simple and obvious substitutions making such a difference, I agree that it does seem pretty surprising. Syntax / semantic issues aside, I find it an interesting phenonemon.

    On the matter of my questioning the seriousness of your post, my sincerest apologies: I misinterpreted flippancy where it wasn't intended, sorry.

Re: Re: Re: Re: Re: Re: How clean is your code
by ysth (Canon) on Feb 15, 2004 at 06:02 UTC
    I generally consider an undefined symbol to be a syntax error.
    P:\test> perl -wle"prnit 'hello world';" Unquoted string "prnit" may clash with future reserved word at -e line + 1. String found where operator expected at -e line 1, near "prnit 'hello +world'" (Do you need to predeclare prnit?) syntax error at -e line 1, near "prnit 'hello world'" Execution of -e aborted due to compilation errors.
    Seems I'm not alone.
    The syntax error has nothing to do with prnit being unrecognized. It's a bareword and syntactically considered as if you had said 'prnit' (with quotes). The syntax error is the juxtaposition of two constants. For exactly the same reason, you get an error from perl -wle"0 1". Perl does indeed say "syntax error" only when there is a syntax error, not for an undefined symbol.