Live data from Hacker News

Figma’s Journey to TypeScript

figma.com

141–150 of 257 posts

Re: Figma’s Journey to TypeScript

#141
post #120
post #102

Earlier quoted context omitted.

But are the designs lean or bloated. If Figma helps building lean designs it's good otherwise not. Designers tend to put too much useless parts into sites, like unnecessary transparencies and animations.

If a designer uses ‘unnecessary’ transparencies and animations just because a design tool makes those things easy, that is not a problem with the design tool.

If a tool makes something bad easy it is partially responsible.

Re: Figma’s Journey to TypeScript

#142
post #63

Earlier quoted context omitted.

It is actually a fairly indicative story. At the start there is a brilliant individual (Evan) who sets up an entire toolchain + core of the product. They then move on (or get pushed out, or get bored), and with the team (and the product) now being much bigger, things get replatformed to a more familiar, widely used stack. The success of these steps heavily depends on how robust the eng culture is at the organisation.…

It's ironic. For the past 5 years I've been writing type strict PHP. People love to shit on PHP yet I found that when I started using strict types my code quality improved, amount of lines needed to produce a result decreased, and necessary unit tests to produce the same result also decreased. Then a few months ago I decided to write a TS project from scratch. For the record I have 18 years of JavaScript experience.…

> What I found was that the biggest barrier to entry was configuring webpack to be "just right".

As someone who has just spent a whole week trying to plumb Vite + Rollup into an ASP.NET web application, I can relate to this on many levels.

I can produce 90% of our functionality with vanilla javascript + a sprinkling of JQuery, but to get something 'modern' in Vue.JS fitting into the application comfortably is a bloody chore. Sparing the gory details, it feels like orchestrating a thousand moving parts while being blind with a gun named 'ship or die' held to your back.

For comparison, the EF core at least gives me logs. C# is a delight to debug. Print statements can tell me what I need. These parts feel wholistic.

Yet the web stuff is just so scattered, so much to configure, so many options where if you want to do something even slightly non-standard you are in the dark, mashing the conf files until it works and you aren't even sure why but you have to move on.

This feels different from mastering one language, even though it has a steep learning curve. I hit roadblocks in perl but they weren't as frustrating and it felt like everything was feeding back to a cohesive whole. With webdev, it doesn't feel like that at all. I don't know why, I wish it wasn't so.

Re: Figma’s Journey to TypeScript

#143
post #131

I like TypeScript and we have a full-stack system on TypeScript but it's not perfect. Configuring TypeScript for monorepos is a nightmare. Having to make sense of it with internal packages under a pnpm monorepo requires lots of manual tsconfig.json work to make all of the paths work with each other. And our production toolchain was basically unmaintainable until the excellent tsx package became available. It's also c…

Saying typescript is slow because zod is slow is like saying c++ is slow, because javascript is slow. Not to say that typescript is quick in any way (how could it be, as something written in javascript). But letting typescript execute code to infer types in a large scale application seems like a self inflicted issue.

Re: Figma’s Journey to TypeScript

#144

Surprising to hear Figma had a custom language for JS. Even more surprising that it was faster than TS. And then they migrate off it onto slower TS! Seems to happen a lot though. Company makes custom stuff early on, gets big, then migrates to something "standard".

They likely realized that maintaining their own language is very risky and going full on standardized means they can take advantage of massive progress in the entire ts ecosystem.

Custom is great right up to when the lead eng leaves.

Re: Figma’s Journey to TypeScript

#145
post #131

I like TypeScript and we have a full-stack system on TypeScript but it's not perfect. Configuring TypeScript for monorepos is a nightmare. Having to make sense of it with internal packages under a pnpm monorepo requires lots of manual tsconfig.json work to make all of the paths work with each other. And our production toolchain was basically unmaintainable until the excellent tsx package became available. It's also c…

> I like TypeScript and we have a full-stack system on TypeScript but it's not perfect. Configuring TypeScript for monorepos is a nightmare.

It isn't TypeScript that needs to support your particular set of tooling and library choices, but the other way round. We have a mid-sized monorepo (multiple apps, many services) which is mostly typescript. It works alright with a boring npm workspaces based configuration.

Re: Figma’s Journey to TypeScript

#146
post #63

Earlier quoted context omitted.

It is actually a fairly indicative story. At the start there is a brilliant individual (Evan) who sets up an entire toolchain + core of the product. They then move on (or get pushed out, or get bored), and with the team (and the product) now being much bigger, things get replatformed to a more familiar, widely used stack. The success of these steps heavily depends on how robust the eng culture is at the organisation.…

It's ironic. For the past 5 years I've been writing type strict PHP. People love to shit on PHP yet I found that when I started using strict types my code quality improved, amount of lines needed to produce a result decreased, and necessary unit tests to produce the same result also decreased. Then a few months ago I decided to write a TS project from scratch. For the record I have 18 years of JavaScript experience.…

I’m always amazed to see the number of SaaS companies based over here in the more privacy focused, non-Microsoft open source EU centric spaces, that use PHP but without a care in the world for strict typing.

It leads to scenarios where I receive OpenApi specs that loom like this:

   type:
     - string/integer
They just don’t give a shit because this kind of crap works in PHP.

They could use:

   oneOf:
     - type: string
     - type: integer
Which is nastier to deal with a typed language client, but at least it conforms to the spec.

So thank you for actually caring about types in PHP.

Re: Figma’s Journey to TypeScript

#147
post #129

Earlier quoted context omitted.

Remix. Vite done right, mostly pre-configured out of the box.

If you want to spend a minute or two waiting before your server is back up after making any kind of change, Remix sounds about right. My project is relatively tiny too. I’ve never regretted a choice more than Remix.

My projects reload instantly in WSL, what environment are you using?

Re: Figma’s Journey to TypeScript

#148
post #131

I like TypeScript and we have a full-stack system on TypeScript but it's not perfect. Configuring TypeScript for monorepos is a nightmare. Having to make sense of it with internal packages under a pnpm monorepo requires lots of manual tsconfig.json work to make all of the paths work with each other. And our production toolchain was basically unmaintainable until the excellent tsx package became available. It's also c…

[deleted]

Re: Figma’s Journey to TypeScript

#149
post #51

Earlier quoted context omitted.

It happened in the PHP community as well, facebook being the poster child, but Yahoo also had a fair number of internal optimizations and I saw a few other companies tweak their way to get better perf/security. Then comes a point where the community catches on and has bigger momentum than the company, so it makes sense to move to the standard implementation. I'd kinda see Google's Borg -> k8s move as slightly similar…

That is an impressive misrepresentation of history. PHP and its community were dying by the time FB used it. People here on HN kept talking php down. In 2014 FB made their own flavour of php with a bunch of perf features, called hack. Eventually a lot of the perf features hack made its way into php. FB is still on its own flavour. Php community is still dying.

The days of running /index.php for your own forum or script are indeed in the rear view. But it's still very big for small to medium enterprise, where Java + Spring would be excessive. Most of my local web consultancies who produce things like ticketing websites or specialised directories will reach for it.

But maybe the php forums + guestbooks was what you had in mind with 'php community', in that case you have a point. Most of the kids have moved on.

Re: Figma’s Journey to TypeScript

#150
post #62

It’s interesting to read comment threads of people that are dead set against Typescript. It’s a tool that has very few downsides and that improves nearly every single line of code you write. Either they’re scared to learn something new, not willing to take the time, or misunderstanding how useful it is. For anyone reading these comments and agreeing with Typescript naysayers, I would think more about why the commente…

As anything - "it depends"™. I did not notice "every single line of code" getting better at all. Yes, it makes things easier on a large team where people do not have time to do codebase discovery - or where people are moved to be highly interchangeable, on big codebases. Yes, static verification can help those teams and those codebases. But it also introduces a lot of extra work "just to appease the type system". It…

Even as a one person developer, you inevitably need to come back to old code and understand what's happening. Types help with that. The size of the team or codebase is irrelevant.
Post reply on HN