Skip to content

Commit f267b53

Browse files
committed
upd
1 parent 34f49cd commit f267b53

5 files changed

Lines changed: 15 additions & 11 deletions

File tree

TODO

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
- [ ] String literal
4545
- [ ] Is applicable to enumerations (also check for union)
4646
- [ ] XML expression
47-
- [ ] XML tags applied as WhackDS nodes: The prefix, if any, will ignore anything that is not a namespace or package import (even if it is `*`; in that case, if the user needs, they can use interpolation for specifying the tag's type).
47+
- [ ] XML literals applied as `XML`/`XMLList` shall resolve namespace prefixes to lexical ShockScript names. (`namespace` definitions may be used as prefixes as well (definition name = URI); with implicit prefix.)
4848
- [ ] Null literal
4949
- [ ] Array literal
5050
- [ ] Is applicable to flag enumerations
@@ -63,6 +63,7 @@
6363
- [ ] Call operator
6464
- [ ] Base is passed *followedByCall=true*
6565
- [ ] Watch for static `sx_proxy::call` when calling classes (supports multiple signatures too)
66+
- [ ] Take in consideration compatible overrides and overloads (also important for the `[object Object].equals()` method)
6667
- [ ] `XML` and `XMLList` being called statically shall still pass themselves as the context type to the first call argument, even if they define `sx_proxy::call()`.
6768
- [ ] `v as T` operator
6869
- [ ] Passes context type `T` to `v`
@@ -114,7 +115,7 @@
114115
- [ ] required `next():{ done: Boolean, value?: T }`
115116
- [ ] `length():int`
116117
- [ ] `skip(count:int):void`
117-
- [ ] `sx_proxy::filter(...)`
118+
- [ ] `sx_proxy::filter(...)` (returns another iterator)
118119
- [ ] Other functional methods
119120
- [ ] Iterable.\<K, V> (interface) requires keys() and values()
120121
- [ ] Generator.\<T>
@@ -125,8 +126,9 @@
125126
- [ ] Reflect::class()
126127
- [ ] clone() returns `this`
127128
- Default implementation clones most objects fine (records, tuples, arrays, maps and so on), but classes with a required constructor will require a custom clone() override.
128-
- [ ] `equals(obj:*):Boolean`
129+
- [ ] `equals(obj:this):Boolean`
129130
- May be used in addition to reference equality (==, ===). Default object behavior is ===.
131+
- Incompatible operands should use the most compatible base `.equals()` method (call operator specific behavior)
130132
- Floating points should have an `equals()` implementation done like in React.js's memoization/state new value comparison.
131133
- [ ] `Map.equals()` should look structurally using inner `.equals()`
132134
- [ ] Array too

src/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ShockScript is a strongly typed, multi-paradigm scripting language.
66
77
## eXtensible Markup Language
88

9-
ShockScript incorporates eXtensible Markup Language (XML) expressions suitable for implementing GUIs, and also includes capabilities for users interested on XML data processing.
9+
ShockScript incorporates eXtensible Markup Language (XML) expressions suitable for implementing User Interfaces (UI), and also includes capabilities for users interested on XML data processing.
1010

1111
For the Whack Engine, XML expressions create WhackDS nodes by default.
1212

src/overview/relation/mxml.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The following demonstrates a basic UI component implemented in WhackDS:
77
```
88
package com.business.components {
99
//
10-
public function AppBar() {
10+
public function AppBar():whack.ds.Node {
1111
return (
1212
<w:HGroup>
1313
<w:Button click&={trace("clicked!")}>button 1</w:Button>

src/overview/relation/reactjs.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ Unlike React.js, in WhackDS there is no risk of accessing an outdated state's va
6666
```
6767
package com.business.components {
6868
//
69-
public function HelloWorld() {
69+
public function HelloWorld():whack.ds.Node {
70+
// x
7071
[State]
71-
var x:decimal = 0;
72+
var x:Number = 0;
7273
74+
// layout
7375
return (
7476
<w:VGroup>
7577
<w:Label>clicked {x} times</w:Label>
@@ -101,7 +103,7 @@ In WhackDS the concept of "refs" is called *bindables*.
101103
```
102104
package com.business.components {
103105
//
104-
public function HelloWorld() {
106+
public function HelloWorld():whack.ds.Node {
105107
[Bindable]
106108
var button:Button?;
107109
@@ -122,7 +124,7 @@ package com.business.components {
122124
Context usage is represented as `whack.ds.ContextValue.<T>` objects, although they are used as natural `Context`-annotated locals.
123125

124126
```
125-
function ExampleComponent() {
127+
function ExampleComponent():whack.ds.Node {
126128
//
127129
[Context(ExampleContext)]
128130
const example:Number;

src/overview/xml-capabilities.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ The ShockScript language includes XML capabilities.
44

55
## XML expressions
66

7-
XML expressions by default are used for creating implementation-defined objects; however, when the inference type is `String`, `XML` or `XMLList`, XML expressions evaluate to one of these types.
7+
XML expressions by default are used for creating implementation-defined objects; however, when the inference type is `XML` or `XMLList`, XML expressions evaluate to one of these types.
88

99
```
1010
package com.business.components {
1111
//
12-
public function AppBar() {
12+
public function AppBar():whack.ds.Node {
1313
return (
1414
<w:HGroup>
1515
<w:Button click&={trace("clicked!")}>button 1</w:Button>

0 commit comments

Comments
 (0)