News for hackers. Stuff that matters.
Re:Announcing TypeScript 2.0 by bsimpson on Thursday September 22, 2016 @03:55PM (#12559794)
Or in a GUI: Apple-Shift-F

Find: <old name>

Replace: <new name>

…continue working.

Re:Announcing TypeScript 2.0 by SiVal on Thursday September 22, 2016 @04:37PM (#12560167)
That crosses namespace boundaries and risks hitting embedded parts of names, which means that you can't simply replace all as a general practice. You can inspect each one before replacing and be your own type checker or just go ahead and blast them all blindly. With a little thought, blind replace-all will usually work with small code written very recently by you but will become increasingly error-prone with more code, more developers, over more time.

You can, of course, try using case-sensitivity and whole-word search modifiers while trying to maintain naming conventions to keep replace-all working a little longer, but that's just an incomplete and buggy attempt at creating your own watered-down type system, not proving that types aren't useful.

Re:Announcing TypeScript 2.0 by shados on Thursday September 22, 2016 @04:16PM (#12559978)
Won't work super hot if you have 2 functions with the same name in 2 different modules and you want to rename one and all its usages but not the other.

It's quite impressive what VisualStudio + Resharper + plugins or IntelliJ with a few plugins can do in their respective first class languages.

Re:Announcing TypeScript 2.0 by jeremiep on Thursday September 22, 2016 @04:29PM (#12560094)
I used to like ReSharper but quickly uninstalled it from the large amount of false positives it reported.

Back when I did C# last year I was doing 2D skeletal animations in Unity3D and pretty much wrote the most non-idiomatic C# code ever. Everything was bitfields, structures of arrays and integer indices into contiguous memory buffers rather than heap references.

The tooling was completely useless there. You can't optimize for cache misses and branch predictions without throwing all that nice typed goodness out the window.

As much as types, tests and whatnot can help you, at the end of the day it is impossible to do engineering without understanding what you're doing, regardless of what is there to do heavylifting for you.

Re:Announcing TypeScript 2.0 by westoncb on Thursday September 22, 2016 @04:21PM (#12560027)
This doesn't actually work. Let's say the variable you'd like to rename is 'label,' and you also have variables named 'labelOne' and 'labelTwo'—see the problem?