Why make a language case sensitive?

Olivier Dagenais olivierS.dagenaisP at canadaA.comM
Sun Jul 16 15:59:42 EDT 2000


> It is a typical god side of an MS product, total integration with total
> benfit, a pitty thought that the interface is less good than Borland's...

I can't say I have used anything of Borland since BC 4.5, I think.  I have
seen cool features in some GUI builders and IDEs that aren't in VB6, so I
have an idea of what you are talking about.  "Boa Constructor"
 http://boa-constructor.sourceforge.net/ ), an IDE for Python seems to make
a good effort to implement features typical of recent technologies, although
it is still in "Pre-Alpha" but very promising.

> Another solution is to be really smart and figure the flow of the
> program and determine when a variable is first used and color that
> color1 and the next time it is used it is colored color2...

I think this [figure the flow of the program] is what VC6 attemps to do with
C/C++ code (and that's a pretty expensive calculation) and it's a pity the
compiler will [most likely] just end up re-doing the work when you hit
"Build", as opposed to something totally integrated like VB...

> > Where the variables are declared in the form of a comment that starts
with
> > the letters "var" which, I think, is how JavaScript declares variables,
> > isn't it?
> it is said the man who knew the language inside out :-)

I'm sorry, I don't follow...

> > So, by having a line at the beginning of a function (right after
> > the description line, which I hope I didn't screw up) indicating the
names
> > of the variables we intend to use, any name that isn't in that list and
> > isn't in anything we imported would be highlighted as a mistake, and if
only
> > the case differs, the editor would make the case match the
declaration...
> The only problem is that it turns Python ugly...

Does it?  Wouldn't it help whoever was reading your code to better
understand where the scope of the variables are, and what you intend to do?
I'm reminded of assembler, where it is good practice to comment which
registers you will be "destroying" and which you will be using.  It saves
someone from looking at each line of code to figure it out....

> I know it is a problem, I will however try to enforce it in our
> concern, and one might design a devoloping tool that enforced a
> naming convention, that could be dfined by the user.

...or a variable declaration convention defined by the user???  : )   You
wouldn't HAVE to use the "# var", maybe you're like me and you come from a
VB background and you'd rather use "# dim"?

> Once you get used to it it really isn't much of a worry

I realized today my version of PythonWin (125) wasn't recommended as being
the one to use for auto-completion and other nice features, so maybe it
already does everything I want it to and my whole rant is moot??  I didn't
think PythonWin was as nice as SciTe, in terms of syntax highlighting, so I
switched, but now that I look at PythonWin 132, I'm impressed!  Maybe I *do*
have everything I want.

> there is only one thing in this world that makes me wonder: why are all
> the beautiful languages run time parsed? (i here think primarily on
> Python and Java)

Only ONE thing?  Wow.  You must know the answer to life, the universe and
everything, then?  And the question, too?  If it were up to me, this
language would have been called "42"...

--
----------------------------------------------------------------------
Olivier A. Dagenais - Carleton University - Computer Science III







More information about the Python-list mailing list