Code Monkey home page Code Monkey logo

Comments (4)

Novanic avatar Novanic commented on August 15, 2024

Hi,

I tried out your library and I think it is very smart. I need it also to support various commands in combination with parameters/arguments.

I just tried to get rid off guava and the most of it can be replaced with methods of the JDK or a few, small, simple util methods. I think it is also not notable less efficient. There are some lambda-style functional method usages remaining which could get replaced with Lambdas of Java 8. What is your plan to upgrade to Java 8?

from airline.

Novanic avatar Novanic commented on August 15, 2024

I think it would be good to replace guava with an upgrade to Java 8. The upgrade to Java 8 is definitely useful in the future (Java 7 will reach end of life). The point in time is just unclear, regarding the airline library. :-)

Here an example of a replacement of guava with Lambdas of Java 8. I'm just preparing a patch without guava.

Before (guava):
options = CollectionUtils.asList(transform(metadataIndex.values(), new Function<Collection, OptionMetadata>()
{
@OverRide
public OptionMetadata apply(@nullable Collection options) {
return new OptionMetadata(options);
}
}));

After (Java 8, Lambda);
options = metadataIndex.values().stream().map(OptionMetadata::new).collect(Collectors.toList());

from airline.

martint avatar martint commented on August 15, 2024

We've started migrating other airlift-related projects to Java 8 already, but haven't got to this one, yet. We're moving in that direction, though, so thanks for working on that patch.

from airline.

Novanic avatar Novanic commented on August 15, 2024

Ok, sounds good. I have now created a fork/branch which is working with Java 8 and without guava. The fork can be found here: https://github.com/Novanic/airline

I would be happy, when it could get integrated/pushed to the master. :-) There is one optimization/refactoring within the Parser class left. There is still a very intransparent iterator handling within this class. I try to get this optimized tomorrow or by next week.

from airline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.