Giter Site home page Giter Site logo

Comments (3)

ljedrz avatar ljedrz commented on May 31, 2024

Thanks for your feedback! This is a good point; I looked into my options and found the following:

  1. changing it to a static mut, but it requires unsafe blocks whenever it is used
  2. using lazy_static, but I would prefer to avoid any dependencies
  3. conditional compilation with e.g. #[cfg(feature="backslash_lambda")]

I don't have much experience in terms of crate integration, but option 3 looks most promising to me. I doubt anyone will want to use both variants at once, so a one-time decision makes sense. Do you think it would be a good idea?

from lambda_calculus.

Michael-F-Bryan avatar Michael-F-Bryan commented on May 31, 2024

Option 3 sounds like it'll probably be the best one. It's not really something you'd want to change often anyway, and a feature will probably be the best option.

You could probably do something like this:

#[cfg(feature = "backslash_lambda")]
const LAMBDA: char = '\\';
#[cfg(not(feature = "backslash_lambda"))]
const LAMBDA: char = 'λ';

Then whenever you need a lambda character just refer to that. From what I can see the only file affected would be src/term.rs.

from lambda_calculus.

ljedrz avatar ljedrz commented on May 31, 2024

Done. Thanks again!

from lambda_calculus.

Related Issues (7)

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.