Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

> Simple, scalable state management

https://github.com/mobxjs/mobx

It says "simple" but looks complicated. Any pointers? Is it because I don't know how decorators work it looks complicated?



sort by: page size:

>It has a simple intuitive syntax

The code example reminds me of Latex: https://crashedmind.github.io/PlantUMLHitchhikersGuide/Netwo...


> The simplest code is an empty file

Reminds me of this: https://github.com/kelseyhightower/nocode


This sort of is composition. It's like a static version of the Decorator pattern. Here's a vaguely realistic example:

http://blog.ryannedolan.info/2014/03/scala-pattern-stackable...



> proprietary extensions to HTML

That sounds a bit disingenious.

https://github.com/ampproject/amphtml




Similar, but harder to use safely and correctly in class methods using the new class syntax. There's more surface area for typos and other mismatch errors since you have to type the method names twice. See: https://mobx.js.org/best/decorators.html

It usually suggests blocks within a function / method in my experience. Here's an example I created just now:

https://gist.github.com/berndverst/1db9bae37f3c809e5c3f56262...



This seems really verbose? Very XML-y.

What's wrong with simple https://github.com/omniti-labs/jsend

``` { status : "success", data : { "post" : { "id" : 1, "title" : "A blog post", "body" : "Some useful content" } } } ```






> (...) my programming language.

https://www.unisonweb.org/ ?


This honestly is not an example of very readable code: https://github.com/lulzlabs/AirChat/blob/master/airchat.pl#L...

> Don't use explicit returns

this is not just a style issue, its also a functional one https://tpolecat.github.io/2014/05/09/return.html


next

Legal | privacy