Drop the "Async" naming convention for YieldFunctions

Problem
I’ve noticed that new functions often have “Async” tagged on the end. From the little I’ve heard, this was added by the client team to make it easy to tell the difference between functions that yield and don’t yield. However, I think it is verbose and confuses younger developers who are new to scripting, as well as making code longer and less readable. It’s equivalent to naming your function based on what it returns, e.g. Instance:VoidClearAllChildren().

ds:Set("foo", { 1,2, x=3 }) print(ds:Get("foo")[1])
vs.

ds:SetAsync("foo", { 1,2, x=3 }) print(ds:GetAsync("foo")[1])

If the argument for “Async” is to make it obvious methods are YieldFunctions, the problem is that 90% of existing YieldFunctions don’t have Async appended on their names.

To gain consistency here, we would need to either deprecate all existing YieldFunctions and make new versions without the Async suffix. This is obviously a ridiculous task, so what we’ve ended up is a “mixed” system where a handful of our newer functions have “Async” on the end, and the rest don’t.

This makes the Lua API even more confusing to newcomers - there’s no consistency. If a developer is using a function and it doesn’t have an Async suffix, the developer has to go to the wiki to figure out if it’s a YieldFunction or not.

Suggestion:
Instead of tacking it on the end of the name, studio should have a special icon (

) for YieldFunctions in autocomplete. The icon could also be used on the wiki instead of having a separate section for YieldFunctions, we could simply display the icons.

EDIT: For reference, here’s a list of all the functions that use the Async naming convention (from Anaminus’ API)

The Icon is a good idea. When did they add the “Async”? I have not noticed it yet.

The only thing I have against a new icon is that I can’t figure out where the object browser icons are in the studio executable, but that’s just me.

The only issue I have with this is the resulting break in functionality for any games already using methods ending in Async. Would those methods become aliases of the new ones, so that stuff doesn’t break?

Deprecate SetAsync

Add Set

Even Anaminus finds it baffling.

zeuxcg, sim0nsays, any updates on this?

I agree, having unnecessary words some users don’t understand (including me, I had to look it up) on the end of function names can be confusing.

However, how will this change work? Will the old functions still work as expected? It will make the APIs more bloated to have multiple functions that do the same thing in them.

The naming convention has always upset me greatly, I’ve never understood the need to write Async, to be totally honest, if it’s returning a value I’d expect it to run asynchronously. Doesn’t seem like a smart idea to run a method and have it return a value after it’s needed. When I first saw it, I wasn’t sure what to make of it, especially with HTTPService, I didn’t understand why it wasn’t just Get and Post.

It’s hard for me to agree because in other dev environments marking things as “async” is so important. However, you make a good argument that many younger developers would be/are confused with the terminology. I think the ‘Async’ on the DataStore methods kinda makes sense though, since it is asynchronous to the global store itself, however, it still yields, which makes the name confusing again.

I like the idea of the little clock/timer next to the method.