Why there are no compound assignment operators for logical operators (such as ||, && etc)?
According to ECMA-262, part 11.13, following is the exhaustive list of compound assignment operators: *= /= %= += -= <<= >>= >>>= &= ^= |=
.
Is garbage collection needed for implementing safe closures?
I recently attended an online course on programming languages in which, among other concepts, closures were presented. I write down two examples inspired by this course to give some context before asking my question.
Is garbage collection needed for implementing safe closures?
I recently attended an online course on programming languages in which, among other concepts, closures were presented. I write down two examples inspired by this course to give some context before asking my question.
How to implement lazy evaluation of if()
I am currently implementing an expression evaluator (single line expressions, like formulas) based on the following:
Alternative Scripting Language to Lua? [closed]
Closed 8 years ago.
Why many programming languages have only 2 data-structures: arrays and hashes?
Many programming languages have only those 2 structures, and even some languages that have more structures still only provide special syntax for those 2; usually, []
and {}
. Why is this? Is there anything special about those datatypes that is necessary for the completeness of the language?
Should I use a formal grammar for my interpreted scripting language
I have a scripting engine I just published as an open source project. It’s been sitting on my harddrive waiting for about a year. My engine of course isn’t complete in any way, but it does work for simple scripts. It has a javascript-ish feel to it, but I don’t wish to abide by the ECMA spec or anything.
How to make support for bindings for a scripting language
Main I’m making a scripting language using C++. I plan to use it with a simple test game editor. But I have to make a support for bindings to call game engine’s nodes’ methods to update positions, rotations, etc. What are the main approaches for this? The game engine I plan to use also supports […]
Why does JavaScript count array lengths by the last index?
JavaScript seems to calculate the array length property by the number of the last index in the array rather than counting the number of items in the array. Example:
Why did Apple choose to design its programming language with future and past tense method names?
There are a lot of methods like this in iOS/Objective C: