Giter VIP home page Giter VIP logo

Comments (7)

viper-admin avatar viper-admin commented on June 3, 2024

Bitbucket user bbrodowsky commented on 2013-06-03 15:33

I think the documentation of "Seq()" clearly states that it is for non-empty sequences, for exactly the reason you mentioned, if I am not mistaken. So this should just throw an exception.

from silver.

viper-admin avatar viper-admin commented on June 3, 2024

@mschwerhoff commented on 2013-06-03 15:39

The syntax overview indeed describes Seq[Int]() as the empty sequence. It does not explicitly say that Seq(...) must not be empty, but I guess you are right.

Unfortunately, parsing |Seq[Int]()| yields Parse error: Failure: 'old' expected but 'S' found.

from silver.

viper-admin avatar viper-admin commented on June 3, 2024

Bitbucket user bbrodowsky commented on 2013-06-03 15:42

I don't know the details of the parser and I did not work on it either, so I don't know what our problem here. I just remembered this thing about empty sequences.

from silver.

viper-admin avatar viper-admin commented on June 3, 2024

@alexanderjsummers commented on 2013-11-20 17:32

nicest (in my opinion) would be to be able to leave a kind of unification (type) variable, which could be determined later in type-checking. That might not be so easy (depending on how the type-checker currently works), but it's kind of annoying to have to write SeqInt in cases where the type is determined by the context.

In theory, one could carry around an environment mapping such variables to instantiations found so far during type-checking. If the whole type-checking goes through without instantiating such a variable, then its instantiation really doesn't matter for the program, and we could just pick some default (Ref / Int). Of course, leaving the unbound type variable is not a good option for downstream tools.

from silver.

viper-admin avatar viper-admin commented on June 3, 2024

Bitbucket user mnovacek on 2014-05-21 09:47:

  • changed the assignee from (none) to bitbucket user juhaszu

from silver.

viper-admin avatar viper-admin commented on June 3, 2024

Bitbucket user juhaszu commented on 2014-05-28 12:33

Modified syntax so that empty collections require an explicit type

from silver.

viper-admin avatar viper-admin commented on June 3, 2024

Bitbucket user juhaszu on 2014-05-28 12:33:

  • changed state from new to resolved

from silver.

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.