D3 printing api should get some attention

monkyyy crazymonkyyy at gmail.com
Sun Jul 14 17:54:05 UTC 2024


printf sux and walters worried about optimizing it rather then 
api clarity

I use print statements for debugging and debugging sux, every 
little bit of syntax sugar should be used because its temp code 
99% of the time

So there should be several templated to hell and back print 
functions, without the slightest care about speed

----

`println` => assumes the first argument is a string and replaces 
% with the rest of the arguments `println("hello %, today is 
%.","bob",days.monday);` "hello bob, today is monday"

`debugln` => prints with line number and file `"foo".debug`=> 
"(fizzbuzz/bar.d:1)foo"

`formatln` => prints as if it was a excel doc, elements that are 
to long get shortened, pads the length of small numbers etc. 
`formatln(vec2(1000,1),"hello world")=> "x:  1000|y:     1|"hello 
w...| "

etc.

~~give me yummy yummy sugar~~


More information about the Digitalmars-d mailing list