Code Monkey home page Code Monkey logo

Comments (13)

yoichitgy avatar yoichitgy commented on June 10, 2024

@ddengler It's great to have the flexibility. On the other hand, limiting the option to ADD_DEPENDENCY makes the usage easier to understand. It's a trade off between flexibility and ease of use.

Would you give me examples for what you are going to use the flexibility?

(My opinion is still neutral. I want to know what kind of things can be achieved with the flexibility💪)

from swinject-codegen.

ddengler avatar ddengler commented on June 10, 2024

@yoichitgy From the top of my head: preprocessor macros or some typedefs or whatever else a user might need in the header I cannot think of right now :)

from swinject-codegen.

ddengler avatar ddengler commented on June 10, 2024

And a user does not have to learn the ADD_DEPENDENCY syntax and can just write / copy&paste what he is already used to

from swinject-codegen.

yoichitgy avatar yoichitgy commented on June 10, 2024

@ddengler Thanks for the answers. Let me take time to think.
@Lutzifer What do you think?

from swinject-codegen.

Lutzifer avatar Lutzifer commented on June 10, 2024

@ddengler @yoichitgy I would propose a general ADD_HEADER command. Simply using comments for it takes away the possibility to use comments for anything else.

from swinject-codegen.

yoichitgy avatar yoichitgy commented on June 10, 2024

I think Lutzifer's idea ADD_HEADER is good.

@Lutzifer Do you mean we are going to support only ADD_HEADER? Or will you support ADD_DEPENDENCY too?

from swinject-codegen.

Lutzifer avatar Lutzifer commented on June 10, 2024

I would only allow AD_HEADER, so

# ADD_DEPENDENCY Keychain

becomes

# ADD_HEADER import "Keychain"

from swinject-codegen.

yoichitgy avatar yoichitgy commented on June 10, 2024

@Lutzifer I agree, thanks for the clarification.

@ddengler What do you think about @Lutzifer's idea?

from swinject-codegen.

Lutzifer avatar Lutzifer commented on June 10, 2024

the https://github.com/Swinject/Swinject-CodeGen/tree/example_add_header has a prototype implementation of this

from swinject-codegen.

ddengler avatar ddengler commented on June 10, 2024

Rails uses in something like the following

# some comment for regular comments

#= import "Keychain" for code to be inserted

Basically the same but a lot shorter

from swinject-codegen.

Lutzifer avatar Lutzifer commented on June 10, 2024

i like that

from swinject-codegen.

yoichitgy avatar yoichitgy commented on June 10, 2024

So do I. Let's use #= to add a header part.

from swinject-codegen.

Lutzifer avatar Lutzifer commented on June 10, 2024

fixed by #55

from swinject-codegen.

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.