DTrace style: As there is no idiomatic defined ground rules for how to do style D code I will use this topic for proposals for how to make D more usable. Nothing set in stone- always room for improvements. Suggestions are welcome.
-
Show this thread
-
The reasoning for not having loops is the need for the D VM to set gurantees for execution time. Conditional looping can make that impossible. Instead we can repeat an action X times with a hard static maxium. Not pretty- but gets the job done
1 reply 0 retweets 2 likesShow this thread -
This is an example of an alternative to conditional looping. The algo implements a max len on strings. When reached- the middle characters will be dropped. Some dots are inserted instead when done- to communicate there have happened truncation.pic.twitter.com/Lmndu8a8k7
1 reply 0 retweets 5 likesShow this thread
the perfect way would be something like: int i =1; WHILE( ( i < 20),( i++ ) ){ printf("%s", i); } If anybody can make that with macros and preprocessor I will be very impressed!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.