[OT] Spaces/tabs (Was: simple display (from: GUI library for D))

Nick Sabalausky a at a.a
Sun Apr 10 22:00:13 PDT 2011


"KennyTM~" <kennytm at gmail.com> wrote in message 
news:int88l$uaf$1 at digitalmars.com...
> On Apr 9, 11 04:26, Adam D. Ruppe wrote:
>> We discussed this first in the GUI library thread, but since it
>> meandered so much, I decided to split off into a new subject. Much
>> of what I say here will be old to anyone who saw the previous thread.
>> There's some new stuff nearer to the bottom though.
>>
>> I, with input from others, have started writing a little module
>> for simple uses of a display. You can write to a bitmap, display it
>> to a window, and handle events all in an easy way. The basics are
>> cross platform, but you can use native function calls too.
>>
>> http://arsdnet.net/dcode/simpledisplay.d
>>
>> It's still very much in progress, but I think it's now at the point
>> where the direction I'm taking it is clear.
>>
> [snip]
>
> Thanks for the great work!
>
> Taking the version on that link, I have ported it to use the native 
> Cocoa/Core Graphics in OS X, instead of X11. You can check out the diff in 
> https://github.com/kennytm/simpledisplay.d/commit/a790.
>
> Only Snow Leopard (10.6) is supported.
>
> I have only tested that it works on the pendulum example and the HSL 
> picker, so things like drawText and drawPixel may not work properly yet. 
> The implementation part is quite messy right now due to Objective-C.
>
> Since dmd does not have "pragma(framework)", you'll need to supply the 
> "-L-framework -LAppKit" options to dmd to link it.
>
> And a few things:
>
>  1. *Please use spaces instead of tabs.*

What, so that he can force his indentation size on everyone else that works 
on the code? Or so that using the left/right arrow keys within the 
indentation zone requires an unnessesaraly large number of keypresses?

And frankly, I this strategy renders all the pro-space and pro-tab arguments 
obsolete, and it's still based on tabs anyway:

http://nickgravgaard.com/elastictabstops/

Spaces for indentation are just the worst of all worlds. And it's a total 
abuse of what space is even for in the first place.




More information about the Digitalmars-d mailing list