dplassgit / d2lang

D2 is a strongly-typed, statically-typed, (mostly) inferred-type compiled language.
MIT License
6 stars 0 forks source link

Allow arrays (locals & globals) to be declared but not allocated #358

Closed dplassgit closed 2 weeks ago

dplassgit commented 2 weeks ago

E.g.,

f:proc(a:int[]) {
  b:int[]
  b=a
  println b[0]
}

The declaration of local b is not allowed. Which is ironic and inconsistent, because the declaration of parameter a is...