Hacker News .hnnew | past | comments | ask | show | jobs | submit | xigoi's commentslogin

Also, the 1.1M limit is because of UTF-16. If UTF-16 was deprecated in favor of UTF-8, the limit could be much higher.

In Rust, if you have a function containing an unsafe block, you do not need to use another unsafe block to call the function. Therefore, unsafe is not “contagious” like JavaScript’s async.

> you do not need to use another unsafe block to call the function

And in C#, you can just type `await` and call an async function from a sync function.

Calling unsafe requires an unsafe block from safe functions. That's essentially the same thing as async/await in many languages (Rust does things differently, of course, but that's even worse in my opinion).


> And in C#, you can just type `await` and call an async function from a sync function.

Yes, but not in JavaScript.


They wrote a blog post about code that they have not even tried running. Whether it’s LLM-generated does not matter.

Bare HTML is pretty bad for accessibility. For example, you get no maximum width, making websites painful to read in a wide window.

Windows are resizable. Built-in width selection!

You can’t set a different size per site. More width is better for sites that have sidebars and stuff.

This is the result of anthropomorphizing LLMs. People are thinking “I am giving instructions to a human” and not “I am giving instructions to a computer”.

Humans get phished all the time. The two generals problem predates LLMs.

Why is “hairstyles” written in uppercase? Do we now have clickbait on HN?

? Its just how it formatted as copy and paste

> Please don't do things to make titles stand out, like using uppercase or exclamation points, or saying how great an article is.

https://hackernews.hn/newsguidelines.html


1. racial bias, 2. yeah, all the time.

> I will still curse the C designers to my dying day for picking * as the prefix operator for dereference pointer, when the more logical @ character was SITTING RIGHT THERE!

And what’s worse, many other languages copied this decision without understanding why it was made and why it’s completely nonsensical for modern languages.


Objective-C for the win!!

(They use @ for marking keywords)


I hate the trend of measuring “easy to understand” based on how superficially similar the language is to C/Java.

> I think operator overloading would be a very bad feature for an enterprise language like Java which needs to be consistent above all else.

Operator overloading increases consistency. Instead of having

  int a = b + c;
  CustomNumberType x = y.add(z);
you have

  int a = b + c;
  CustomNumberType x = y + z;

Yeah it's bad when it's abused, so don't abuse it.

But not having operator overloading when dealing with vectors is maddening.


The problem with operator overloading is it makes things confusing when mixing types and let's programmers write confusing code.

    Person x;
    Job y;
    CustomType z = x + y;
WTF is Z?

Is the argument, anyway, I support operator overloading.


Java’s planned approach is more like typeclass-style interfaces than unrestricted operator overloading. Types opt into core-defined operator contracts, rather than every library inventing arbitrary meanings for symbols.

> WTF is Z?

Hopefully a type error, because no sane programmer would implement addition like this. Obviously an insane programmer could, but that’s not the fault of operator overloading. The following code is exactly as confusing:

    Person x;
    Job y;
    CustomType z = add(x, y);

I don't know; you can bit shift an output stream by a string (or char array) in C++ (std::cout << "Hello, world!"). That seems pretty mad to me.

Are you trying to imply that Bjarne Stroustrup is a sane programmer?

> WTF is Z?

Take a person, add a job, you get an Employee or EmployedPerson. Person.add(job).

I agree overloading can create footguns, but domain concepts should make a lot of sense in context when basic arithmetic operations are performed on them. Party = Meeting + Booze.

Custom operators are a big assistance for DSLs, and overloading can also aide their creation and elegance. Part of the “awesome but don’t be a jerk about it” toolbox.


It’s probably aimed at React developers, many of which are probably not even aware that elements other than <div> exist.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: