Fantom
| Fantom | |
|---|---|
| Paradigma | |
| Surgido em | abril de 2008 (18 anos)[2] |
| Última versão | 1.0.82 (26 de junho de 2025[3]) |
| Criado por | Brian Frank e Andy Frank[4] |
| Estilo de tipagem | Estática e Dinâmica[1] |
| Influenciada por | |
| Licença | Academic Free License 3.0[7] |
| Extensão do arquivo |
|
| Página oficial | fantom |
Fantom, conhecida anteriormente como Fan,[8] é uma linguagem de programação orientada a objeto, que pode ser usada para criar programas para JavaScript, Plataforma Java (JVM), e Plataforma .NET (CLI).[1] A linguagem suporta programação funcional, desde closures até concorrência usando o modelo Actor. A linguagem possui tipagens estática e dinâmica, e usa chaves para delimitar blocos de código.[9]
Exemplos
Programa Olá Mundo
class HelloWorld
{
static Void main()
{
echo("Olá, Mundo!")
}
}
Algoritmo de Trabb Pardo-Knuth
class Tpk
{
static Float f(Float t)
{
return t.abs.sqrt + 5f * t.pow(3f)
}
static Void main()
{
a := (0..10).map { Env.cur.in.readLine?.toFloat ?: 0f }
a.eachr |t, i|
{
y := f(t)
echo(y > 400f ? "$i TOO LARGE" : "$i $y")
}
}
}
Ver também
Referências
- ↑ a b c d «Why Fantom» (em inglês). Consultado em 16 de setembro de 2010
- ↑ «Three year history of Fan» (em inglês). Consultado em 16 de setembro de 2010
- ↑ «Build 1.0.82» (em inglês). fantom.org. 26 de junho de 2025. Consultado em 30 de outubro de 2025
- ↑ «Hello World» (em inglês). Consultado em 16 de setembro de 2010
- ↑ a b c d e Brian Frank (5 de dezembro de 2005). «Manifesto» (em inglês). fantom.org. Consultado em 10 de novembro de 2011
- ↑ Brian Frank (22 de julho de 2009). «Fan vs Scala: Different Trade-offs» (em inglês). fantom.org. Consultado em 10 de novembro de 2011
- ↑ «License» (em inglês). fantom.org. 1 de setembro de 2011. Consultado em 11 de novembro de 2011
- ↑ «Fan is officially now Fantom» (em inglês). Consultado em 16 de setembro de 2010
- ↑ «Tour» (em inglês). Consultado em 16 de setembro de 2010
- ↑ «Conventions» (em inglês). Consultado em 16 de setembro de 2010
Ligações externas
- «Página oficial» (em inglês)
- Fantom no GitHub
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.