HNHacker News
TopNewBestAskShowJobs

olitech

65 karma · joined October 4, 2022

sunsetkookaburra.net
submissionscomments
olitech··on Google Search “define inequality” shows gibberish
I'm thinking it might be related to Bard.
olitech··on Google Search “define inequality” shows gibberish
Someone had shared the quirk with me and said they were able to find the text in news articles (though dating from 13 August 2003), which may explain the dependence on country.
olitech··on TypeScript is now officially 10 years old
I'd disagree that its a poor decision, some help is better than no help when reading code - and if it's inline then it's intrinsically meaningful.

By no means is it perfect, the language doesn't enforce the type rules, but that the developer has the option is far better than not. As far as I can tell the proposal would pretty similar to Python; one can misleadingly or accidentally misuse type hints like the following:

  def myfn(a: int) -> str:
    return int(a)
  
  print(myfn("42"))
But when done right, it gives you a leg up when you come back to read your own code or scan over someone else's. When you're reading over other's code in group programming assignments, comments make a world of difference (a niche example).

It is a choice, but its use in code might just inspire someone to investigate further - my own introduction to types in programming came when I wondered what these oddly placed colons and arrows were in some Python I came across. If they do add these annotations to JavaScript, some future programmer browsing the source of a web page may well just stumble upon types and have a whole new world of theory opened up to them - I'm all for it.

olitech··on TypeScript is now officially 10 years old
Typescript was my stepping stone into the world of Rust.

Even before Deno made it easy, it was straightforward enough to configure a simple tsconfig and just run tsc. Much like cargo, there is a lot to be said for "it just works" tooling - especially for beginners or even new programmers.

It is probably fair to say it is one of the most influential and impactful languages of all time. There's even the future possibility of much of its type syntax being absorbed back into JavaScript: https://github.com/tc39/proposal-type-annotations