-
Notifications
You must be signed in to change notification settings - Fork 55
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
Main function is not generated #73
Comments
BTW do you guys trying to target vanilla js or node.js? |
This is by design. Unlike other programming languages, Ć is not meant for writing full programs, but only components/libraries easily usable from other programming languages. See some projects in Ć. As for the other question, the goal is to target both. As of now there's just one built-in: |
Cito to be recognized as an official language has to have a main function otherwise it's a joust library transpiler. Can you reopen this issue because I think it's an easy fix... check if the function signature matches the main function... Create some code in the output. Im considering to create pull request for this to fix it my self. |
Yes, it's a library transpiler. Why bother with transpiling if you compile to an exe in the end? |
I don't understand your logic on why this feature is not necessary. I would like to create complete programs with cito not joust libraries to be used somewhere else. |
I understand that you ask for is an ability to:
I would rather write the whole program in C or C# instead. I don't see how Ć would add any value as a transpiler to whole programs? |
I still don't understand your logic... In cito source file... If user writes main function why wouldn't cito create main function in transpiled output? If user doesn't write main function then cito will not create main function... I don't see what is the problem here? |
Technically this should be rather easy. It could be very useful for people experimenting with Ć. I'll probably add it. |
Also, it enables a simple testing system with no extra dependencies: public static class Foo
{
public static int Add(int x, int y) => x + y;
public static void Main()
{
assert Add(1, 2) == 3;
assert Add(5, 7) == 12;
}
} |
What do you want to do now? Should this issue be closed? You closed my issue! |
This is in queue. There are several tasks of higher priority. |
Isn't the very trick you tell me could be used? So this is no longer a problem and you seem also not interested in finding a solution. As there is already workaround and adding support for |
This is implemented now. See the documentation. |
For the following languages, main function does not exists: c, cpp, python, js, ts.
For python the docs are correct.
SOURCE
c
cpp
js
Expected result should be to call MainP.main function after definition.
python
Expected result should be
ts
Expected result should be the same as with js.
The text was updated successfully, but these errors were encountered: