Talk:Bitmap: Difference between revisions
Content added Content deleted
(New proposal: →Making the task description less strict) |
|||
Line 157: | Line 157: | ||
I'd like to see this deprecated and replaced with something better. Better in what way? I'm not sure. I just know I created this task ages ago, and I don't particularly care for its not-so-good representation of bitmap processing. --[[User:Short Circuit|Michael Mol]] 14:09, 4 October 2010 (UTC) |
I'd like to see this deprecated and replaced with something better. Better in what way? I'm not sure. I just know I created this task ages ago, and I don't particularly care for its not-so-good representation of bitmap processing. --[[User:Short Circuit|Michael Mol]] 14:09, 4 October 2010 (UTC) |
||
== Making the task description less strict == |
|||
I'd like to slightly rephrase this part of the task description: |
|||
<div style="background:#eee; margin-left:2em; font-style: italic"> |
|||
If possible provide a function to allocate an uninitialised image, |
|||
given its width and height, and provide 3 additional functions: |
|||
* one to fill an image with a plain RGB color, |
|||
* one to set a given pixel with a color, |
|||
* one to get the color of a pixel. |
|||
</div> |
|||
...to this: |
|||
<div style="background:#eee; margin-left:2em; font-style: italic"> |
|||
If possible, show how to: |
|||
* allocate an uninitialised image, given its width and height |
|||
* fill an image with a plain RGB color |
|||
* set a pixel to a given color |
|||
* get the color of a pixel |
|||
</div> |
|||
The difference is to '''not''' explicitly demand one "function" per feature. I propose this because: |
|||
* In some languages (e.g. Perl 6), it does not make sense to have separate getter and setter functions for accessing the same property (i.e. get/set a pixel) |
|||
* Constructors and methods (which is what most languages use to implement this), are not technically considered "functions" in some language traditions. |
|||
* Functional languages may be able to provide more elegant solutions if not restricted to this object-oriented paradigm. |
|||
So let's not needlessly restrict the task to a particular language's (or set of languages') way of doing things, and relax the description like proposed above. Since it won't invalidate any existing solutions (and thus won't be very disruptive), I don't think it's too late to make such a change. |
|||
Objections?<br> |
|||
--[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 11:00, 19 July 2015 (UTC) |