Update Examples
parent
67fc39ddef
commit
46243a69fc
56
Examples.md
56
Examples.md
@ -33,7 +33,6 @@ fn main
|
||||
(Skipping for now because we likely want "f-strings" in Husht, which require some thought/design.)
|
||||
|
||||
### Primitives
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Rust</th>
|
||||
@ -95,11 +94,9 @@ fn main
|
||||
</td></tr></table>
|
||||
|
||||
#### Literals and operators
|
||||
|
||||
Not really anything new in this subsection.
|
||||
|
||||
#### Tuples
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Rust</th>
|
||||
@ -185,13 +182,11 @@ fn main()
|
||||
</td></tr></table>
|
||||
|
||||
#### Arrays and slices
|
||||
|
||||
Not really anything new in this subsection; we don't currently expect that Husht will make material changes in array/slice declaration or indexing.
|
||||
|
||||
### Custom Types
|
||||
|
||||
#### Structures
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Rust</th>
|
||||
@ -325,7 +320,6 @@ fn main()
|
||||
</td></tr></table>
|
||||
|
||||
#### Enums
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Rust</th>
|
||||
@ -418,3 +412,53 @@ fn main()
|
||||
|
||||
```
|
||||
</td></tr></table>
|
||||
|
||||
##### linked list
|
||||
<table>
|
||||
<tr>
|
||||
<th>Rust</th>
|
||||
<th>Husht</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
```
|
||||
```
|
||||
</td><td>
|
||||
|
||||
```
|
||||
```
|
||||
</td></tr></table>
|
||||
|
||||
#### Constants
|
||||
Not really anything new in this section.
|
||||
|
||||
### Variable Bindings
|
||||
Not really anything new here.
|
||||
|
||||
#### Mutability
|
||||
Or here.
|
||||
|
||||
#### Scope and shadowing
|
||||
<table>
|
||||
<tr>
|
||||
<th>Rust</th>
|
||||
<th>Husht</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
```
|
||||
```
|
||||
</td><td>
|
||||
|
||||
```
|
||||
```
|
||||
</td></tr></table>
|
||||
|
||||
#### Declare first
|
||||
Nothing here.
|
||||
|
||||
#### Freezing
|
||||
Or here.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user