News for hackers. Stuff that matters.
Re:Ruby Methods Are Colorless by wiseowise on Wednesday July 24, 2024 @05:33AM (#41055213)
> And, it absolutely should not require creating two identical function definitions to get around the function coloring problem - that's completely indefensible.

Where do you see insanity like this?

Re:Ruby Methods Are Colorless by vips7L on Wednesday July 24, 2024 @10:00AM (#41057217)
Everywhere in the C# ecosystem. You’ll see things like x.Read() and x.ReadAsync().
Re:Ruby Methods Are Colorless by lolinder on Wednesday July 24, 2024 @10:10AM (#41057306)
That sounds more like a legacy problem than a problem with the async/await model in the abstract.

If you were designing a language from the ground up, why would you implement a synchronous read operation? I would just assume that all code written in the language will treat async the way that Haskell programmers treat IO and make all IO operations async no matter what.

Re:Ruby Methods Are Colorless by vips7L on Wednesday July 24, 2024 @10:43AM (#41057613)
There’s lot of programming models that don’t require async or it’s complexity. Not everything is a web server that needs to serve 100k requests.
Re:Ruby Methods Are Colorless by neonsunset on Wednesday July 24, 2024 @11:37AM (#41058151)
Because Read and ReadAsync are usually meaningfully different. There is nothing wrong with that.

See https://news.ycombinator.com/item?id=41055328

This bifurcation is mostly a concern for the standard library. It’s not something you do this way in your regular application code.

Re:Ruby Methods Are Colorless by dragonwriter on Wednesday July 24, 2024 @11:02AM (#41057809)
Everywhere that hard function coloring exists where the language also supports synchronous calls that do the same thing (JS doesn't support sunchronous calls for lots of things and has only soft function coloring since async is sugar for Promises, so it has two reasons why that doesn't need to happen.)