DEV Community

Ashutosh
Ashutosh

Posted on • Originally published at ashutosh.dev

Why Perl does not have good IDE's?

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))
Enter fullscreen mode Exit fullscreen mode

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;
}
Enter fullscreen mode Exit fullscreen mode

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;
}
Enter fullscreen mode Exit fullscreen mode

Method 3

use warnings;
use strict;

my $res = add_number(2, 3);

print "Result is : ", $res, " ";

sub add_number {
   return $_[0] + $_[1] ;
}
Enter fullscreen mode Exit fullscreen mode

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 (@_);
}
Enter fullscreen mode Exit fullscreen mode

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";
Enter fullscreen mode Exit fullscreen mode

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.

Top comments (9)

Collapse
 
ferricoxide profile image
Thomas H Jones II

One could probably make an IDE that did what you needed, but, you have to have a sufficient critical-mass of users and would-be-users for it to be worth someone's or some group's time to do.

For better or worse, Perl isn't fashionable any more (hell, Perl isn't even installed by default on many OSes where it used to be).

Overall, it seems like "buzzy" languages are the ones to get IDEs ...probably to facilitate people being able to easily work in the language du jour.

Collapse
 
akuks profile image
Ashutosh • Edited

I think perl is not installed only on Windows I guess. It is core in Unix like Operating system. I agreed it is not as Popular as before.

Collapse
 
ferricoxide profile image
Thomas H Jones II

It's been a while since it's been part of OSes or distributions' "core"/minimized package-groups. For example, it hasn't been core to Enterprise Linux since at least RHEL 5 (which is like a decade or so, now?). Been a similar time-span for Solaris and other commercial UNIX variants.

Thread Thread
 
akuks profile image
Ashutosh

Oh, It isn't a part of core RHEL ? I didn't knew that.
I use Ubuntu in one of the VPS and Perl version 5.26 is pre-installed in it or may be it is the service provider who installed it (I don't know).

Thread Thread
 
ferricoxide profile image
Thomas H Jones II

Frequently, VPS service-providers do an other than "minimized" installation - mostly as a means of avoiding thousands of "<SOFTWARE> is missing" service requests.

Collapse
 
jossk profile image
joss

What about IDEA + Perl plugin

Collapse
 
akuks profile image
Ashutosh

I used it earlier but I didn't found it good enough. Now I am using VS Code along with the Tabnine Plugin. It is as close to what Pycharm is for Python.

Collapse
 
rpoirier profile image
Reese Poirier

Thanks for the Tabnine tip. I'm passing it along to my team.

Collapse
 
alphacoorg profile image
Rakshith Chengappa

Method 6:

print &add_number(2,3);
sub add_number { return $[0] + $[1] ; }