Fork me on GitHub
#cljs-dev
<
2017-04-23
>
dottedmag11:04:05

@richiardiandrea Maybe ask them when was the last time they chose C compiler based on the clarity of the output assembly, and ask why do they need readable JS if debuggers can apply source maps?

thheller11:04:23

@richiardiandrea why would you ever need to read the compiled CLJS? thats what source maps are for

dottedmag11:04:37

@thheller Likely the answer will be "source map tooling is terrible and does not work, and all fancy compilers we tried suck and produce buggy output"

thheller11:04:05

hmm dunno .. I'm fairly certain that CLJS with source maps will be far better even in :advanced over anything that just has "pretty" compiled output but no source maps

dottedmag11:04:38

@thheller I'm talking about perceptions of people from JS world.

thheller11:04:57

I'd be curious how something like this looks compiled https://facebook.github.io/reason/#diving-deeper-pattern-matching

thheller11:04:20

but really doesn't matter, FWIW I spent quite a bit of time reading CLJS compiled before source maps and still do. It isn't bad.

richiardiandrea16:04:59

Yeah the perception of JS folks is that the js needs to be debugged, source maps do the job in other languages, in cljs a bit less and the output of the compiler is difficult to read. Personally I never found this a problem as I never debug cljs. I need to show a bit what Dirac does though, it probably is the closest to what JS devs are used to.

richiardiandrea16:04:06

Especially for enterprise and node.js, I am told, it is something that will happen a lot. The output of TypeScript or BuckleScript is closer to what JS devs know how to read (for instance no name mangling). In any case it is an interesting feedback, still for me not enough to choose those languages over cljs. For sure not TypeScript...Maaan, super mutable 😀.

darwin17:04:12

the pattern matching reason code compiles to reasonable js

richiardiandrea17:04:43

Yep I saw exactly that

darwin17:04:08

I also like how they use short comments to add some context to generated code

richiardiandrea17:04:10

And my colleagues too, we are in the evaluation phase of the main language (node.js) for a project and there are many things that are well done in Reason/Bs

richiardiandrea17:04:36

But I am of course pushing for cljs ;)

darwin17:04:10

Would be interesting to see exactly what reason did to ocaml, but with lisp-y frontend instead

darwin17:04:30

maybe cljs-like language compiled to ocaml (so it would be usable with bucklescript as a backend)

darwin17:04:20

not sure how hard it was to do reason, but I assume parsing lisp would be easier, codegen would be probably similar

richiardiandrea17:04:13

@darwin I have just PR-ed repl integration for Reason and code parsing is not that hard because everything is scoped so they got rid of many OCaml weirdnesses that way

darwin17:04:03

have to go, will look at reason in more detail soon