jump to navigation

Some ideas on method auto-completion in Padre June 9, 2009

Posted by claudio in Uncategorized.
Tags: , , , , , ,
12 comments

perlAuto-completion is a nice feature for an IDE. While Padre supports some auto-completion functions, method auto-completion is an important missing feature. This post is a short round-up of features present in other IDEs.

What auto-completion features does Padre support today?

Beside automatic bracket completion, Padre has a nice auto-completion implementation for variables (first character -including sigil- then ctrl + p):

padreautocomplete

Eclipse + Epic

Epic (an add-on to Eclipse) has a nice working auto-completion feature activated by the method invocator (->).

epicac

As a reference, the java auto-completion in Eclipse:

eclipseac

Komodo Edit

Komodo Edit also has auto-completion for methods, but does not show those inherited from parent classes making the feature rather useless for OO development.

komodeac

Netbeans

Netbeans has no Perl support, nevertheless the java auto-completion feature is a good example:

nbaujava

The method auto-completion feature is activated by the “.” (“->” in Perl). Not only you get a list of accessible methods (with expected parameter type and return value), but also the javadoc documentation for the selected method.

How should Padre support method auto-completion? Some ideas

  1. Method autocomplete should be activated by “->” and “::”. This way class hierarchies can be autocompleted as well. With “::” support for functions can be added.
  2. Private methods should be hidden. By convention, private methods start with “_”.
  3. Linking method autocomplete to perldoc is a winner combination when programming to not yet familiar APIs and certainly friendly to new Perl developers. While Perl is not strictly typed, a well formatted perldoc entry for a method should make clear what kind of parameters are expected and what the return value could be. However, documentation is rather freely formatted, so it would be difficult to implement in a generic way (without adding formatting restriction to classes).

High-Order Perl now legally available online December 10, 2008

Posted by claudio in Uncategorized.
Tags: , , ,
add a comment

perlIn case you haven’t read it elsewhere, High-Order Perl written by Mark Jason Dominus is now legally available on-line without cost. Get it here.

Of course, if you find the book useful and/or interesting you should buy it. You will not only acknowledge Mark’s work, but you will keep the Perl book micro-cosmos alive. Books that help you learn and widen your knowledge are a must for a language to flourish (not only for languages, by the way).

Having the real thing before buying gives you the power as a programmer to decide if it’s worth your money (no one can buy 1000 books). This beats reading reviews, table of contents or even a quick look in the bookstore.

Thanks for the trust, Mark.

Use external functions/modules in korn shell (ksh) August 7, 2007

Posted by claudio in Uncategorized.
Tags: , , , , , ,
1 comment so far

The korn shell is a great shell to write shell scripts. Some functionalities are really nice. By example, you can write your functions or modules in a separate file and use it within your program. The secret lies in the FPATH environment variable. (more…)

Follow

Get every new post delivered to your Inbox.

Join 49 other followers