Skip to content

Open Questions

Ramsey Nasser edited this page Aug 31, 2016 · 1 revision

Data Structures

  • How do you create a generic collection?
    • Explicitly
      • (vector Int32 1 2 3)PersistentVector<Int32> (does not box)
      • (vector Int32 1 2 3 "foo") → exception
      • (vector 1 2 3)PersistentVector<object>
      • [1 2 3]PersistentVector<object>
      • [1 2 3 "foo"]PersistentVector<object>
    • Implicitly (probably a bad idea)
      • [1 2 3]PersistentVector<Int32>
      • [1 2 3 "foo"]PersistentVector<object>
      • [a b c]PersistentVector<D> (D is the common supertype of a, b, c)
  • What happens when you add an incompatible type to a generic collection?
    • e.g. (let [v (vector Int32 1)] (conj v "foo"))
      • Throw an exception?
      • Construct a new vector of type PersistentVector<object>?
  • Could value types flowing through a program end up getting boxed multiple times because of this?

Function Interface

  • Do we include return type in the generic signature?
    • Julia avoids this as they feel it overly complicates their compiler to little gain.
    • How do we deal with argument casting? At the call site? In the function?
  • This can and should be prototyped in C# e.g. like this.

CLR vs C♯

  • To what extent are we targeting/interoping with the CLR vs C#?
    • Current type syntax is purely CLR and does not support C#'s conveniences (e.g. |System.Collections.Generic.List'1[System.Int32]| vs List<int>
    • The current analyzer supports look up of Properties, which are a C# feature.
Clone this wiki locally