8

I just got told that a codebase written in javascript / typescript can't be built to last.

This is the type of rediculous stuff us Web Devs have to put up with.

Comments
  • 2
    I feel like some (many?) web developers what's coming for them
  • 4
    There are 15+ year old JS codebases that are still in production today and will be running as long as backwards compatibility is ensured. These old codebases tend to be redone though because of changing industry standards and requirements.
  • 1
    Seems vague, what does built to last mean? To my mind, that's true of any language.

    "Lasting" is generally based on external factors. Whether it is replaced or not is determined by the needs of the environment the code is used in. If the needs don't change dramatically, code could theoretically be used forever. Code being able to last forever by design would require some degree of prescience.

    The premise feels a bit like having attachment to your code. Sensible planning means amortizing your application or libary's total value over the duration of its planned lifespan. That means every line of code can be expected to be replaced at the point you sunset the application. This type of approach renders moot any consideration of code survivability beyond that point and makes the target achievable.
  • 1
    javascript is always readonly by definition after couple of years. So no, you can'y build it to last

    TypeScript, yep build away !
  • 0
    @NoToJavaScript What do you mean by readonly?
  • 1
    @theuser it's the point when javaScript codebase reaches unmaintanable state. Ususally couple of years and "hotfixes / hacks"

    You can't even know what variuable is doing what
  • 3
    @NoToJavaScript Sounds like any other badly designed and undocumented codebase. That includes the undoubtedly many TS codebases that uses any for everything. (I am actually maintaining one now and its fucking abhorrent.)
  • 1
    @theuser No, I don't agree there.

    In TypeScrip I can just do "roght click, find all references"

    Or "Go to definition".

    I ALWAYS know where and how a variable is used

    By JavaScript nature it is not p[ossible in vaniala JS project
  • 1
    @NoToJavaScript lol your name is NoToJavaScript.

    I agree that JS is harder to maintain but not impossible (I have found some ancient node code that I needed to tweak a few years after it was written)

    But I generally prefer TS unless it's a really small project.
  • 1
    It's not going anywhere
Add Comment