C# was always better than Java as a language. The strength of Java is the ecosystem, and Java being open source and cross-platform from the beginning.
HN user
goto11
Yes, you must have individual constructors for the left and right cases in order to distinguish them. In C# you would use two distinct record types for this. Haskell’s syntax is more concise though, since you define the constructors inline in the declaration of the sum type.
You cant have a `type Foo = String | Strimg` in Haskell either.
Well it is a type union. The union of string and string is just string.
There is no "the interest of the people". There are lots of different people with different and often conflicting interests.
Half of his clever quotes are completely bonkers though and have been disproven by history. How many of you are proving your programs correct before entering them into the computer? Because that is the only correct way to program. And remember he disparaged Margaret Hamiltons software methodology. Sure, she helped put a man on the moon, but apparently she did it the wrong way.
I suspect geeks like Dijkstra because he is "edgy" more than because he is correct.
Also, Object-Oriented programming was actually invented in Norway, even though Alan Kay of Smalltalk fame tried to take credit.
He was right about GOTO though, but many developers did not even understand his argument but just read the headline and concluded "GOTO bad".
The GOTO-paper is widely misunderstood though. It is making a case for blocks and scopes and functions as structures which makes it easier to analyze and reason about the execution of complex programs. The case against unconstrained GOTO follows naturally from this since you can't have those structures in combination with unconstrained GOTO.
Sure, you can use parentheses everywhere, but the code would be quite noisy. Do you think this:
((window.location).href) == foo;
is more readable than: window.location.href == foo;Thank you for this additional context.
So in short, bitwise operators have lower precedence than comparisons to allow you to write:
if (a==b & c==d) ...
but of course, this means you can't write bitwise checks like this: if (addr & mask == 0) ...
The problem could theoretically have been solved when the shortcut operators were introduced, by increasing the precedence of & and | to be higher than comparisons, but have the shortcut operators be lower. So you would be able to write both: if (a==b && b==c) ...
if (addr & mask == 0) ...
But this was not done due to concerns of backward compatibility with existing code, since now every expression using the old pattern would subtly change semantics. E.g. the first example would now be parsed as: if ((a==(b & c))==d) ...I think it would be adopted exactly as widely as JavaScript is. People choose JavaScript because it is supported by the browser, not because they think it has a beautiful syntax. If some other language has been supported instead (whether VBScript or Scheme or whatever), people would use that.
Semantic markup languages were niche until the web happened. Objective-C was a weird niche language until the iPhone app boom. People learn the languages they need to learn.
Netscape had market dominance at the time so Internet Explorer had to keep bug-for-bug compatibility with Netscape to keep up. Given the amount of bugs and the lack of documentation of JS, this must have been quite frustrating for MS who was used to calling the shots.
Scheme would probably be the most hated language in the world.
Manage your time better.
Thank you for the advice which is no doubt well-intentioned.
But don't kid yourself. If you use your spare time for research and development to solve problems at work, then it is not really a hobby, it is just you working overtime for free. If that makes you happy, good for you, but it doesn't change the fact that time and resources are limited. The time is just cheaper in your case.
Are you perchance working in academia? Your suggestion seems to assume unlimited time and resources to write everything yourself, while the purpose of using third-party components usually is to save time and resources.
Identifying high-quality libraries and frameworks that meet your project needs
This is a really important skill that I find difficult and frustrating. Does anyone have good advice or resources?
But this is just computed gotos. There is no continuation passed.
Arguably the main point of continuation-passing style is that you pass a continuation along with the jump. Hence the name.
GOTO does not pass a continuation though, so I can't see how it is similar to continuation-passing style. GOTO is just a jump like jumps in machine code.
BASIC does not have notion of a continuation as a value.
"When I was younger, I looked at my great grandad's prisoner-of-war diaries and I just love everything about the period."
Is this some kind of understated British humor?
The Grimm Brothers didn't write the stories, they collected and published folktales. In any case they would have been been out of copyright since Jacob Grimm died in 1863.
Disney didn't mind paying for the rights if they wanted to use material still under copyright, like they did for Bambi or Dumbo or many others.
It is still type inference though. If 2 is an int, the compiler perform type inference to figure out that the expression 2 + 2 is also an int. It is just that traditional languages only use type inference for expressions, not declarations.
But that would only help you if you assign the numeric literal directly to a variable. If you use it in an expression like `foo(10)` or `10 * bar` you would still not see the numeric type specified.
So if you want the type to be always explicit, the type specifier should be coupled with the literal like `10[i32]` or similar, so you can write `foo(10[i32])`.
And digging a step deeper: Over-engineering often happen because you think you might need the complexity later, but it will be more difficult or risky to extend the system at a later time.
E.g. starting out with a microservice architecture even though you only have 100 users, because you think it will be too difficult to re-architect a monolith the day you hit a million user.
So you should address why it feels like the code becomes less malleable over time.
Collapsing margins was a sane default in the original use case of CSS - text documents with sections and headers. But it is not intuitive when working with GUI components.
Box office across all three of the sequel trilogy moves. The same is the case for the three movies in the original trilogy btw, so I guess we should conclude that "Return of the Jedi" was the only Star Wars was movie people actually liked, since The Force Awakens is one of the most successful movies of all time?
In reality, sequels tend to be less successful than the original, but can expect a certain audience. Since only very successful movies get sequels, sequels are still safer investments than original movies.
The general audience does not care about any of that though. Star Wars is beyond ridiculous in the first place - I mean how does "light-sabers" make any sense? What matters to the general audience is there are relatable characters doing cool stuff which feels plausible in the moment. The space ramming was cool and emotionally satisfying, so it works.
For most of the audience, if they know Luke at all, it is as the whiny kid with the bad haircut from the old movies. So its fun to see him as old and grumpy. They do not care if he is some kind of space-Jesus in the expanded universe or whatever.
A "deep betrayal to the universe" of Slave Leia, Jar-Jar Binks, C3PO?
Solo probably failed because the average cinema-goer does not want to see a Han Solo spin-off with Harrison Ford replaced by an unknown B-list actor.
many of them didn't bother watching the next one.
The third movie was still one of the most successful movies of all time.
Quality is of course subjective, but I'm questioning whether the audience scores on RT represent what the audience actually thought. Given how easy it is to game scores on such sites by review bombing, I'd take box office as a more reliable indicator or how real-world audiences actually liked the film.
Marketing can boost ticket sales, but there are plenty of examples of movies which flopped despite heavy marketing, just because the audiences didn't like the movie that much.
The ratings on RT and IMDB does not represent the average audience member.
The Last Jedi was incredibly successful. According to Wikipedia is "the highest-grossing film of 2017 and the ninth-highest-grossing film of all time." I have a hard time believing an audience score of 41% accurately reflects the opinions of the actual audience.
RT ratings are weird because they don't reflect how much critics liked a movie, only whether they rated it "positive" or "negative". The movie with the highest rating ever is Paddington 2 - not because any reviewers thought it was the best movie ever, but because nobody hated it. It ranks higher than Citizen Kane, despite many reviewers literally calling that the best movie ever - but at least one reviewer didn't like it. So RT ratings favors inoffensive and uncontroversial movies appealing to the largest possible demographics.
And shows are often reviewed after only a few episodes. Typically two to four episodes are released to reviewers before the premiere, and this is what the review is based on.
So a high rating means most reviewers reacted positively to the first few episodes.