GithubHelp home page GithubHelp logo

syntax: About commas about objectscript HOT 5 CLOSED

unitpoint avatar unitpoint commented on August 21, 2024
syntax: About commas

from objectscript.

Comments (5)

unitpoint avatar unitpoint commented on August 21, 2024

I don't think so, for example

var params = {
    username = "nick"
    password = "12345"
    sex = "m"
}

Commas are optional and could be used.

from objectscript.

garex avatar garex commented on August 21, 2024

When we have new lines -- may be, but in one string it's a bad looking.

For example let's take paragraph from War-n-Peace. Following your logic, dots and ucfirsts also nto needed :)

-- Ах, не говорите мне про Австрию! Я ничего не понимаю, может быть, но
Австрия никогда не хотела и не хочет войны. Она предает нас. Россия одна
должна быть спасительницей Европы. Наш благодетель знает свое высокое
призвание и будет верен ему. Вот одно, во что я верю. Нашему доброму и
чудному государю предстоит величайшая роль в мире, и он так добродетелен и
хорош, что Бог не оставит его, и он исполнит свое призвание задавить гидру
революции, которая теперь еще ужаснее в лице этого убийцы и злодея. Мы одни
должны искупить кровь праведника... На кого нам надеяться, я вас
спрашиваю?

vs

ах не говорите мне про австрию я ничего не понимаю может быть но австрия никогда не хотела и не хочет войны она предает нас россия одна должна быть спасительницей европы наш благодетель знает свое высокое призвание и будет верен ему вот одно во что я верю нашему доброму и чудному государю предстоит величайшая роль в мире и он так добродетелен и хорош что бог не оставит его и он исполнит свое призвание задавить гидру революции которая теперь еще ужаснее в лице этого убийцы и злодея мы одни должны искупить кровь праведника на кого нам надеяться я вас спрашиваю

Which text is more readable? We should have some balance in the result.

from objectscript.

unitpoint avatar unitpoint commented on August 21, 2024

ну это не эквивалентные примеры, т.к. OS без запятых распознается полностью однозначно

from objectscript.

garex avatar garex commented on August 21, 2024

Yea, it's just some kind of extreme case.

But I want to say, that [1, 2, 3] could be more readable than [1 2 3].

As we can also have [123] or [12 3]. You know -- we are just people and no one cancels mistypes.

It's not critical if lang allows both forms, same as in JS we can avoid ";" between new line.

from objectscript.

unitpoint avatar unitpoint commented on August 21, 2024

I agree, OS syntax is modified and commas must be used now

from objectscript.

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.