processing / processing-website

Repository for the processing.org website
https://processing.org
GNU General Public License v2.0
64 stars 95 forks source link

Processing feature suggestion: 2-dimensional Arrays with easy methods #540

Closed rzeta0 closed 1 month ago

rzeta0 commented 1 month ago

I'm sorry if this isn't the correct place to make a recommendation about the Processing framework - I couldn't find any other place.

Idea Currently Processing as a framework doesn't have anything to say about 2-dimensional or n-dimensional arrays.

N-dimensional, and especially 2-dimensional, arras are used a lot in creative coding and generative design.

Why The lack of an "API standard" for arrays means there is no requirement for any implementation of Processing to support them at the quality and usability expected of Processing.

In Python implementations, people use numpy. In p5js, arguably the most popular implementation of P5, people are left to scrabble around to make something work with javascript, which has very poor support for arrays.

This also leads to different and confusing approaches, not ideal for newcomers and those not expert in programming.

Vector Processing already made the decision to standardise Vectors - specifying their existence and how they should be used, what methods they should support.

The same should be done with Arrays.

Suggested API I'm no expert but off the top of my head, a P5 Array should conform to:

Stefterv commented 1 month ago

Hi rzeta0,

Thank you for your suggestion towards the Processing framework. I think the proper place for a suggestion like this one is the Processing forum: https://discourse.processing.org/c/processing/6 There you will find other people willing to discuss language features