Git Product home page Git Product logo

Comments (6)

littledan avatar littledan commented on May 17, 2024 1

I think this bug would be better for the class fields repository, but to briefly answer your question: private state is a necessary feature of any defensible classes proposal. Without the ability to keep some things strongly internal, how can you defend against anything?

I don't see the relation between the import proposals that you're raising (again, better to file this as a bug in one of the repositories). import() is used for dynamic cases, whereas other import statement forms are better for static cases. Neither is "better" than the other.

from proposals.

benderTheCrime avatar benderTheCrime commented on May 17, 2024 1

Thanks for getting back!

Yeah, perhaps better is not the right word, but here's the thing:

Currently, import statements are statically analyzed before the rest of the module (please correct me if I'm mistaken). With that being the case, does that extend to nested imports? If nested imports are also statically analyzed before the rest of the module is loaded, you have some actual runtime implications: loading modules you would not otherwise have due to a codepath not being executed. So, really, having nested import statements, it seems to me almost like they would have to be lazily evaluated. If they're lazily evaluated and don't block, I'm not sure I understand how the two proposals are entirely different.

I'm going to raise this as an issue on the nested import repo, as you mentioned I should do for Class Fields, I just wanted to clear the air of this being about the objectivity of certain proposals or a system based on preference as opposed to merit of the actual individual proposals.

As for Class Fields, I would raise an issue on the repository itself, but I have no qualms against the proposal except for perhaps a more definitive understanding of whether the "#" can be applied to methods belonging to class instances and how that grammar would apply to static methods (i.e.: Java's private static). I'm not even sure that's possible.

My concern is the value add of Defensible Classes or some explanation of how that is different than the proposal for Class Fields. What is or would be included in that proposal? This may bear no relevance to the Class Fields proposal itself. Are there meeting notes from which we can pull a better description for Defensible Classes?

from proposals.

benderTheCrime avatar benderTheCrime commented on May 17, 2024 1

Oh, cool, thanks for the link to the proposal, although it doesn't quite clear up all of the questions that have been called out in this issue, I'm glad it's well-defined somewhere.

from proposals.

littledan avatar littledan commented on May 17, 2024

Please see the follow-on private methods proposal for allowing # to be applied to methods. It's not included in the Stage 3 fields proposal; it's a separate Stage 2 proposal.

from proposals.

littledan avatar littledan commented on May 17, 2024

For more details on the status of defensible classes, I'd recommend getting in touch with @erights.

from proposals.

littledan avatar littledan commented on May 17, 2024

OK, let's keep talking on those specific repositories.

from proposals.

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.