Coder Social home page Coder Social logo

compossible's People

Contributors

cvogt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compossible's Issues

Status of this effort?

I went through this: http://downloads.typesafe.com/website/presentations/ScalaDaysSF2015/T4_Vogt_Compossible.pdf

I've been looking a FP language with anonymous records. They are potentially immensely useful when dealing with SQL, as you pointed out in TODO.

I'm curious what is the status of this effort? Did you get the sense Scala itself could support this in future? Relaying on this feature in production would probably require some official support.

I wish Scala compiler was built like Roslyn (the compiler service of C#) so there wouldn't be holes in auto-completion.

Destructuring a TMap in typeclasses

Hi @cvogt,

I know you don't have much time for compossible atm, but maybe you could give me a hint on how one could destructure a TMap when using typeclasses.
I've put up an example project and the problematic case (it's only a few lines) is here:
https://github.com/nightscape/scala-destructure-tmap/blob/master/src/main/scala/TMapDeconstruction.scala
I'm trying to extract multiple keys out of a TMap and processing them with type-classes and had hoped I could split up a TMap[Int with String] into an Int and a String in a generic way, but the compiler seems to split it up into a Int with String and something else.

I would be happy even if you could just throw me some terms to search for, I don't even know what the correct term for the Int with String part is...

Thanks a lot!
Martin

Better set operations

currently there is & which is a union operator on the key value pairs. The default should probably rather be a disjoint union that throws a type error in case of overlap.

Overview of useful operators that should be implemented

  • Union, rhs fields replace lhs fields (currently implemented as &)
  • Disjoint Union, e.g. |
  • Intersection, e.g. &
  • Minus, e.g. r \ (select field1 & field2) or r(remove field1 & field2) or
  • Recursive Union, struct fields merge, non-struct fields replace

Change repo name

Is it worth changing the repo name itself from records to compossible?

rename fields in records

Something like

val p = person1(rename name to p1_name) & person3(rename name to p2_name)
p.p1_name
p.p2_name

However, while the .apply(rename.foo.(to).bar) builder api works, but is a bit weird and probably impossible to get ide code completion without specialized ide support. But how else to refer to non-existing fields? Maybe not allow renames, but only remove and add, like

person1(remove name) & Record(p1_name = person1.name) & person2(remove name) & Record(p2_name = person2.name)

or

(person1(remove name).p1_name = person1.name) & (person2(remove name).p2_name = person2.name)

Still brainstorming about the api.

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.