Live data from Hacker News

Anders Hejlsberg on Modern Compiler Construction (2016) [video]

youtube.com

41–45 of 45 posts

Re: Anders Hejlsberg on Modern Compiler Construction (2016) [video]

#41
post #24

There's so much that's great about C#, and that results from really smart, pragmatic, forward-looking language design, that I find it surprising how many aspects of C# development are hampered by really bad design. Specifically, the backwards compatibility story of the standard library is a mess (all the different .NET Framework versions, or wait, do I mean .NET Standard, or WinRT, or...?) and the package manager (Nu…

Every time I hear someone say that C# is a well designed language I think of the story of how they had to hack the compiler to get async/await to work, and how F# implemented the same feature as a library. I guess there are different levels of "well designed".

Can anyone clarify who _invented_ async/await? I thought it was Anders and his group ... perhaps not?

Re: Anders Hejlsberg on Modern Compiler Construction (2016) [video]

#42
post #8
post #3

Original author of Turbo Pascal, chief architect of Delphi, lead architect of C#, creator of TypeScript. Does anyone else in language design have as many accolades as this or designed languages on which trillions of dollars of commerce depend?

Martin Odersky, created Turbo Modula-2 for Borland, member of the Pizza language whose design lead to Java generics implementation, designer of the Scala language. Erik Meyer, member of GHC design team and Haskell community, responsible for LINQ design bringing FP to the masses, reactive extensions in .NET which lead to the RX model adopted by Netflix, nowadays contributing back to Haskell at FB (if I am not mistaken…

Meijer also worked on Hack, Dart and others.

Re: Anders Hejlsberg on Modern Compiler Construction (2016) [video]

#43

Earlier quoted context omitted.

Of course this would not work. typeof(true) is of type 'Boolean' and typeof(1) is of type 'number'. Do they compare to the same type? Nope, therefore is false in both cases. Try the following: let foo = true; true === foo === true; // returns true.

er - no. Assuming you are not trolling (benefit of the doubt and all that): You might mean it shouldn't work? but alas it does (because of 'lopsided equality tables'). Try the following: open the console of your browser, type the following: true == 1 === true and press enter - tada! You can also check out this SO answer if you are sufficiently flabbergasted: https://stackoverflow.com/a/12236341

I'm not sure how what you linked is related, but the only "surprising" thing here is probably `true == 1`. This evaluates to true, and because comparisons are left-associative, we have `(true == 1) === true` which reduces to `true === true`, which, unsurprisingly, is true.

Re: Anders Hejlsberg on Modern Compiler Construction (2016) [video]

#44
post #12

Earlier quoted context omitted.

Looks great! Do you know if this is (or maybe some other course) more project based approach, where at the end of the course you have e.g. SQLite-ish ACID compliant system completed?

I know for the advanced database course the students end up writing a new feature for an existing database called Peloton, which is a research project at CMU[0]. You obviously aren't writing the whole thing from scratch though. [0]: https://github.com/cmu-db/peloton

The non-advanced one - intro, seems like a good fit - and you also get to implement a custom storage for SQLite.

Re: Anders Hejlsberg on Modern Compiler Construction (2016) [video]

#45
post #43

Earlier quoted context omitted.

er - no. Assuming you are not trolling (benefit of the doubt and all that): You might mean it shouldn't work? but alas it does (because of 'lopsided equality tables'). Try the following: open the console of your browser, type the following: true == 1 === true and press enter - tada! You can also check out this SO answer if you are sufficiently flabbergasted: https://stackoverflow.com/a/12236341

I'm not sure how what you linked is related, but the only "surprising" thing here is probably `true == 1`. This evaluates to true, and because comparisons are left-associative, we have `(true == 1) === true` which reduces to `true === true`, which, unsurprisingly, is true.

Agree. It was my point. `true 0== 1` resolves to true, but shouldn't so `true == 1 === true` should be false but is true, which could at the very least be called ambiguous to people not familiar with the language. It may reflect somewhat badly on Brendan since they felt compelled to introduce === to rectify this. Personally I think it made the language richer, with more options to chose from depending on circumstance, and it was more like an adaption to the new uses for js.
Post reply on HN