Comment by DonHopkins

Comment by DonHopkins a day ago

5 replies

If you like TypeScript and C#, then you'll probably also like Delphi and Turbo Pascal!

They were all written by the same guy, Anders Hejlsberg:

https://en.wikipedia.org/wiki/Anders_Hejlsberg

https://news.ycombinator.com/item?id=19568681

"My favorite is always the billion dollar mistake of having null in the language. And since JavaScript has both null and undefined, it's the two billion dollar mistake." -Anders Hejlsberg

"It is by far the most problematic part of language design. And it's a single value that -- ha ha ha ha -- that if only that wasn't there, imagine all the problems we wouldn't have, right? If type systems were designed that way. And some type systems are, and some type systems are getting there, but boy, trying to retrofit that on top of a type system that has null in the first place is quite an undertaking." -Anders Hejlsberg

dotancohen a day ago

  > "My favorite is always the billion dollar mistake of having null in the language. And since JavaScript has both null and undefined, it's the two billion dollar mistake."
  > -Anders Hejlsberg
Why can't all-1s be null? E.g. a small int goes from the range 0-255 to the range 0-254, but we get a really useful property with no out-of-band Nullable overhead.

With signed ints it even leads to symmetric ranges in the negative and positive directions.

  • DonHopkins 20 hours ago

    The FORTH-83 standard changed FIG-FORTH's official value of TRUE from 1 to -1 so all its bits were set. That was a rough transition like Python 2=>3, but worth it. It also defined /MOD integer division to be floored (rounded towards -infinity instead of zero like FIG-FORTH), which was also a tough change but the right one, especially for graphics.

    https://python-history.blogspot.com/2010/08/why-pythons-inte...

    https://forth-standard.org/standard/diff?utm_source=chatgpt....

    https://atariwiki.org/wiki/Wiki.jsp?page=Converting+FIG-Fort...

    >4. For various reasons the definition of all divide functions general effect is that quotients are floored instead of rounded toward zero. This should cause no problems for most pre-existing application software. The new divide functions are marginally slower than the old (a few machine cycles under most circumstances). The side-effects of the redefinition for floored divide can be counter-intuitive under some circumstances. For example, in FIG-Forth the operation

          -40 360 MOD
    
    >would return the obvious answer (-40) on the stack, while 83- Standard Forth will return the answer 320!

    >5. The true flag returned by all logical operations has been changed from the value 1 (in FIG-Forth) to the value -1 (in Forth-83, all bits set). If your code used the 0 or 1 returned by a comparison in an arithmetic operation, you will need to interpolate the operator ABS after the logical operator. This is a particularly difficult problem to look for in your source code. However, we feel that this mutation in the 83-Standard was beneficial as it allows the returned true/false value to be used as a mask for AND.

    • dotancohen 9 hours ago

      Hello Don!

      I always suspected that FORTH had inconsistencies in division across versions. That's why the lord told us to Go FORTH and Multiply instead.

oldsecondhand a day ago

Delphi has been dead for 10+ years. Nobody uses it except for a few legacy applications and licenses cost $1200+.

  • DonHopkins 20 hours ago

    You're kind of missing the point. Turbo Pascal has been dead for a lot longer. Or is it?

    The point is that TypeScript and C# are extremely similar for a good reason, not a coincidence, and that Anders Hejlsberg knows what the fuck he's doing and talking about, and has been implementing amazing groundbreaking well designed languages and IDEs for a very long time. Turbo Pascal was so great it flummoxed Bill Gates, so Microsoft sent a limo to recruit and hire Anders Hejlsberg from Borland, then he made Visual J++, Windows Foundation Classes, C#, and TypeScript.

    https://en.wikipedia.org/wiki/Turbo_Pascal

    >Scott MacGregor of Microsoft said that Bill Gates "couldn't understand why our stuff was so slow" compared to Turbo Pascal. "He would bring in poor Greg Whitten [programming director of Microsoft languages] and yell at him for half an hour" because their company was unable to defeat Kahn's small startup, MacGregor recalled.

    https://news.ycombinator.com/item?id=8664370

    >"According to the suit, Microsoft also offered Mr. Hejlsberg a $1.5 million signing bonus, a base salary of $150,000 to $200,000 and options for 75,000 shares of Microsoft stock. After Borland's counteroffer last October, Microsoft offered another $1.5 million bonus, the complaint says."