Giter VIP home page Giter VIP logo

Comments (4)

emil14 avatar emil14 commented on August 21, 2024

Most languages don't have Println builtin

Actually many do

  1. Python
  2. Javascript
  3. Kotlin
  4. Lua
  5. Swift
  6. PHP
  7. Ruby
  8. ...etc.

I think we should follow this.

What will we get from this except the need to import? I personally never like the need to import fmt in Go to make basic IO stuff.

BTW Go has builtin print function (it's never used tho)

from neva.

dorian3343 avatar dorian3343 commented on August 21, 2024

I think we should keep builtin as small as possible and packages more grouped. We should decide what package is for what and break off pieces into those packages.

from neva.

emil14 avatar emil14 commented on August 21, 2024

I agree that some stuff could (and maybe should) be moved from builtin somewhere else, but I'm not sure about Println.

builtin package currently serves 2 purposes:

  1. compiler is aware of that package and uses knowledge about its structure in analyzer and desugarer
  2. things that are used frequently (I personally think that printing comes to this section)

Also, if there would be strong arguments for moving println out of builtin, then the question arise - should it be io? Why not e.g. create fmt like Go does? I believe there are other languages with this structure (e.g. Odin)

from neva.

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.