Why Perl does not have good IDE's?
In today's world, Integrated Development Environment (IDE) is an integral part of programming.
In today's world, Integrated Development Environment (IDE) is an integral part of programming. It empowers the developer to build the software application effectively and quickly. The essentials features of IDE are Syntax highlighting, Refactoring, debugging, Auto Code Completion, Terminal, version control and data structure browsing, which helps a developer quickly execute actions and maximize the productivity by providing the User Interface.
Most of the IDE in the today's world supports multiple languages and Perl is one of them.
Perl's and most popular IDE's are :
- Komodo Edit
- Atom
- Padre (Not in active development)
- VS Code
- Pycharm
All IDE's mentioned above are good in Syntax highlighting, having their Terminal and also provides the version control. But the auto code completion is missing from all the editors. And the reason is the TIMTOWTDI. Yes, you read it right. The boon for Perl is actually the bane for Perl, and hence here is no perfect IDE for Perl and I think this is the reason that new Programmers are not attracted towards Perl.
For example in Python3 to add two numbers using function is
def add_number(var1, var2):
return var1 + var2
print(add_number(2, 3))
Whereas to do the same in Perl:
Method 1
use warnings;
use strict;
my $res = add_number(2, 3);
print "Result is : ", $res, " ";
sub add_number {
my($num1, $num2) = @_ ;
return $num1 + $num2;
}
Method 2
use warnings;
use strict;
my $res = add_number(2, 3);
print "Result is : ", $res, " ";
sub add_number {
my $num1 = shift;
my $num2 = shift;
return $num1 + $num2;
}
Method 3
use warnings;
use strict;
my $res = add_number(2, 3);
print "Result is : ", $res, " ";
sub add_number {
return $_[0] + $_[1] ;
}
Method 4
use warnings;
use strict;
my $res = add_number(2, 3);
print "Result is : ", $res, "";
sub add_number {
# my ($num1, $num2) = (@_);
return shift(@_) + shift (@_);
}
METHOD 5
Last but not the least
use warnings;
use strict;
my %dis = ( plus => sub { $_ [0] + $_[1] } );
my $res = $dis { plus } -> (2, 3);
print "Result is : ", $res, "\n";
Which one of the above is correct?
All of the above methods can be used to add two numbers in Perl. I am pretty sure that there are other methods to achieve the same result.
Anyways, imagine just to add two numbers, Perl has at least 5 ways to do it, and if we want to add all the shortcuts or code completion for Perl in an IDE it is practically impossible and if somehow it is possible then that particular IDE will be memory extensive which is kill to the system.
In short, I don't think in future it is possible to have the IDE in Perl. You might have editors (I like atom personally) but not the full-fledged IDE.
As a Perl lover, I wish I am wrong.
AK Newsletter
Join the newsletter to receive the latest updates in your inbox.