| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12
Comments:
<0> Oh <1> though, value_type in dinkums is a pair -.- <1> for a map anyway <0> that is why inserting a pair works i guess <2> value_type is a pair< const key_type, mapped_type > <3> And there's a copy cause of template <typename T, typename U> pair & operator =( pair<T,U> const & ) <3> har har har <0> i see so if my original pair used a 'const key_type' it would have probably worked without extra copying <2> it's the templated ctor, not op=, that is used <2> likoo: but why reproduce the type when it's given as a typedef? <2> the type of your map is typedefed in the cl***, right? <3> I know, but it was for the example <3> You pedantic knight <0> no reason, I was just wondering so I can understand better <2> struct { typedef std::map<K,V> Map; Map map_; }; is a pattern I use often <0> <2> the type of your map is typedefed in the cl***, right? <-- yes
<4> have you guys heard of C++0X ? <0> it all makes sens now :) <3> javaq_: don't worry, soon it'll be called C++1X <4> why? <3> Cause we won't be in year 200x <3> Anymore <2> Ashe`: nah, they'll have it out by 2009 <4> 2010 <5> what the hell is that c++0x / c++1x? <5> why is it so special? <3> New standard? <5> could you elaborate a little, pls? <2> it's special because we want auto, damnit! <3> Not sure how I can make it more clear <4> new version <3> It's a standard, and it's new <4> is that a new language? <0> auto ptrs? <6> auto will do what ? type dedeuction? <6> deduction <0> personaly I want reflexion <0> much needed in C++ <2> Cowmoo: yes <2> likoo: why? <6> mmm yes please <0> to do invoke base on function names <7> ? <0> a la Java <8> szDisposition.reserve(length); memcpy(&szDisposition, &buffer, length); <--gpfing <7> base::blah()? <0> introspection <7> heheh <2> eh? you can already call methods from a base cl*** <7> Ew, hungarian <7> Ew, memcpy <0> base = based sorry <7> And reserve doesn't resize <2> holobyted: you can't just reserve, you have to resize it <7> szDisposition.insert( buffer, buffer + length ); <2> likoo: I still don't follow you <0> as in invoke("Set"+strProp); and it will call SetPort is strProp = "port" <2> Ashe`: need to specify where to insert :P <2> just use ***ign <7> Yeah, that's what I meant too, you pedantic knight <7> I'm sick, I can be wrong as many times as I want <2> knight = i'm going to get Medieval on the next person that calls me this <0> it is called reflection <8> i cant do that though Kniht <8> it has to be raw.. it cant go though any string filters <7> Why would you want to do an invoke like that <2> likoo: that's not just reflection, that's runtime reflection <0> yes <2> and the source of many evils, imho <5> i don't know if i understood exactly what you guys ment and please correct me if i didn't but doesn't that c++ version become more vb-like? that could be could for some applications but completly useless for others <7> m["Set" + strProp](); <0> nah, in Java it is extremly usefull <2> only because java ****s, right? :P <5> that could be usefull * <0> yeah :) <7> Not sure how C++ looks like VB <2> to the man with only a hammer, everything looks like a nail
<0> or a wall <7> Knights use swords, not hammers <7> You're Michael Knight <7> And you drive K2000 <5> lol <0> "Reflection is a mechanism making it possible to investigate yourself. If we are speaking about programming languages, reflection is used to investigate format of objects at runtime, invoke methods and access fields of these objects." <0> "Reflection is required if you want to implement some generic code which can work with objects of unknown (at the time of creation of this code) types" <7> likoo: useless <0> No way jose <7> Show me an example where you need it <0> I would show yo my project, but I wont... <7> And not an example that shows reflection <0> the simplest example is for delegates <7> Don't need reflection for delegates <0> set and get properties <7> And signals/slots++ <2> you mean like boost::function or signal/slots, which c++ already has? <0> no, but reflection is sure better than function pointers <0> I had to do my implementation with method pointers <2> or like the property cl*** I wrote that allows you to use op= and implicit conversions? <5> why is it better? <0> it feels like a 'hack' <2> or iostream::flags style properties? <2> all 3 of those don't need reflection and work in c++ as it is today <7> For sure having some kind of runtime compiler is not a hack <7> We need an eval() <0> not if it is implemented in the language it's not <7> eval() is part of javascript, and it's a hack <0> I don't know anything abou eval() or javascript. How is it a hack? <7> Basically it "compiles" and runs the code in the string you p*** <2> I liked javascript back in the day, it has some interesting ideas <7> So you can do stupid things like eval( 'blah.bleh.' + somestring + '.whatever' ); <0> Kniht:yes, but there is way of doing them that don't require you go out of your way to use them. another example of reflection could be introspection <0> "Javabean" like objects <2> I don't follow, you mean something like what you can do with typedefs, concepts, and inheritance? :P <0> no ;) <0> can you introspect the fields in C++? <2> fields like map::value_type? yes <9> Wow <9> "Javabean" <5> ashe: i realy don't see how could that runtime compile can be better than doing all that manualy from the code, if you worry about cpu cycles you can do some code patching or something but that runtime compile will surely slow down more than the alternative even though it's easier to write the source <0> no, fields as in Cl*** members <9> http://www.imdb.com/title/tt0124298/ <2> value_type is a cl*** member <7> Deathmaster: that's why I said it's stupid, everything in javascript is a map, you could just do blah.bleh[somestring].whatever <0> ok, so I can give you any object and you can enumerate it's members? <2> you can even do someobject.prototype.somestring = whatever, and add 'somestring' to all objects of that type :P <2> likoo: sure, if I know the type I know the type's definition, and can use that <7> Now of course why would you want to enumerate all the members <0> maybe to map a 1->1 GUI fields <2> likoo: if you want to embed a scripting language, use something like lua <7> (or javascript) <7> for (var i in type) { type[i] == member, i == the name } <7> Har har har <2> mapping data members (they'd have to be public and violate java's OO) to gui fields doesn't sound productive <0> sure they do. Have you ever done a J2EE application? <2> no <7> I did <0> well, that is what they most use on web forms <7> And it ****s <0> beans <0> lol <0> yes, it ****s, but i Like the concept <2> so this feature is mostly useful in one limited application? <2> that sounds like a killer feature to add to a general purpose language <7> For sure it's very limited <0> no, multiple apps of the 'same genre' <7> (our application) <7> It's so limited I have to use VNC whenever I connect to a customer site cause otherwise I have to download 56 MB of .jar's <2> I didn't mean 'application' in the sense of 'program' <0> lol <7> I didn't mean it in the sense of program either <7> 95% of it is C++
Return to
#c++ or Go to some related
logs:
#london netforce misskitten km/h vs mph #AllNiteCafe #teens Error:mplayer execv ihhhk windows #AllNiteCafe #networking ubuntu dtdns install
|
|