Fog Creek Software
Discussion Board




Obscure Lingo Syntax Question

Dear Forum

I want some opinions on a syntax change I am thinking of making to Lingo. At present, blocks of code are stored in files (modules) which are compiled independently. Modules can inherit other modules. Eg:

// Stored in "foo.l"
Lingo module Foo
uses Util Bar
...
  function DoSomething()
...
end module

Module 'util' and 'Bar' would exist in 'Util.l' and 'Bar.l' and have similar structure. At the present time modules use the 'module' keyword, they inherit with 'uses' and they use the extension 'l' for Lingo. I was thinking of changing the module keyword to 'class', the inherit keyword to 'inherit' or 'inherits', and the extension to 'cls' for class:

// Stored in "foo.cls"
Lingo class Foo
inherits Util Bar
...
  function DoSomething()
...
end class

What do you think? Does 'module' and 'uses' have primitive pascal-ish resonances? Is the file extension 'l' confusing? Is 'cls' going to be confused with VB class modules? Or do people not really mind? All comments welcome!

PS: This is separate from the duplicate header issue, which I have not forgotten about.

PPS: The home page is http://www.lingolanguage.com although it's not relevant for this question.

Bill Rayer
Friday, October 03, 2003

"Does 'module' and 'uses' have primitive pascal-ish resonances?"

Yes.  But I assume that none of your market has actually used pascal.  If your "module" is actually what most other languages call a "class" then I'd call it a class.  No sense in confusing everyone.  The keyword "use" is far too vague either way.  You might also want to consider "extends".

"Is the file extension 'l' confusing?"

I hate single letter extensions but that's personal preference.  I feel all extensions need to be 3 letters or LONGER.

"Is 'cls' going to be confused with VB class modules?"

You should avoid overly generic extension names.  And you really could go longer than 3 letters.  Java has both .java and .class for extensions.  Why not .lclass or .lingo.  How many different file types do you have?  Could you use .lingo for all types of source files?

Almost Anonymous
Friday, October 03, 2003

There is only one Lingo file type, which is a Lingo module (or whatever the name gets changed to, if I change it). Non-main and main modules have the same syntax, the only difference is an exported function 'main' makes it into a main module. So you're right, I could use '.lingo' or '.lclass' as the file extension.

Bill Rayer
Friday, October 03, 2003

Then I would go with .lingo

Almost Anonymous
Friday, October 03, 2003

The lingo language author is an irregular poster here (or perhaps regular, I dunno). Have you tried e-mailing him? He seems like a nice guy, and very open to these kinds of questions and suggestions.

Mark T A W .com
Saturday, October 04, 2003

Mark,

Who is your comment aimed at?  Bill is the Lingo author.

Ged Byrne
Saturday, October 04, 2003

He is me (or I am him).

"Have you tried e-mailing him? He seems like a nice guy, and very open to these kinds of questions and suggestions."

Can I quote that? :)

Bill Rayer
Saturday, October 04, 2003

This is obviously a recursive question.

Simon Lucy
Saturday, October 04, 2003

Did you know that Macromedia has a language called "Lingo" too?  If I were you, I'd worry about getting sued.

hehe
Saturday, October 04, 2003

Here we go again....

Damian
Monday, October 06, 2003

Going down the only road we've ever known

David Coverdale
Monday, October 06, 2003

We're doing better. "Almost Anonymous"'s comments were very useful - he/she thought about the question before posting, instead of after :)

Bill Rayer
Monday, October 06, 2003

*  Recent Topics

*  Fog Creek Home