-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The JS bot.Room.find()
API does not fit for Java
#4
Comments
The We have a blog to record this process and some memorable information at https://blog.chatie.io/blessed-twins-bot/ Please read it first, and I'll go to dive into some Java design patterns first, then come back to you later and continue discussing under this issue. |
In java the code like bot.Room.find() cannot pass the code check tools just like: so I think this is not a graceful api for java。 |
If not |
LGTM |
However, I still feel it will be more natural if we can use What If I have a Java class like the following presudo code: class Bot {
Room Room;
public Bot() {
this.Room = Room;
}
}
bot = new Bot()
bot.Room.xxx() What problem do they have in the Java language? |
that code confuse Class and Object. Room Room; first so this is different Room.find(xxx) which one is a Class. so that is impossible for java |
Yes, I understand. A What if we use Kotlin: does Kotlin support that? I guess it can because it can be fully integrated with JavaScript? |
Our target is a Java sdk, we just use kotiln to develop a java sdk. |
You are right. The end-user will use it in the Java language environment. So I will not persist the The |
bot.Room.find()
API does not fit for Java
我觉得此处的ROOM更应该是ROOMUtil |
In java,
A static field or method should be directly referred to by its class name instead of its corresponding object name.
so
is not suitable for java api
so I suggest use like
the same as contact
The text was updated successfully, but these errors were encountered: