Hacker News new | ask | show | jobs
by kzhahou 3890 days ago
In Java:

    Alphabet.getGoogle().use(Alphabet.getGoogle().getGooglePlus().
        getCommentFactory(), Alphabet.getGoogle().getYouTube().
        getVideos(com.alphabet.google.youtube.RED))
In python:

    import alphabet.google as google
    google.apply(google.google_plus.comments,
        google.youtube.videos(google.youtube.RED))
Am i doing it right?

(edited for javaness!)

2 comments

Almost, just change the getters to lowercase 'g'et and add a bunch of unnecessary Spring boilerplate on top of it all.
Alphabet.subsidarySingletonFactoryFactory("Google").singletonSubsidary("YouTube")
In some ES6 JavaScript:

   import {google} from 'alphabet';
   let {google_plus, youtube} = google;
   google.apply(google_plus.comments, youtube.videos(youtube.RED));