[LUAU] Re: Python (Was Re: Hosef)

Clifton Royston cliftonr at iandicomputing.com
Mon Nov 28 20:34:17 PST 2005


On Fri, Nov 25, 2005 at 11:28:43AM -1000, Jimen Ching wrote:
> On Wed, 23 Nov 2005, Tim Newsham wrote:
> >I always found "continue" to be a lot more explicit in situations
> >like this:
> >
> >      while(*s++ = *t++)
> >          continue;
> >
> >the empty semi-colon being the least attractive alternative (did
> >he really mean to leave the body empty?  not to mention the greener
> >programmer will easily overlook the semicolon).
> 
> I'm curious, can you give an example of where someone forgot to type in a
> statement, but remembered to type the semicolon?  [...]

  Getting back to my point in using those examples, the point was not
that they are examples of good code, but that they are idioms of their
respective language.  This discussion re exactly what form is the best
way to write a looped post-increment copy-thru-pointer in C makes the
case - you need to understand the meaning and implication of the idiom
to participate intelligently in the discussion, as well as to maintain
others' programs or write programs maintainable by others.

  Likewise for the Perl example: to even know whether it's good or bad,
one needs to know, for instance, that split (like many other functions)
implicitly operates on the "$_" variable, that in certain contexts that
variable is magically filled with the contents of the current input
line, that a function which returns an array can be directly assigned
to an array on the LHS of the assignment in which case it replaces its
former contents, that extended regexes are normally (or often) written
within //s, etc.

  Knowing the basic syntax of each language does not initially give you
this.

  My goal for a language-oriented group would be to see it help new
programmers rapidly bridge the gap between knowing some basic commands
and writing the language like a "native" - definitely for Python, and
if possible for some other languages like Ruby, Lisp, PHP, whatever.

  On initial organizational matters: Is there consensus for a Saturday
vs. a weekday evening, at least for an initial meeting?
  -- Clifton

-- 
    Clifton Royston  --  cliftonr at iandicomputing.com / cliftonr at lava.net
       President  - I and I Computing * http://www.iandicomputing.com/
 Custom programming, network design, systems and network consulting services



More information about the LUAU mailing list