Code Monkey home page Code Monkey logo

Comments (4)

titzer avatar titzer commented on June 9, 2024 1

Completed in 5a38d1f.

from virgil.

k-sareen avatar k-sareen commented on June 9, 2024

So like static in C/C++, but a bit nicer. Sounds good. One thought is if an import or module system is ever added, then it may be useful to have module-private functions/classes as well (something like Rust's pub(super)). But maybe that overcomplicates the design.

from virgil.

titzer avatar titzer commented on June 9, 2024

I've implemented this in a branch but haven't merged it yet because I am thinking about how it may slightly surprise some programmers.

E.g. a Java expert might be slightly surprised that private applies to the whole file (i.e. wider scope than assumed). However, I think this is alright because the Java tendency to split classes one-per-file means this isn't much different. I don't think it's too jarring if Virgil has a few more classes and related utility code per file, and it may even be cleaner for reasons above.

So I'll probably land this soon.

from virgil.

k-sareen avatar k-sareen commented on June 9, 2024

I've implemented this in a branch but haven't merged it yet because I am thinking about how it may slightly surprise some programmers.

Just need clear, concise documentation, I would say. static in C != static in Java for example and Java experts who came from C have managed.

from virgil.

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.