2011/8/10 Mihnea Dobrescu-Balaur <[email protected]>:
> 2011/8/9 Adrian Scoica <[email protected]>:
>> 2011/8/9 Andrei Maruseac <[email protected]>:
>>>> Eu sunt pentru Python. [...]
>>
>>> Datorită experienţei mele de la CDL, sunt tot pentru Python. [...]
>>
>> Fine, if that's what people want... Python it is.
>>
>> Iata cum as rezuma eu... std::map<std::string, void*> :))
>
> dict() ftw! :)

Daca tot suntem aici... putem sa implementam automat si garbage
collection pe lanturi neciclice de referinte, corect este:

#ifndef __PYTHONSYNTAX_H__
#define __PYTHONSYNTAX_H__

#pragma once

namespace pysyn {
typedef boost::shared_ptr<Object*> Value;
typedef std::string Key;
class Object { public: virtual ~Object() = 0; };
typedef std::map<std::string, boost::shared_ptr<Object*> > Dictionary;
}

#endif

There... include that and you have Python syntax... :). Doar ca in
C++, e considerat bad practice din cel putin doua motive: weak typing
si virtualisation overhead ;).

Disclaimer: this is not trolling!
_______________________________________________
http://lists.rosedu.org/cgi-bin/mailman/listinfo/rosedu-general

Raspunde prin e-mail lui