Power of D

Era Scarecrow rtcvb32 at yahoo.com
Wed Apr 25 22:55:37 PDT 2012


On Wednesday, 25 April 2012 at 17:52:36 UTC, bioinfornatics wrote:
> i search some example of something easy (more easy)  to do in D 
> an not
> in another language if possible
> - D - C++
> - D - Haskell
> - D - Java
> - D - python
>
> thanks a lot

  Associative arrays?

C++:
#include <map>
#include <string>

map<string, string> m;

Java:
import java.util.*;


Map<String, String> map = new HashMap<String, String>();

D:
string[string] map

(Don't know the other two... sorry)
--

  Source/syntax parsing (compared to C++ involving 
templates/generics).

  Let's see, what else. Utility functions as pseudo members? Since 
in other language you'd have to include all utility functions in 
with the class, and try to give it all functionality right away. 
Anything your missing you may have to inherit from another class 
(with those functions) or call as regular functions.


More information about the Digitalmars-d-learn mailing list