# Languages

There are six "tiers" of langauges recognized by Budgie:

1. [Unknown](/languages.md#unknown)
2. [Unsupported](/languages.md#unsupported)
3. [Best Guess](https://docs.budgielang.org/pages/-Ls5JvhO_7SLXfNpRNi4#best%20guess)
4. [Output Only](https://docs.budgielang.org/pages/-Ls5JvhO_7SLXfNpRNi4#output%20only)
5. [Partial Input](https://docs.budgielang.org/pages/-Ls5JvhO_7SLXfNpRNi4#partial%20input)
6. [Full](/languages.md#full)

## Unknown

These languages each need to be investigated and assigned a higher tier.

| Language     | Issue                                                   |
| ------------ | ------------------------------------------------------- |
| D            | [#361](https://github.com/budgielang/budgie/issues/361) |
| emojicode    | [#429](https://github.com/budgielang/budgie/issues/429) |
| Groovy       | [#454](https://github.com/budgielang/budgie/issues/454) |
| Haxe         | [#247](https://github.com/budgielang/budgie/issues/247) |
| Kotlin       | [#453](https://github.com/budgielang/budgie/issues/453) |
| LLVM         | [#381](https://github.com/budgielang/budgie/issues/381) |
| LOLCODE      | [#267](https://github.com/budgielang/budgie/issues/267) |
| Objective C  | [#191](https://github.com/budgielang/budgie/issues/191) |
| Powershell   | [#103](https://github.com/budgielang/budgie/issues/103) |
| sh           | [#436](https://github.com/budgielang/budgie/issues/436) |
| Swift        | [#105](https://github.com/budgielang/budgie/issues/105) |
| Visual Basic | [#439](https://github.com/budgielang/budgie/issues/439) |

## Unsupported

Some languages will never be able to be accurately compiled to by Budgie because of severe structural abnormalities in the language's design. They are so different from the norm that any attempt to output them from Budgie would be horrendously overcomplicated and inaccurate.

These languages will never be output by Budgie for the following major reasons *(among others)*:

| Language | Unusual Arrays                                       | Unusual Classes | Unusual Returns |
| -------- | ---------------------------------------------------- | --------------- | --------------- |
| C        |                                                      | ✓               |                 |
| Go       |                                                      | ✓               |                 |
| Matlab   |                                                      |                 | ✓               |
| PHP      | [✓](https://github.com/budgielang/budgie/issues/102) |                 |                 |

## Best Guess

Some languages will never be able to be accurately compiled to by Budgie, but the compiler can roughly come close.

These languages will never be guaranteed accurate Budgie output for the following common reasons *(among others)*:

| Language | Manual Pointers |
| -------- | --------------- |
| C++      | ✓               |

### Why Try?

There are still some cases where it may be useful to have near-working output in an unsupported language. For example, when using Budgie for snippets of code as sample answer guidelines to coding interview questions, it's not necessary for the result to be provably correct.

> Again: Budgie gives no guarantee of code working in these languages. They will almost certainly fail at more than a few lines.

## Output Only

| Language   |
| ---------- |
| JavaScript |
| Ruby       |
| Python     |

These languages can be fully output by Budgie but don't provide rich enough type information in their syntax to be statically converted to Budgie.

## Partial Input

| Language   | Compiler                                             | `int` vs `double` |
| ---------- | ---------------------------------------------------- | ----------------- |
| TypeScript | [TS-Budgie](https://github.com/budgielang/TS-Budgie) | *Missing*         |

These languages may be generally compiled from their native source code to Budgie with a "best guess" approximation of the equivalent Budgie code. They must have some kind of gradual or even static typing, but are not required to fully support differences between all Budgie types.

## Full

| Language | Compiler                                             |
| -------- | ---------------------------------------------------- |
| C#       | [CS-Budgie](https://github.com/budgielang/CS-Budgie) |
| Java     | *(not started)*                                      |

These languages are capable of being compiled from their native source code to Budgie and then back out to any supported language.

In order for a language to be fully supported, it must:

* Completely support static typings via a programmable AST.
* Recognize differences between all Budgie types, including:
  * `char` vs. `string`
  * `int` vs. `double`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.budgielang.org/languages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
