Register for your free account! | Forgot your password?

You last visited: Today at 14:58

  • Please register to post and access all features, it's quick, easy and FREE!


A fresh start...

Reply
 
Old 08/29/2013, 04:46   #16
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,620
Received Thanks: 833
I don't think there really is much job careers using D unless you start your own company. As for gaming I know Sfml has a D wrapper and I think Sdl has too (not sure.)

I like D better than C++ because it simplifies things where C++ makes some things more complicated than necessary. Also D has properties which C++ doesn't and it makes some things easier. You can do something similar tho in C++ like:
Code:
private:
    int m_value;
public:
    void setValue(int value);
    int getValue();
Where in D you could just do:
Code:
private int m_value;
@property
{
    public void Value(int value)
    {
        m_value = value;
    }

    public int Value()
    {
        return m_value;
    }
}
In C++ you would have to call either setValue or getValue where in D you could just call Value as a variable. Similar to properties in C#, tho C# uses the get/set scopes instead of 2 separate functions.
Code:
private int m_value;
public int Value
{
    get { return m_value; }
    set { m_value = value; }
}
Uhmm I also like that you don't have to rely on the standard library for certain features as they're implemented as language features. Ex. for thread locking you can call synchronize in D, where in C++ you would have to use std::lock (C++0x only as well.)
Code:
synchronized (arg)
{
    // do stuff ...
}
Or a global lock:
Code:
synchronized
{
    // do stuff ...
}
Where in C++ you can only do:
Code:
std::lock(mutexA, mutexB); // mutexA and mutexB has to be std::mutex

// do stuff ....

mutexA.unlock();
mutexB.unlock();
Another thing is Associative Arrays.
Code:
int[string] aArray;
This is pretty much equal to C++'s std::map except for that std::map is not suitable for classes etc.
More info here:
stackoverflow.com/questions/2281420/c-inserting-a-class-into-a-map-container#answer-2281678

Pretty much you could do this with Associative Arrays:
Code:
aArray["Bob"] = 13; // inserts bob to aArray. Bob is key, 13 is value
aArray["John"] = 18; // inserts John to aArray. John is key, 18 is value.

writeln("How old is Bob? ", aArray["Bob"]);
writeln("How old is John?", aArray["john"]);

aArray.remove("Bob");
writeln("Bob has left...");
Cba to write more lmfao, but yeah... xD





Super Aids is offline  
Thanks
1 User
Reply



« [HELP] Can't log in. | Hello!! »

Similar Threads
Fresh start in Cyber Republik
08/13/2013 - Browsergames - 0 Replies
Hello dear friends.Before 10 days cyber republik start a new server.If u want to be someone in this world now is the moment.Today start first wars.Link : CyberRepublik :)
* New * BoI - ProGame ! ~A fresh start ! ~
05/21/2013 - Battle of the Immortals - 44 Replies
Heya , i am glad to present you a new server BoI - ProGame, now better than ever ,completely bug free ( Rollback fixed ) ! -> You might ask what we can provide ? Well ,firstly we offer you a new chance to prove yourself and your friends that you are the best into boi's world ! Than we offer you a new home , a stable server that can give you a lot of funny moments to remember ! -> Want some details ? It is a GOF server , with alot of custom content like : -> new...
Atlantis -Fresh start- Cap90
01/08/2012 - SRO PServer Advertising - 152 Replies
So here we are after a brand new start. General Informations about the server: EXP/SP Rate: 10x DROP Rate: 5x GOLD DROP Rate: 5x LEVEL Cap: 90 SOX RATE: 3x Sos/2x Som/1.5x Sun Race: Chinese/Euro
EliteSRO 2 server,fresh start?
05/22/2011 - SRO PServer - Discussions / Questions - 17 Replies
SrStats - Silkroad Statistics It shows a 2nd eSro server. Will you start to play at it or you will stay at the 1st one?
Good Job to start fresh?
05/12/2008 - CO2 Main - Discussions / Questions - 10 Replies
wats a good class to start fresh with if im planning to move to another server with no help or mains?because i've been planing to goto another one and was wondering which to use.



All times are GMT +1. The time now is 14:58.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.