3 ms·
Typescript… Hated it as first. But once I realized it was for writing JavaScript with a C# flavor, I don’t think we could go back. The only thing that makes me
by hoofhearted 5y ago
Typescript… Hated it as first. But once I realized it was for writing JavaScript with a C# flavor, I don’t think we could go back.
The only thing that makes me scratch me head about TS is that you declare your types backwards compared to C#. Ex. value:string vs. string value.
Is there any good reason for why Microsoft did that? Or can that be updated so a C# developer can jump into Typescript and write TS and TSX components with less friction?
- moogly 5y agoNot an authority on the subject, but on the implementation side I guess it simplifies parsing and "type erasure" (I don't know the proper terminology for transpilation). As for developer experience, I'm sure it helps gradual typing. I much prefer that style since it doesn't keep pushing the most important names to the right and causing jagged textual structure (never knowing at which column function/method names begin, unless you go with a multiline declaration style, which some C/C++ shops do). At this point I wish all languages with a C origin used name-focused as opposed to type or qualifier-focused style, but you can't really change it now.