Giter Club home page Giter Club logo

Comments (16)

yvbeek avatar yvbeek commented on August 20, 2024 7

A few ideas:

  • @BundleInfo: reads a key from Bundle.main.infoDictionary
  • @Keychain: reads and stores values in the Keychain
  • @NotificationHandler: subscribes to a specific notification and is automatically deallocated
  • @Random: feed it an array and the get accessor returns a random element
  • @CopyOnWrite: wrapper for isKnownUniquelyReferenced (see this post)
  • @Debug: optional that is only initialized in debug mode (#if DEBUG)
  • @Release: optional that is only initialized in release mode (#if RELEASE)

The names probably need a bit of tweaking 😄

from burritos.

own2pwn avatar own2pwn commented on August 20, 2024 2

I'd go for @Dependency

from burritos.

ricardorauber avatar ricardorauber commented on August 20, 2024 1

Are you guys still working on this repo?

from burritos.

own2pwn avatar own2pwn commented on August 20, 2024

What about to create a poll to vote for the features to impement first?

from burritos.

own2pwn avatar own2pwn commented on August 20, 2024

@Zyphrax maybe @Secret(debug: "", release: "") ?

from burritos.

andreamazz avatar andreamazz commented on August 20, 2024

On top of my mind:

  • @SafeArray: the subscript method returns an optional element, nil if the index is out of bounds

from burritos.

yvbeek avatar yvbeek commented on August 20, 2024

@Zyphrax maybe @Secret(debug: "", release: "") ?

Yes that could work, it reminds me a bit of Ruby Rails environment secrets.

Is it possible to make it generic? Can you for example do:
@Secret(debug: 10, release: 100) ?

from burritos.

guillermomuntaner avatar guillermomuntaner commented on August 20, 2024

@Zyphrax maybe @Secret(debug: "", release: "") ?

Yes that could work, it reminds me a bit of Ruby Rails environment secrets.

Is it possible to make it generic? Can you for example do:
@Secret(debug: 10, release: 100) ?

Absolutely possible to use generics!

I am not sure those "secret" values should be in the souce code. It is a good pattern to keep them in config files/build settings which depend on the build configuration and read via bundle info.

from burritos.

yhkaplan avatar yhkaplan commented on August 20, 2024

I would like to do a PR for something like @Compressed(maxSizeInMB: 10) that makes sure UIImage and Data properties are compressed to below a certain maximum limit. What do you think?

from burritos.

Dimillian avatar Dimillian commented on August 20, 2024

@Cached(name: String)
I'm not even sure PropertyWrapper are the right tool for that, but the idea is to provide a cache key to any optional property that you set later into your code (maybe on the .onAppear, or maybe once you receive data from an async call). The next time you use the same key, it'll fetch the value from the backing storage of @cached (a shared singleton which hold a map of [Key: Value]) and return it if available. And when you set the wrapped value it save it to the cache. Would be quite handy IMO in some case.

from burritos.

guillermomuntaner avatar guillermomuntaner commented on August 20, 2024

@Cached(name: String) ...

@Dimillian a Cached property wrapper is on the todo list. I am still not sure about the cache implementation itself; either NSCache, a popular 3rd party or an easy way of plug in the cache itself.

from burritos.

Dimillian avatar Dimillian commented on August 20, 2024

Right I didn't saw thanks!

from burritos.

mrigankgupta avatar mrigankgupta commented on August 20, 2024

@obfuscate: encrypt and decrypt the string

from burritos.

jasperblues avatar jasperblues commented on August 20, 2024

In Pilgrim I have:

@Assembled var assembly: ApplicationAssembly

to pull items from a dependency container, where the container is responsible for lifecycle and wiring together actors at the composition root.

You can then use @assembled to inject into top-level components (things like view controllers).

Looking forward to @KeyChain

from burritos.

fl034 avatar fl034 commented on August 20, 2024

@Persisted to save Codable values as JSON to the hard drive.

from burritos.

RomanPodymov avatar RomanPodymov commented on August 20, 2024

Hello @guillermomuntaner
Are you going to archive this repository?

from burritos.

Related Issues (13)

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.