|
|
|
|
|
by timclark
5318 days ago
|
|
Shouldn't that be as simple as func bar() [10]foo with var a [8]foo = bar giving an error like cannot use bar() (type [10]foo) as type [8]foo in assignment Is it necessary to use Peano arithmetic to specify a simple type in a general purpose programming language? |
|
But if you want you can also encode the sizes in binary or decimal numbers: http://apocalisp.wordpress.com/2010/06/24/type-level-program... http://www.ict.kth.se/forsyde/files/tutorial/apas03.html