Git Product home page Git Product logo

Comments (6)

laurentheirendt avatar laurentheirendt commented on May 29, 2024

I think we should stick with camel case: https://docs.julialang.org/en/v1/manual/style-guide/#Use-naming-conventions-consistent-with-Julia-base/

from cobrexa.jl.

stelmo avatar stelmo commented on May 29, 2024

So they recommend camel case for Modules and structs, but underscores for functions where appropriate. See the excerpt from the the Julia docs:

  • modules and type names use capitalization and camel case: module SparseArrays, struct UnitRange.

  • functions are lowercase (maximum, convert) and, when readable, with multiple words squashed together (isequal, haskey). When necessary, use underscores as word separators. Underscores are also used to indicate a combination of concepts (remotecall_fetch as a more efficient implementation of fetch(remotecall(...))) or as modifiers.

  • conciseness is valued, but avoid abbreviation (indexin rather than indxin) as it becomes difficult to remember whether and how particular words are abbreviated.

Also, JuMP recommends underscores, see excerpt from their docs below:

Use of underscores within names

The Julia style guide recommends avoiding underscores "when readable", for example, haskey, isequal, remotecall, and remotecall_fetch. This convention creates the potential for unnecessary bikeshedding and also forces the user to recall the presence/absence of an underscore, e.g., "was that argument named basename or base_name?". For consistency, always use underscores in variable names and function names to separate words.

from cobrexa.jl.

laurentheirendt avatar laurentheirendt commented on May 29, 2024

good point 😄 let's stick with that convention then 👍🏼

from cobrexa.jl.

exaexa avatar exaexa commented on May 29, 2024

so we are renaming to snake_case if I get it right?

from cobrexa.jl.

laurentheirendt avatar laurentheirendt commented on May 29, 2024

yes, according to the convention @stelmo posted

from cobrexa.jl.

exaexa avatar exaexa commented on May 29, 2024

Fixed by 4aa8a97

from cobrexa.jl.

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.