commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] Commented: (LANG-336) Finally start using generics.
Date Thu, 24 May 2007 19:37:16 GMT


Henri Yandell commented on LANG-336:

Rethinks.... I suspect I went too far.

Here's my thought process:

* We should add varargs to some of our XxxUtils methods.
* We need closures, so we don't have T[] versions of T methods that just loop over the T[]
and implement.
* How do varargs and Object[] work. Need to play.
* That got me into thinking the above :)

Varargs seem a bit lame in that we don't have tuple returns. So you can't do:

public String... capitalize(String ... input);

Not that that would make for nice programming. The LHS would be evil.

So first question to work out is... what parts of Lang would benefit from varargs. Seems that
it'll only be ones that return void, or where the return type is an aggregation of the input
and not a 1:1 mapping. Whether things need generifying would then follow from there.

> Finally start using generics.
> -----------------------------
>                 Key: LANG-336
>                 URL:
>             Project: Commons Lang
>          Issue Type: Improvement
>    Affects Versions: 2.3
>            Reporter: Hendrik Maryns
>         Attachments: commons-lang-2.3-sources-generic.tar.gz, lang.patch
> It is obvious that the Jakarta  project is reluctant in starting to use the 'new' (how
old is it by now?) generics feature of Java.  Nevertheless some other people would like to
see it incorporated in the commons projects.
> I adapted commons Lang to usee generics.  Took me about an afternoon.  Would be nice
if something is done with it, except for only me using it in my projects.
> Some stuff will have to be changed to conform to guidelines and stuff.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message