Initial thoughts and questions about Cell

104 views
Skip to first unread message

Alden Daniels

unread,
Apr 12, 2018, 2:29:04 PM4/12/18
to cell-lang
Hi Giovanni,

Thank you for creating Cell and sharing it with the world. This is an ambitious and exciting project. 

I believe that a new kind of declarative programming environment will allow information apps of the future to be developed by domain experts with technical training rather than by professional software engineers. To accomplish this, we need to eliminate manual (and error prone) state management in favor of a reactive model where derived state is automatically computed and maintained. I think that Cell is one of very few projects with the potential (if realized) to enable this.

Cell’s central ideas (reactive database, per-attribute relations, datalog-like query language, strong typing) has a lot of overlap with LogicBlox - a closed source enterprise database/programming environment. If you’re not familiar with LogicBlox I’d highly recommend reading this paper: http://www.cs.ox.ac.uk/dan.olteanu/papers/logicblox-sigmod15.pdf (I’m in no way affiliated with LogicBlox, I’ve just admired their work from afar).

Cell is a smaller project than LogicBlox, but one thing I like about Cell is how you allow traditional imperative constructs locally within functions. I think allowing local variable bindings, loops, etc. makes the language accessible without trading global guarantees.

As compared to more widely known programming languages, I agree with your statement that “Cell is nothing if not different”. Sadly, the world is slow to appreciate new ideas, so I think promoting and explaining Cell is going to be your biggest challenge.

In my opinion, Elm does an exceptional job at promotion/explanation via its live-programming environment: http://elm-lang.org/examples/time. Have you considered making JS the next target instead of Java to allow for this live-programming experience in the browser? 

I think Cell has a lot of potential as a tool for building stateful UIs. If there were a JS version, then I’d have an interest in helping create React bindings so Cell (like Elm) could be used for building web interfaces.

Generally, I have a ton of thoughts and questions about your goals and motivations for creating Cell as well as where you see this going. Feel free to reach out to me anytime at al...@aldendaniels.me.

A bit about me: I’m programmer in the San Fransisco Bay Area. Currently I work at Coda (https://coda.io) building a programmable document surface.

Best
Alden

cell-lang

unread,
Apr 14, 2018, 3:28:48 PM4/14/18
to cell-lang
Hi Alden,

thank you for your interest in this project.

Thanks also for the LogicBlox link, I wasn't aware of it. I haven't had to time to look into it yet, but at first glance it looks really interesting.

About JavaScript, a code generator for it is certainly coming at some point. JavaScript and web development in general are just to big to be ignored. There are however a number of issues here (quite apart from my complete lack of familiarity with front-end web development).

The first one is that if I were to implement it right now performance would almost certainly be inadequate. Even the generated C# code is probably too slow at the moment to be much use in practice, and I would be surprised if JS were any faster. Improving performance (by making use of type information during code generation) is going to be the focus of version 0.2 of the compiler, and I don't think it makes sense to try to implement the JS code generator until that's done.

The second problem is that there's a long list of things to be done (the current version of the language is barely a preview, there's a lot more to come in the future), and this is still a one-man project, so I have to be careful in how I choose my priorities. I've made enough mistakes in that regard in the past, and I can hardly afford to make more.

Another thing to consider is that there already seems to be a number of alternatives for web development for those interested in functional and reactive programming. Elm is the most obvious example of course, but there are also PureScript, ClosureScript and ReasonML. They are all more mature, better known, more focused, and have a lot more manpower (and brainpower) behind them.

So while I believe that combining functional programming and the relational model can yield a significantly more powerful language than, say, ML-style functional programming alone (or otherwise I wouldn't have bothered to create Cell at all), I'd rather focus on areas that are not well-served by existing tools and languages, rather then trying to duplicate what can already be done reasonably well with them.

An example of an area where I think there's a lot of room for improvement is in integrating the server and client parts of an application. What I would like to do at some point is to define some sort of "extended" version the Elm Architecture (or more than one, probably), designed to encompasses both the client and server side of an application, and have the Cell compiler generate code for both, in different languages, with the generated code managing all the communication between them. But that's nontrivial, and it will take some time to get there.

All that said, even though that's not imminent, I do plan to release a JS code generator eventually, and it would be great to have some help once I do.

In the meantime, remember that this project is open to design contributions, not just implementation ones. I'm going to add soon a "Getting involved" page to the website, where I'll be explaining in more detail what I'm looking for, but if you have ideas on how to improve the language, or examples of systems that feel like they could benefit from being implemented in a functional/relational/reactive paradigm, but that cannot be implemented satisfactorily (or at all) with the language in its current form, I would like to hear about it (you can either write on this mailing list or contact me directly at cell.l...@gmail.com)

Regards,
  Giovanni
Reply all
Reply to author
Forward
0 new messages