You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a problem when trying to assign array by value to any variable after initialization. I prepared code sample to demonstrate my issue. To my knowledge every case should work exactly the same. What am I missing here?
#!/usr/bin/env bashsource"$(cd"${BASH_SOURCE[0]%/*}"&&pwd)/lib/oo-bootstrap.sh"
import util/log
import util/class
class:MyIssue() {
public string someMessage
public array someMessageLines
MyIssue.someStuff() {
array someMessageLines="$(this someMessage toArray)"$var:someMessageLines
if [[ $($var:someMessageLines length)!= 0 ]];thenecho'This stuff worked ';fi
}
MyIssue.someStufff() {
array someMessageLines
$var:someMessageLines="$(this someMessage toArray)"$var:someMessageLines
if [[ $($var:someMessageLines length)!= 0 ]];thenecho'This stufff worked ';fi
}
MyIssue.someStuffff() {
this someMessageLines="$(this someMessage toArray)"
this someMessageLines
if [[ $(this someMessageLines length)!= 0 ]];thenecho'This stuffff worked ';fi
}
}
Type::Initialize MyIssue
MyIssue my
$var:my someMessage = 'automaticerrorhandlingwithexceptions'$var:my someStuff
echo'----------------'$var:my someStufff
echo'----------------'$var:my someStuffff
The text was updated successfully, but these errors were encountered:
Hmm, reassigning arrays seems unsupported, but you can mutate the variables instead. Unfortunately I don't have the time now to add the support. We might be simplifying the codebase a lot too, see #45.
If I might suggest any direction of #45, please focus first on data structures. Most used feature of all languages (and frameworks) is array/sets manipulation. Any project success is measured by coparing effort to savings ratio. If robust and easy(ier) data manipulation is not present as key feature, then any framework is but a gimmick. Also making data manipulation priority framework is setting toward stable long-term-support path acquiring bigger and more stable community.
There is a problem when trying to assign array by value to any variable after initialization. I prepared code sample to demonstrate my issue. To my knowledge every case should work exactly the same. What am I missing here?
The text was updated successfully, but these errors were encountered: