I've written a large application in perl that is starting to creak and
groan whenever I try to change anything, because of what appear to be
limitations in perl, and in the IDE that I'm using (Notepad -- although I
don't know of any other perl IDE that has the features I need anyway). I
started out using perl because of its support for regular expressions, but
the project has grown to the point where other considerations are more
important. I hope perl evangelists will not take offense at the request
for advice on choosing a new language :) -- I'm still a perl fan, but even
the biggest perl fans have to admit that it's not right for every project.
Does anyone know of a language / dev environment that supports all of the
following:
(1) Statement completion. (Before I get a bunch of flames composed with
Linux mailers that were hand-coded in assembly while blindfolded and
suspended upside down in a tank of water, read on...) As far as I know,
this exists only in the Microsoft IDE's -- if "objname" is the name of a
class, then when you type "objname.", a drop-down list of class member
variables and member functions appears next to the cursor. Also, when you
type the opening parenthesis in "funcname(", the editor displays the list
of arguments that "funcname(" can take, highlighting them as you type them
in. I assume this limits me to languages supported by Microsoft -- Java,
Visual C++, and Visual Basic.
I know that hard-core assembly coders think these features were developed
for people who are "stupid". I prefer to think that these features were
designed for people who are "busy" -- when you're writing code that uses an
object, it takes too long to switch back and forth between the current file
and the file showing what names you gave to your class variables and
functions, and the names and types of all the arguments. Yes, you can keep
it straight in your head -- but even though great chess players can play
blindfolded, they almost always look at the board while they play, since it
frees up that much more "brain real estate" to focus on the problem at
hand.
(2) Regular expressions. I know nothing can top perl, but I'd still like
to be able to convert code like
$url = 'http://www.yahoo.com/help/';
$url =~ /http:\/\/([^\/]*)\//;
$hostname = $1;
as smoothly as possible.
(3) Good integration with relational databases -- more in the IDE than in
the language itself. Hopefully this would include statement completion, so
that after reading a record from a database, you could type "recordname."
and a list of field names would appear in a drop-down list. What would be
really great is a language that has built-in support for mapping objects to
database records -- instantiate a class using a database record and all the
right fields are automatically filled in.
(4) Throwing and catching exceptions. I think that code like
$something = GetSomething();
if ($something == $errorcode)
{
# handle error
}
else
{
$something2 = Transform($something);
if ($something2 == $errorcode)
{
# handle different kind of error
}
else
{
# do the actual work with $something2 here
}
}
is less elegant than
try {
$something = GetSomething();
$something2 = Transform($something);
# do the actual work with $something2 here
} catch (exception)
{
# handle various types of errors here
}
As far as I know, perl doesn't support these.
(5) Catches syntax errors in code that isn't executed. Presumably because
perl is an interpreted language, it won't see errors like:
if (0)
{
this code does not compile;
}
unless that portion of code actually gets executed.
(6) Strictness in general. About the most discouraging example of
"looseness" I've encountered in perl is the fact that if doSomething() is a
member function of MyClass, then both "MyClass::doSomething()" and
"MyClass->doSomething()" will call the function, except that in the second
case, the class name will be implicitly passed as the first argument, as a
string, before all the other arguments; in the first case, arguments listed
between the parentheses are passed normally. It is possible, I guess, to
spend so much time practicing coding that in the end you naturally avoid
these types of errors, but again I think that falls under the "stupid" /
"busy" dichotomy.
-------
The only likely candidates that I can think of, are:
- Java (drawbacks: not sure about their level of support for relational
databases; not sure about their level of support for regular expressions)
- an all-Microsoft solution, using Microsoft Visual Basic and
Microsoft-style databases (drawbacks: cost, although that's not a huge
consideration; I don't know about their level of support for regular
expressions; dependent on Windows platform; I don't know if VB supports
throwing and catching exceptions)
Any advice?
-Bennett
[EMAIL PROTECTED] http://www.peacefire.org
(425) 649 9024
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users