Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

105 Neutral

About randomguy123451

  • Rank
  1. randomguy123451

    any reason that heirarchies can not be registered for value types

    ha..ha.. Actually my bad. It was a typing mistake. I do not want the "ZFraction" and "ZIrrational" to be a subclass of "ZInteger". I want the "ZFraction" and "ZIrrational" to be a subclass of "Real". I have edited and corrected my original question. We keep ZFraction , because we want to store say 1/3 instead of 0.3333333333..... but many Irrational do not have fraction representations, they may be quadratic surds etc. Actually, I want to develop a object oriented scripted framework for high speed " mathematical computation", as it needs to be very high speed hence i am not doing it in java. I want to do it ALL in C++ classes, but only the interfaces will be exposed to angelscript. The reason i chose angelscript has nothing to do with static typing or feature x or feature y . i chose angelscript because it lets me define "my own" types(ie, value types) which will exist on "stack", not on heap, this will give me less cost to speed performance compared to heap approach. This (custom-classes on stack) is not possible in almost any of the C like syntax based scripting languages for C++, it seems to be possible only in angelscript. But on the above said url in my question , when i was preliminarily reading . It says that if i make them value types then i can not make object oriented heriarchies in them. my heirarchy (ZFraction and ZIrrational are subclasses of ZReal . There are other classes in this heirarchy as well ZComplex, ZNatural ) etc. All will be implemented as C++ classes as proper parent and child classes. Now, you said in your reply that "It's currently not possible to do reference casts for value types, but that doesn't mean you can't register both ZInteger and ZFraction even if they are base and subclass in C++." Now, from your reply i could not understand much, that by any workaround whether you are saying its possible: yes or no . If i expose ZFraction and ZIrrational and ZReal (originally implemtned in C++) to angelscript as VALUE TYPE, then are you saying that i can still expose child-parent relationship of ZFraction and ZReal to angelscript, even if they are value types, using some workaround? Any relevant url for this? sorry for the trouble, but its extremely important for me.
  2. randomguy123451

    implicit data type conversion functions from Class A to class B

    Thanks a lot. :-)
  3. ---------- http://alexzuzin.com...imp-my-library/ refer to the above url, in scala Implicit type conversion is a simple idea with powerful repercussions. Scala lets you define methods that convert an instance of one type into an instance of another – say, a java.lang.String into your.own.SuperString. When such a method is in scope (properly imported), you can use a java.lang.String anywhere you need to use your.own.SuperString, and the compiler will automatically call the converter method. Here’s an example adapted from the venerable library Scalaz: class BooleanW(isTrue: Boolean) object BooleanW{ implicit def BooleanTo(b: Boolean): BooleanW = new BooleanW(b) implicit def BooleanFrom(b: BooleanW): Boolean = b.isTrue } If, like above, you define conversions both to and from the new class, you essentially get the ability to extend a class or trait and use the extension in all existing APIs – just like Ruby’s open classes, but with static type checking. This pattern is so useful that it has its own name – “Pimp My Library.” It’s pervasive in Scala – you’ll see and use it a lot. The specific additions to existing types are usually described as “pimps.” ------------- Now, in angelscript: I will like to ask that if I have a class ZFraction (value type) and I want that if somebody wants to make lots of objects and its mathematics, then whether I can define somekind of "Implicit" data conversion function (without explicit casting or constructor pattern), so that string can be converted to ZFraction by that function. This will really ease the scripting to real scripting level. ZFraction frac1 = "22/3"; // i want to use like this ZFraction frac1 = ZFraction("22/3"); // i do not want to use(pseudocode): ZFraction frac1 =ZFraction("22/7") spewn all over my source code ZFraction frac1 = cast <ZFraction>("22/3") // i do not want this pseudocode spewn all over my source code. Though this is fine for "explicit" data type conversion, but it is not good for "implicit" data type conversion
  4. http://www.angelcode..._hierarchy.html mentions that Hierarchies can currently only be registered for reference types, not for value types. why is it so. is it a design choice? I mean , if i have value type(for performance reasons) of "ZFraction" and "ZIrrational" . Now i would definitely like them to be a subclass of "ZReal". Just due to the above restriction, i will be forced to use reference type, which will make the performance poor, as it heap based.
  5. randomguy123451

    C#-style property getters/setters

    thumbs up to "InvalidPointer" and "WitchLord" for incorporating this into angelscript. This brings angelscript a step closer to powerful languages. my theme for embedded language is to have all the object oriented, functional and other-developer friendly "features of the core language itself", BUT without the baggage of a large runtime library. properties are very important part of that.
  6. randomguy123451

    exceptions in agelscript

    i am also going to consider dart language ( www.dartlang.org ) by GOOGLE considering that it will also be executable in a VM too (apart from javascript mode) not much details are out yet. main worry is what is the size of their VM? that i will have to look out.
  7. randomguy123451

    support for closure

    may i request you to keep a roadmap weboage on angelscript homepage(www.angelcode.com/angelscript ) the goals link (http://www.angelcode.com/angelscript/goals.asp ) there is different from upcoming/wishlist features , which will be a list of user's approved requests by you. may be version number and feature can be given, but **no timeline** of the version number, if you can't promise so. for example: http://groovy.codehaus.org/Roadmap This will atleast keep users interested by having an opinion that "though this language has no feature X, but may be developer is interested, so i can start integration of my classes today, so that whenever that feature comes i will be ready." OR he may have an alternative opinion that "Though this language has no feature X, and this is essential for me, hence i should look for some other scripting language". As in this thread in 2009 http://www.gamedev.net/topic/533245-1bind-static-member-func-2namespace-in-angelscript/ , you had said that namespace is on you todo list. MOST IMPORTANTLY: by having this roadmap web page , If somebody needs a feature X which is already is in your approved roadmap(todo list), then he may financially contribute you/angelscript so that you can implement that feature 'early;. Here is a sample roadmap like: in roadmap These features may be in core or as an addon namespace (version 3.1) exception (Version 2.9) autoboxing (version 2.9) closure (version 2.7) Not in roadmap: mixin multiple inheritance
  8. randomguy123451

    support for closure

    again thanks for the positive roadmap. Closures are very much really needed for scripting language , esp. They lead to lesser and lesser amount of code esp. in the GUI handling ,mathematical computation and maps,lists etc handling. Reduces the clutter and chances of bug by a lot. The source code with closure also seem to very natural and logical .
  9. randomguy123451

    exceptions in agelscript

    and this (object oriented) mirroring is of the API only(which is still a large API) , not the classes behind the API.
  10. randomguy123451

    exceptions in agelscript

    Thanks for positive roadmap My target users are developers themselves, to whom their higher technical management do not trust to let delve into the C++ pointer mismanagement, but rather a safe sandbox of small scripting language but still powerful object oriented enough. you can think it like this, many C++ API (or C API) are consumed by me, as i am a a good C++ (third generation language) developer; - but i am "not" apt at assembly language (1 layer lower), - i am also "not" good at database administrator role like "SQL (declarattive and fourth generation language) optimization" (1 layer higher). I am good at my own layer C++ in the same way , their project manager do not want to allow intern level /fresher/his lower level programmers the pointer mismanagement risk of C++, but still he trusts their object oriented instincts, as many of them are good ruby programers (due to Ruby on Rails hype). He also does not want ruby,python due to their non-C syntax and their large size overhead for their application. So angelscript / nullC (code.google.com/p/nullc/ ) / jewelscript ( http://blog.jewe.org/?p=19 ) will mean: no pointer mismanagement (for goodness of their fresher programmers coming from ruby and PHP side) still as much object orientation as possible (for goodness for their tech lead) C syntax safe sandbox Hence, here arises a "purely object oriented but still safer" need for [color=#1C2837][size=2]the script to mirror the application code in (almost) all aspects.
  11. randomguy123451

    exceptions in agelscript

    @ _orm_ : i am sorry if i asked many questions in a single day and that was inconvenient to you or anybody else. Actually, when i saw angelscript and nullc languages, i became enthusiastic, and i tried to decide on one of them into my application. As there were four-five different features essential for me in a scripting language, hence i tried to satisfy my urgency aggravated by my excitement for angelscript and nullc. I am sorry for that. But, you could have reminded/warned me about this at first, and if not followed by me even in next many days, then you could have said anything about me. But in the first instance you started personal comments on me, which is very sad. community around a language has to be built by general helping attitude (and that may be combined with humble discpilinary posts like "plz read the FAQ that you should not do this /that"). But if people get personal on the very first day on slightest anooyances, then it will be hard for the curious guests and they will go away , WHO COULD HAVE BEEN future contributing users/part of the community. Have you seen stackoverflow.com and how people are mostly contributing on the topic and "how good it is moderated with removed posts/replies with stated that - this post has been removed/edited due to this/that" . This serves well as a reminder for that user that he needs to change any bug in his action. But nowhere personal attack is tolerated there. "You post also could have been a candidate for removal by moderator." I hope that my point is well understood. Again, i am sorry if i had ruffled anybody or _orm_ by this post or past posts.
  12. randomguy123451

    exceptions in agelscript

    I have lots of utility libraries which have full OO implementation (that is no C like error code, only exceptions of C++). These libraries exposed into angelscript should feel same to my end user , now he should not be dealing with error codes in angelscript, He should be able to extend these exceptions wih his own. So it will be good (for uniformity and no-confusion sake) that C++ and angelscript model of object heirarchy should be exactly same (in the object oriented sense) and the way of dealing it too should be the same. Second, i would like to ban the user from using normal int etc types, i want that all the types should be classes. So i will expose an Integer class for the same. though this will not give me -2.abs or -2.abs() like in groovy Integer i = new Integer(-2); (this may not be a strictly angelscript syntax, i am just trying to roughly express) i.abs() Hence, implementation of OPTIONAL TRY-CATCH exceptions and AUTOBOXING (int to Integer class and vice versa) will help me in making my scripting language almost fully object oriented/ even if not purely object oriented. Which is a must for me, due to almost all my client people's sole insistence on pure object orientedness as a policy. Though i am dying something like scala (which nicely integrates primitive types and object oriented types); but i will happily be contented with OPTIONAL TRY-CATCH exceptions and AUTOBOXING . Thats why i was evaluating angelscript with these concerns. One request: Whenever you implement it, like in groovy, do not make it mandatory to catch the exceptions or rethrow it. It must be "optional" http://mrhaki.blogspot.com/2009/09/groovy-goodness-exception-handling.html
  13. randomguy123451

    support for mixin

    Mixin has got functionalities (functions) implemented, whereas interfaces do not have. It is a way around in groovy etc , which already support interfaces, but do not support multiple inheritance; even then through mixin many of such use cases are met. but this mixin is such a thing, without which i can still live happily with the language. So not much worries on my part.
  14. randomguy123451

    support for closure

    For further conceptual information on "closure", kindly refere to these url closure in ruby http://samdanielson.com/2007/9/6/an-introduction-to-closures-in-ruby closure in nullC ( lua like smallsize language) http://code.google.com/p/nullc/ closure in groovy http://groovy.codehaus.org/Closures closure in C# http://csharpindepth.com/Articles/Chapter5/Closures.aspx so , whether angelscript currently or in future support closure?
  15. randomguy123451

    support for closure

    Sory for the trouble. This is probably the last language feature - i am asking about . whether "closures" are supported or atleast are in the immediate roadmap. Actually, first moving into the task of exposing my C++ classes into angelscript, i need to make sure that the angelscript or any scripting language is apt for me. Right now, i am evaluating between NullC ( http://code.google.com/p/nullc ) and angelscript and some other choices . and the closures and exceptions are my main humble requirements from the scripting language or should atleast be in the immediate roadmap. Thanks in advance
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!