4 ms·
I do not have a single 'this' pointer in my programs. Not a single class/prototype. Imo, that leaves: Bad/no pattern matching support, many operators create sta
by boubiyeah 10y ago
I do not have a single 'this' pointer in my programs. Not a single class/prototype. Imo, that leaves: Bad/no pattern matching support, many operators create statements and not expressions (e.g if/else) but they can be extracted to functions.
Also, relative path imports. This is nuts. But you can use root imports with webpack+TS and the problem is solved.
mutable objects/arrays is annoying. But we have the convention of never doing it, and it's been working for a long time. (https://github.com/AlexGalays/immupdate https://github.com/AlexGalays/immupdate)
Granted, I would prefer immutable by default for sure.
Do you have other insane JS semantics in mind?
And yeah, F# looks brillant. Just wished it was not a .NET thing. Fable could interest me but it's just like bucklescript/reasonml: there is no momentum, no community, no libs. It would be a big leap of faith to heavily invest in it as an individual.
I generally like the FP approach with imperative escape hatches. Need more performance? Some code is actually more elegant in imperative form? Go for it.
F# can do it, scala can do it too (unfortunately with some crappy java compatibility concerns to deal with)
- mamcx 10y ago> Just wished it was not a .NET thing Then what? OCalm is the other possibility, but the appeal of a larger ecosystem and easier mobile target by xamarin is what put me into F#.
- allover 10y agoI actually think momentum behind Reason/Bucklescript is going to start building, possibly spurred on by React people. Saw this tweet recently [1] re: React bindings to Reason at Facebook. (Neat demo and interesting replies to the tweet). >> Early preview of @reasonml bindings to ReactJS. Compiles to regular JS so interop/debugging is easy. Haven't been this excited since React! [1] https://twitter.com/jordwalke/status/814091172540858368 https://twitter.com/jordwalke/status/814091172540858368