mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-26 07:03:57 +00:00
add install instructions
This commit is contained in:
parent
b510eb9a10
commit
d95333b179
24
niva.md
24
niva.md
@ -6,16 +6,24 @@ contributors:
|
||||
---
|
||||
|
||||
## Intro
|
||||
Niva is a simple language that takes a lot of inspiration from Smalltalk.
|
||||
But leaning towards the functional side.
|
||||
Everything is still an object, but instead of classes, interfaces, and abstract classes, we have tagged unions,
|
||||
which is the only way to achieve polymorphism.
|
||||
Niva is a simple language that takes a lot of inspiration from Smalltalk.
|
||||
But leaning towards the functional side and static typed.
|
||||
Everything is still an object, but instead of classes, interfaces, inheritance, and abstract classes,
|
||||
we have tagged unions, which is the only way to achieve polymorphism.
|
||||
|
||||
So basically niva is types, unions, and methods for them. There are no functions.
|
||||
|
||||
On an imaginary graph of complexity, I would put it here:
|
||||
Go < Niva < Java < Kotlin < Scala
|
||||
For example, everything except the declaration is sending messages to objects.
|
||||
`1 + 2` is not a + operator, but a `... + Int` message for `Int` object.
|
||||
(ofc there are no extra costs for that)
|
||||
|
||||
C-like: `1.inc()`
|
||||
Niva: `1 inc`
|
||||
|
||||
So basically niva is types, unions, and methods for them.
|
||||
There are no functions.
|
||||
On an imaginary graph of complexity, I would put it here:
|
||||
Go < Niva < Java < Kotlin < Scala
|
||||
|
||||
Links:
|
||||
- [Site](https://gavr123456789.github.io/niva-site/reference.html)
|
||||
- [GitHub](https://github.com/gavr123456789/Niva)
|
||||
@ -34,7 +42,7 @@ cd Niva
|
||||
|
||||
#### Variable
|
||||
Variables are immutable by default.
|
||||
There is no keyword for declaring a variable.
|
||||
There is no special keyword for declaring a variable.
|
||||
|
||||
```Scala
|
||||
// this is a comment
|
||||
|
Loading…
Reference in New Issue
Block a user