3 ms·
I am pretty tired of statically typed direct-to-JS languages which are wildly unsound. I use TypeScript at work, and I grant it's hugely safer than JavaScript a
by jonsterling 13y ago
I am pretty tired of statically typed direct-to-JS languages which are wildly unsound. I use TypeScript at work, and I grant it's hugely safer than JavaScript and has saved us from dozens of defects even in the two weeks since I introduced it, but its type system is pretty broken.
A DSL written in a dependently-typed language (such as Idris) would suffice for both the kind of safety and the level of expressivity I require. (Unfortunately, the various JS backends for Haskell, Idris, Agda, etc. are not usable for my purpose, since I need the output to be readable and debuggable).
Anything less than what I have proposed in the previous paragraph is pretty uninteresting to me. It's unfortunate that people are working so hard on Kotlin, when it cannot contribute anything new or interesting, by its very nature.
- profquail 13y agoHave you looked at Haxe (http://haxe.org/ http://haxe.org/)? It's supposed to have a decent type system, although I can't say how it compares to TypeScript's since I've used neither of them. If you need a stronger type system, and you're already using TypeScript, take a look at FunScript (http://funscript.info/); http://funscript.info/); it uses the meta-programming features of F# to do strongly-typed JS (and TypeScript) code generation and interop with existing code.
- jonsterling 13y agoThanks for the links! FunScript looks really neat.
- mortyseinfeld 13y agoIt's unfortunate that people are working so hard on Kotlin, when it cannot contribute anything new or interesting, by its very nature. Maybe you can think outside of yourself for once and consider that your uses cases or personal preferences aren't what the Kotlin devs consider important.
- jonsterling 13y agoYes, my very point is that it is unfortunate that my use cases and personal preferences are not what Kotlin devs consider important. This is not a matter of “Waaaa, they don’t consider me the center of the Universe as I do!”; it's simply the case that my “personal” preferences correspond with reality and safety more closely than do theirs. A priori, it would be better if they conformed to my expectations; anything less than awareness and deference to the last 40 years in PL research is uninteresting and unhelpful.
- mortyseinfeld 13y agoit's simply the case that my “personal” preferences correspond with reality and safety more closely than do theirs. A priori, it would be better if they conformed to my expectations; anything less than awareness and deference to the last 40 years in PL research is uninteresting and unhelpful. Amazing. Are you a solipsist or just incapable of perceiving outside of your little bubble? Do you even understand what the Kotlin devs are trying to accomplish? Hint, they're not trying to develop the next dependent type theory implementation on the JVM. They're implementing a language so that Java developers can be a bit more productive than they are now.
- jonsterling 13y agoClearly I am a solipsist, my dear fellow. Case closed.
- camus2 13y ago> but its type system is pretty broken. In order to have a type system that is compatible with javascript , there are things you just cant do. I think Microsoft TS team did an acceptable compromise. TS is not perfect , but the fact that one can still use pure JS in typescript is a huge plus.
- jonsterling 13y agoReally, that's quite the problem: the desire for at least one-way compatibility.
- michielvoo 13y ago> but its type system is pretty broken Can you explain this? Thanks!