Gwenio1

Gwenio1

Joined Member # 4229085
5 Posts 449 Replies 12,650 Reputation

[quote who="DraekAlmasy" reply="102" id="2882167"]IMNSHO, strong typing is only useful in languages that have either a powerful type system such as Ada or Haskell, or a strong OOP system like C#. C and C-derived languages, however, don't and so I'd rather have a language with dynamic typing such as Python and Lua over them. Why? consider the following example: *snip* Will that compile? yeah. Will that run? yep. Will that produce something coherent? no freakin' way u

157 Replies 408,966 Views

[quote who="legaceez" reply="100" id="2882163"]I would pick Python. For those that are adding in a pick of C++ . . . remember that C++ is NOT a scripting language. Lua and Python are, which is why they were chosen. Also C++ libraries can be easily ported into the two scripting languages so really no matter which one is picked you C++ buffs will still be able to work with it. You might just require a few extra steps to import your functions. [/quote] AngelScript on the

157 Replies 408,966 Views

[quote who="Heavenfall" reply="96" id="2882137"] Similarly, if you're an inexperienced coder you want to avoid taking extra steps to reach the same result. [/quote] Generally you never use casting until you reach more advanced things, and by then the complexity is great enough that can go wrong without having to keep track of types as well. The one exception is integer division, where you need to turn it into a type that can hold decimals so you do not lose them.

157 Replies 408,966 Views

[quote who="Anangara" reply="91" id="2882118"]None of the languages discussed have especially strong typing (they have far from weak systems but there has been much more research done). Catching errors in compilation in languages without much of type inference doesn't catch any noticable percentage of insidious errors. [/quote] Just to check, by type inference do you mean it as defined at http://en.wikipedia.org

157 Replies 408,966 Views

[quote who="Heavenfall" reply="92" id="2882119"]I'm not disputing that. But if you're comfortable with typeless, mistakes like that happen very rarely. I'm not saying either is better, I'm just saying they're different and neither should be considered "pros" for their languages. Anyway, python variables are typeless and so are LUA so we're not really talking about a tradeoff here. It's either of those, and maybe C++ on top (technically in the bottom). [/quote] Given th

157 Replies 408,966 Views

[quote who="Ephafn" reply="87" id="2882058"] Doesn't Python have similar sandboxing issues? I don't know the specific, but I seem to remember that Wesnoth moved away from Python due to the problem of untrusted code. For example, is it possible to prevent code from calling "import" and the like without directly hacking the interpreter? As for Lua, it is possible to have it call untrusted code while only giving the functions that you want. I have seen a situation where Lua code

157 Replies 408,966 Views

[quote who="SirBedwyr" reply="80" id="2882019"]All the arguments I'm seeing in favor of C++/Angelscript appear to be oriented toward making things easier on proficient programmers rather than making it reasonably easy for a non-programmer to pick up. Not liking those arguments. [/quote] It would also make the transition from scripting to programming easier if a modder determines thay need more control. There would be somethings that need to be relearned but most of the tran

157 Replies 408,966 Views

[quote who="eteq" reply="70" id="2881896"]One other thing: there has been a fair amount of discussion about multithreading... First of all, I found it doubtful most modders will be inclined to use any extensive multithreading given how buggy it is if you're not very careful (as Frogboy's AI posts have frequently noted!). So I think overall it's a fairly moot point. But even so, depending on how the scripting is written, it is most likely straightforward to get around Python'

157 Replies 408,966 Views

[quote who="Heavenfall" reply="77" id="2881958"] It's just a different method to coding. Having to check for types isn't worse than having to convert between types. Typeless variables aren't necessarily better but they're not necessarily worse either. You can mess them up with bad code just as you can strict types. [/quote] In the case of preforming an undefined operation, it is big. Having it not fail would be like accepting XML with a tag that does not exist (li

157 Replies 408,966 Views

[quote who="DKL" reply="63" id="2881831"] Well, its a bit different story for python. It does not care about 'types' at all. There are no types, everything is objects. Whether some binary operations can happen with a given set of objects and what actually happens is decided by objects themself in runtime, by calling appropriate object methods, so you can have strings which will be able to be used in math operations (moreover, 'some text'*10 is actually valid by default, for example, and

157 Replies 408,966 Views

[quote who="DKL" reply="59" id="2881811"] \I believe you wanted to link http://www.angelcode.com/angelscript/sdk/docs/manual/doc_adv_concurrent.html this. Yeah, separate contexts is basically same as separate VMs, just lesser overhead. Point is, script data is not shared between threads, which significantly limits what you can achieve with scripts. [/quote] Actually it was: http://www.ang

157 Replies 408,966 Views

[quote who="Anangara" reply="57" id="2881796"]I OTOH don't get the point he's trying to make. He is using the names dynamic and static typing while describing the differences between weak and strong typing. Static typing is typechecking in the compiler phase. Dynamic typing is typechecking done in the runtime. Different concepts alltogether. Having programmed in assembler and Forth I can say it is a whole different animal. Dynamic typing actually makes using different modules easie

157 Replies 408,966 Views

[quote who="Anangara" reply="54" id="2881765"]As for dynamic an static typing I'm pretty much undecided. Or rather unimpressed by the weak safety guarantees offered by Java/C/C++ type systems as compared to strong type systems as offered in Haskell and logic programming langauges. [/quote] It is enough to deal with most mistakes. Why any compiler would not complain if you are attempting to multiply text by an integer is beyond me (unless you have taken special action to override

157 Replies 408,966 Views

[quote who="DKL" reply="51" id="2881751"] I doubt Lua or other script interpreters could do that w/out using separate VMs for each C++ thread, or sticking to single thread per time with locks. [/quote] Lua uses separate VMs (or effectively does; they do not share data). AngelScript on the other hand: http://www.angelcode.com/angelscript/sdk/docs/manual/index.html Whitespace is merel

157 Replies 408,966 Views

[quote who="marlowwe" reply="47" id="2881740"]For those of you suggesting C++....are you serious? Do you not understand how unfriendly this language would be to someone who has little or no prior modding/programming experience? Given Elemental's....unique...release circumstances the last thing it needs is C++ as its modding language. Whatever language is chosen, it needs to be *accessible* and easy to use. Python and LUA fit this requirement perfectly. Modding may be the one thing

157 Replies 408,966 Views

[quote who="kyogre12" reply="48" id="2881741"] I know, I have fairly proficient knowledge of Java. But as a number of classes at my school use Python, and none use Lua, I'd rather put effort into learning a language I would use outside of Elemental. Of course, I wouldn't expect Stardock to make a choice just from what would be better for me... [/quote] Then you should promote AngelScript; the most major thing to learn transitioning to it from Java is that 'static' vara

157 Replies 408,966 Views

[quote who="Anangara" reply="45" id="2881732"]If one considers mulithreading a must then Python is pretty much dead in the water from my perspective. [/quote] Yes, do to the global lock it would be too slow if the application tries to run many scripts at once. And since Elemental is multi-threaded proformance with multiple threads matters.

157 Replies 408,966 Views

[quote who="Ephafn" reply="43" id="2881717"] Errr... I always confuse function and procedural. Yep I meant procedural... [/quote] Meh, I only noticed because last night I skimmed through the documentation of the library I mentioned. They are almost the same thing, just functional takes it to an extreme. You are correct that simple procedures is most of what scripting will be for, so my samples on the first page give a good comparison of them. And dynamic typing

157 Replies 408,966 Views

[quote]Better multi-threading is great, but I am never going to try and implement that, and I do not think the majority of modders want to (just too complex for a hobby project).[/quote] However better multithreading will make it easier for the application to keep the scripts from messing up because of it. The threading will likely be the application calling scripts from multiple thread rather than the scripts actually doing multi-threaded work on their own.

157 Replies 408,966 Views

[quote who="troglyte" reply="39" id="2881681"]Admittedly I have been tinkering with Python lately, but that's just in anticipation of the APIs being released. As for the whitespace - imo that's how code is supposed to be indented anyway, complaining about that seems like complaining about not being able to be sloppy. [/quote] What proper indenting is a subject of debate in langauges where it is merely cosmetic as some find certain ways of doing it more readable. And forgetti

157 Replies 408,966 Views

[quote who="kyogre12" reply="36" id="2881658"] That's exactly what I was thinking [/quote] Once you have learned one langauge, learning the others is not that hard. And learning a langauge is the easy part if you are going to do more than simple data manipulation.

157 Replies 408,966 Views

[quote who="Ephafn" reply="32" id="2881643"]I would tend toward Lua over Python, even though the class syntax is not very pretty, I believe that most mods will mostly rely on functional programming than object-oriented programming, so a little ugliness in the later can be excused. [/quote] Boost.Phoenix version 3. A library to allow for functional programming in C++ (functional programming being where everything is a function, you likely meant pr

157 Replies 408,966 Views

[quote who="UmbralAngel" reply="29" id="2881616"]One feature I know that Python has is its modularity. If used with Elemental, it would be extremely easy to integrate multiple mods together. I am not sure how this works with Lua, but this should be an important consideration. [/quote] As far as I can tell, Lua can only have one 'module' per interpreter and they would be kept separate. It does not seem to have much capability in loading lots of scripts and would need help from the

157 Replies 408,966 Views

[quote who="Xavier X" reply="26" id="2881612"]I haven't used Lua, and only met Python in passing. C++ on the other hand, I know. Not a guru, but proficient. So what does that mean? I wouldn't be afraid of C++, and certainly feel I could learn Python or Lua. I would lean towards the more 'C-like' choice for obvious biased reasons. From arguments given above I'd choose Python. [/quote] Or AngelScript which is C++ adapted to be a scripting langauage. It lacks poi

157 Replies 408,966 Views

(I think I will stop talking about Python and Lua now and focus on what I consider better options) Since it was brought up, AngelScript's support for multi-threading is left to the application making use of it. You can have one instance per thread as in Lua. You can have one real thread manage multipe 'script threads' with custom cooperative or pre-emptive multithreading (an add-on is provided with the VM source code to help with thist). Finally, you can have one real thread per 'scri

157 Replies 408,966 Views