Git Product home page Git Product logo

Comments (5)

rreusser avatar rreusser commented on August 11, 2024

I appreciate the feedback! And I agree about the style guide. There's way too much inconsistency across scijs. As for ASI, I don't really have a strong preference on the matter, but here's a complete rundown of why I've gravitated toward no semicolons:

  1. A desired to avoid bikeshedding. In my opinion (feel free to push back on this 😄) it's probably more important to define a style guide than to attempt to determine the correct style guide—though I've failed to do this so far. Regarding standardjs, I find the "Not configurable" stance rather compelling. It sounds like you may prefer semistandard js 😄
  2. Tested code is subject to the interpreter which performs ASI.
  3. Minified code will get semicolons anyway.
  4. To the best of my knowledge, ASI is safe. Standard js for one enforces the conventions that would cause problems—like [starting a line with or (.
  5. Using semicolons doesn't mean you don't still need to understand ASI. Note that this function always returns undefined due to ASI, despite using semicolons:
var computeThreePlusFive = function () {
  return
    (3 + 5);
};

So that's why I've kinda gone the direction I have, but if a style guide changed and the code could be linted with little or no configuration, I'd be perfectly happy.

I'd love to sweep through all of scijs and apply these conventions. Frankly, it's been a shortage of time and collaborators that have prevented this so far, although I'd definitely believe it if you told me the lack of clear styles and guidelines has kept collaborators away in the first place. 😞

from ndarray-blas-level1.

tab58 avatar tab58 commented on August 11, 2024

+1 for avoiding bikeshedding. I really don't care what the style is as long as there's some guide to follow. Personally, I like the Google JS style guide and what I've seen of semistandard.js. It seems there hasn't been a lot of need for a specific style as there haven't been more than a few contributors to a project, but I think maybe that's a talking point with the rest of the scijs team.

About ASI, I can see your point. However, I respectfully disagree with relying on it. In my opinion, ASI has a similar function to a style guide. Ideally, they're supposed to keep you from doing stupid things that will create hard-to-find bugs, like your example of the computeThreePlusFive function. I've seen many articles saying it's okay to leave out the semicolons, but I don't quite get the logic of heavily relying on the ASI to put in what people have intentionally left out. Besides, it's a C-like syntax, so it's weird without the semicolons :-)

I would be fine with helping convert code over to a specific style as I try to contribute to the specific projects. While I don't think the style has necessarily driven away contributors, I think having well-defined parameters will help contributors (like me) in the future.

from ndarray-blas-level1.

rreusser avatar rreusser commented on August 11, 2024

Sounds good to me. Do you think semi standard is a good choice then? Except for the contentious issue of semicolons, I think all the other stuff is lovely and zero-config is certainly nice.

How about this. I'll make a guidelines repo. We can hash out a few issues there and then apply them where appropriate in a broad sweep. There are a few other points that I think would help consistency and maintenance. There's also a scijs-generator module around here somewhere. I don't like generators in general, but I think this is a place where it could be rather helpful in atartingg things out with some baseline consistency.

(Finally—regarding my wording as I look back—I certainly don't mean to claim any sort of ownership over scijs; in the world of Starters and Maintainers, I'd consider myself a maintainer at best! Need to get back into it and pull these things together though.)

from ndarray-blas-level1.

tab58 avatar tab58 commented on August 11, 2024

I'll make a guidelines repo. We can hash out a few issues there and then apply them where appropriate in a broad sweep. There are a few other points that I think would help consistency and maintenance.

Yeah, let's move this discussion there.

from ndarray-blas-level1.

rreusser avatar rreusser commented on August 11, 2024

See: https://github.com/scijs/contributing

from ndarray-blas-level1.

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.