Giter Site home page Giter Site logo

Comments (5)

coding-horror avatar coding-horror commented on June 19, 2024 3

Hmm. I would not say we're trying to emulate large projects here. We are emulating SMALL projects, so make choices appropriate for small projects.

Also the code should be understandable, not necessarily for total beginners, but I'd say.. intermediate level. Not expert!

from basic-computer-games.

amrojjeh avatar amrojjeh commented on June 19, 2024 1

Got it. If that's the case, then I think it makes sense to use top level statements.

from basic-computer-games.

pczajkowski avatar pczajkowski commented on June 19, 2024

Well, you would also have to add this at the top:
using AceyDucey;

And I'm not so sure it would be more readable. But I'm not big fan of top-level statements to be honest.

from basic-computer-games.

amrojjeh avatar amrojjeh commented on June 19, 2024

From the docs:

Top-level statements let you write simple programs for small utilities such as Azure Functions and GitHub Actions. They also make it simpler for new C# programmers to get started learning and writing code.

While the projects here are simple, if my understanding is correct, they're supposed to emulate the conventions of larger projects. So, I would not use top-level statements for this reason.

Edit: On the other hand, if my understanding is correct, the code isn't meant to be understood by total beginners. We're utilizing OOP and subroutines, which means from an educational point of view, we're assuming the readers understand the basics such as Main, and we might be doing a favor by introducing features such as top-level statements so that more programmers are aware of it.

from basic-computer-games.

journich avatar journich commented on June 19, 2024

Thanks @amrojjeh, sounds good!

from basic-computer-games.

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.