A possible future usage of user-defined slicing

bearophile bearophileHUGS at lycos.com
Tue Apr 15 07:50:32 PDT 2014


This is an useless post. Sometimes it's good to look at code in 
other languages, and see their idioms, or to have an idea where 
to go.

This is a simple problem, it just asks to simulate some rotations 
of a Rubik's Cube:

http://www.reddit.com/r/dailyprogrammer/comments/22k8hu/492014_challenge_157_intermediate_puzzle_cube/

This is a correct Python solution:

http://www.reddit.com/r/dailyprogrammer/comments/22k8hu/492014_challenge_157_intermediate_puzzle_cube/cgod926

I presume that with Kenji patch 
(https://github.com/D-Programming-Language/dmd/pull/443 ) we can 
define multiple $ and slices in user-defined code, to implement a 
good Matrix, D code like this could be used:

http://dpaste.dzfl.pl/970ca3b204c8

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list