The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OO
#11
LCD Wrote:This cannot be done with a linked list?
sprite.x(nr)
sprite.pointer(nr)
or similar?

This is something I'd like to discuss. Instead of copying C++ or the like syntax, design a new one. more close to BASIC. For example:
  • No pointers but references instead (like Java or Python) :?:
    Code:
    sprite.x(nr) sprite.nextSprite.x(nr)
  • List containers embedded in the language :?:
    Code:
    REM an Array is a container with all elements of the same type REM A list is not A = [1, "Hello", sprite] A = A + [More, Elements] : REM Dynamic PRINT A(3) REM Sublisting B = A(2 TO 5)
    Note: List can be implemented just with the references/pointer implementation above, but this is more BASIC sugar-syntax IMHO ;-)

Please, discuss :!:
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)