lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Wed, Jul 4, 2018, 5:58 PM Sean Conner <sean@conman.org> wrote:
It was thus said that the Great Gregg Reynolds once stated:
> On Wed, Jul 4, 2018, 5:24 PM Sean Conner <sean@conman.org> wrote:
>
> > It was thus said that the Great Gregg Reynolds once stated:
> > > On Wed, Jul 4, 2018, 4:42 PM Sean Conner <sean@conman.org> wrote:
> > >
> > > > It was thus said that the Great Gregg Reynolds once stated:
> > > > > Ok, but what does that have to do with spelling?
> > > >
> > > >   I mispelled 'baz' as 'baa'
> > >
> > > 
  Seriously?  You're hung up on the work "misspelling"?  As in, a compiler
won't flag 'mispelling' because it's misspelled?  The Oxford English
Dictionary has the following for 'misspell':

        v. trans. To spell incorrectly

        vbl. sp. A bad spelling; false orthography

And even Merriam-Webster lists "to spell (a word or name) incorrectly".  So
Egor's use of "misspell":

> It's the expectation of many programmers that a compiler should check for
> misspelled identifiers and warn the user at compile time.

is, to me, be correct---'baa' is false orthography [1] of "baz" (per
Oxford); I spelled 'baz' (a word or name and in this case, it's a name)
incorrectly (per Merriam-Webster).

You and I may know that, but the compiler does not. It just sees a string.

And I deny that 'baa' is a mispelling of 'baz' - obviously it is a misspelling of 'bar'. Or maybe 'foo'. The compiler cannot possibly know, unless it is smart enough to know what program you intended to write.

  I think you are interpreting the term
'misspelling' too narrowly (I do not know if English is your first language
or not) or are trolling.

Yes, I am a native speaker of English. My point is just that it is a category error to apyly concepts like "mis (or correct) spelling" to programming texts.

  -spc (I'm not even sure if English is Egor's first language or not,
        so I'm willing to give both of you the benefit of the doubt here)

[1]     "Orthography" releates to spelling:

                Correct or proper spelling;

Precisely. And the only notion of correctness a compiler has is syntactic. If it flags "baaa" as a problem it is not because it thinks it's a misspelling of baz.


        Here, I would aplly "any more or system of spelling" to program
        identifiers.  Certainly, the compiler keeps track of identifiers,
        and in some cases (like C) deviations to the spelling of an
        identifier can be found.

Huh? Which compiler can do that? Where in the c spec is "deviation to the spelling of an identifier" defined?

G