I wrote up some thoughts about my desire for strong type systems in frontend development. I'll be exploring these thoughts more in further entries.

@neauoire I just realized this statement can be interpreted two ways.

Do you mean an optional type system (like TypeScript)?

Or do you specifically mean optional types (like string? or Option<string>)?

I think it would be cool if browsers supported TypeScript out of the box without needing to compile to JavaScript first.

@maxdeviant typescript in the browser is my dream. It would be optional, non-breaking, so types are not mandatory.

@neauoire @maxdeviant
In my opinion, Types systems should not "alterate" the execution process (except in the case of gradual typing).
JIT-compilation does not have enough maturity to typecheck on the fly, so i'm really glad to have a pre-static analysis.

I definetely do not like the distinction between strong and weak typing. An I prefere "static type checking" versus "dynamic type checking". (For example, Ruby and Erlang are strongly typed languages since they avoid implicit coersion)

@neauoire @maxdeviant

And... btw, I think that TypeScript is a good "first step", but I strongly prefer a "expressiver" type system, like in Haskell or OCaml.

@xvw @neauoire I completely agree.

In my article I note that TypeScript is good for what it is, but I much prefer languages like F#, Rust, or Haskell.

@maxdeviant @neauoire If you like F#, you should give a try to OCaml. F# was inspired by OCaml and OCaml has a better support on Unix/BSD env and with a power language module. (FSharp has a better workflow builder with computation expression)

@xvw @neauoire I work in a .NET shop, so F# is the obvious choice 😉

For hobbyist programming I use Rust.

@neauoire @maxdeviant
I understand :)
But you do not like "compilation phase" ?

@xvw @maxdeviant If JS would support types, it wouldn't have to be built or anything like that.

@neauoire @maxdeviant
I don't see how "typecheck" with speed without compilation's phase :)

@neauoire @maxdeviant
But yeah, JS type system could be ... more... strict :/

Sign in to participate in the conversation

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.