Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're correct in most scenarios but TSC can be an unwieldy beast when you deal with large amounts of unstructured data. We work with inverter data from solar plants and let's just say that the engineers who build these things aren't using any sort of data standards. TSC falls short (for us) on things like reflection and type transformation. Which means that we have to actually check if TSC does it the way we want it. Maybe you could configure TSC to always do it the performant way, but then you'll have to work with that, and probably still check if it actually worked. For some things we use C (and a few Rust) services with a local cache of data, but there is so much data that we can't do this for everything. In the perfect world, we would handle this on-site (as the inverter manuals will also tell you to do) but that's not what the bosses have prioritized. We've tried getting some standard solutions, that have so far all come up short. As a result we wasted so much money that we could've had a full team of engineers put up an ARM device to deal with data on every solar inverter and still had literal millions of Euro left over... but corporate will corporate.

It's not like we aren't still doing TS. We're achieving this through the use of JSDoc (and possibly ECMAScript type annotations in the future). Though a little non-performance related added advantage is that when our developers click on "go to implementation", they'll get to the actual code. It has advantages and disadvantages as I said. You'll really, really, need to know the inner workings of JS to outdo the big transpilers, and you're not getting a lot of help working with it (especially not if you're using VSC). I'm not sure you would want to do this in JS at all for the most part, it's just that we are primarily TS developers. I'm the only one who knows C well enough to use it reliably, as an example. Which isn't exactly "maintainable" for the business.

So as I said in at the beginning, I think your gut reaction is correct 99% of the time, but it is an alternative the GP I was replying to asked for.



Thanks for following up. That helps shed some light on what you"re running into.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: