To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 8466
8465  |  8467
Subject: 
Re: Backwards Compatibility (Was Calling all Meta-commands)
Newsgroups: 
lugnet.cad.dev
Date: 
Sun, 16 Mar 2003 18:10:21 GMT
Viewed: 
2375 times
  
On Sun, Mar 16, 2003 at 05:54:10PM +0000, Kevin Clague wrote:
I think we cannot ignore the backwards compatibility issue though.

right.

What we want is an explicit way to differentiate comments from
meta-commands.  I think defining an explicit mechanism for comments is
completely backward compatible, because if you do not recognize the first
token in a type 0 record, it is a comment.

By using (META) or {META}, you've caused more hassles than you've solved.
Now we programmers have to change our programs to parse type 0 records in
two ways:  The way we have today ("0 token"), *and* the new way ("0 (META)
token").

but you just said you're doing that anyway - "if you do not recognize
the first token in a line type 0 record, it is a comment".  Is adding
'{META}' to the list of recognizable tokens an issue?  Also, you don't
have to add it - if you don't, the line is ignored, just like any other
comment.  Perfect!

It makes a lot more sense to me to provide an explicit way to
differentiate comments using some keyword (COMMENT, //, #, !, etc.) You
document the magic comment token so that no one can ever define that as a
meta-command, and you greatly reduce the probability that someone's first
token in a comment line is mistaken as a meta-command.

wouldn't that break backwards compatibility with ldraw.exe?  Or does it
recognize any of those as a valid, but ignorable line?

It is very common in programming language to differentiate comments from
language significant grammar using comment start tokens than it is to
identify the things the computer is supposed to pay attention to (i.e. (META)).

right, but it's not unhead of to use special comments as "hints" to the
program - like "#define", etc.

Using (META) causes more work for us programmers and really doesn't solve
much of anything.

That might be true - I'm not one of the programmers who has to implement
these, so I don't get a say here.  I do think it solves the problem of
accidental meta-commands in unintentional comments.

:)

--
Dan Boger
dan@peeron.com



Message has 1 Reply:
  Re: Backwards Compatibility (Was Calling all Meta-commands)
 
(...) The exact same argment can be used in favor of dillineated comments. ;-) (...) Nope. Any program that does not recognize // (picking one as an example) simply ignores it. Just like (META). (...) I don't want to get sidetracked here, but (...) (22 years ago, 16-Mar-03, to lugnet.cad.dev)

Message is in Reply To:
  Re: Backwards Compatibility (Was Calling all Meta-commands)
 
(...) I think we cannot ignore the backwards compatibility issue though. What we want is an explicit way to differentiate comments from meta-commands. I think defining an explicit mechanism for comments is completely backward compatible, because if (...) (22 years ago, 16-Mar-03, to lugnet.cad.dev)

154 Messages in This Thread:
(Inline display suppressed due to large size. Click Dots below to view.)
Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR