[messages] [Developers] Re: Roadmap for VASSAL 4

Michael Kiefte mkiefte at dal.ca
Wed Mar 30 02:14:09 MST 2011


I finished reading the Mozilla documentation on JavaScript, and inheritance
is a nightmare.  Since there are not classes, inheritance is based on a
prototype instantiation. The syntax for inheritance is a gigantic kludge and
there appear to be several ways of doing it--none of which are necessarily
intuitive.  I have a sudden urge to do everything in assembler.  There are a
few other quirks that will make it bug prone -- some of which I posted
above.  I was against JavaScript before I started investigating it and now
I'm actually much more firm in my opposition.  It's a bad language.

- M.

On 29 March 2011 17:25, Michael Kiefte <mkiefte at dal.ca> wrote:

> I just had to post this bit.  You're allowed to have an array of length 5
> in which the myArray[3] is invalid following delete myArray[3]; Object
> properties seem unmanageable and methods are implemented rather poorly (you
> have to assign them like variables).  JavaScript seems fine for small
> projects where you're the only developer, but for multi-developer projects,
> it would be hard to coordinate. I really can't imagine working with this for
> anything complicated.
>
> From the docs:
>
> At the implementation level, JavaScript's arrays actually store their
>> elements as standard object properties, using the array index as the
>> property name
>>
>
> Didn't sh used to work like this?  I guess there's a reason why it's called
> JavaScript.
>
> - M.
>
> On 29 March 2011 15:22, Michael Kiefte <mkiefte at dal.ca> wrote:
>
>> Some choice quotes regarding JavaScript on the Mozilla website that made
>> me cringe:
>>
>> JavaScript is a small, lightweight language; it is not useful as a
>>> standalone language, but is designed for easy embedding in other products
>>> and applications, such as web browsers.
>>>
>>> JavaScript is a very free-form language compared to Java. You do not have
>>> to declare all variables, classes, and methods. You do not have to be
>>> concerned with whether methods are public, private, or protected, and you do
>>> not have to implement interfaces. Variables, parameters, and function return
>>> types are not explicitly typed.
>>>
>>> In expressions involving numeric and string values with the + operator,
>>> JavaScript converts numeric values to strings. For example, consider the
>>> following statements:
>>> 1 x = "The answer is " + 42 // returns "The answer is 42"
>>> 2y = 42 + " is the answer" // returns "42 is the answer"
>>>
>>> In statements involving other operators, JavaScript does not convert
>>> numeric values to strings. For example:
>>> 1 "37" - 7 // returns 30
>>> 2"37" + 7 // returns "377"
>>>
>>> Another unusual thing about variables in JavaScript is that you can refer
>>> to a variable declared later, without getting an exception.
>>>
>>> If an array is created using a literal in a top-level script, JavaScript
>>> interprets the array each time it evaluates the expression containing the
>>> array literal. In addition, a literal used in a function is created each
>>> time the function is called.
>>>
>>
>>
>> That's just the from first three pages.   I'm actually going to learn
>> JavaScript anyway as I wouldn't mind using it for some lectures (I use
>> pdfLaTeX + Beamer and you can embed JavaScript in the resulting PDF).  But
>> it kind of reminds me of MATLAB or perl -- not something that you'd want to
>> do a really big project in. (However, I have done really big projects in
>> MATLAB and they're a nightmare to debug).
>>
>> - M.
>>
>> On 28 March 2011 09:35, Joel Uckelman <uckelman at nomic.net> wrote:
>>
>>> Thus spake Michael Kiefte:
>>> >
>>> > Hi Joel,
>>> >
>>> > Why did you comment out mapZoom(e)?
>>>
>>> Uncomment it and see. :)
>>>
>>> I couldn't get it to work well enough using CSS scaling to be usable.
>>>
>>> I had a third idea which I ran out of time to try, which is to do
>>> everything inside of SVG, where you've got (presumably) better-
>>> supported scaling and rotation. Since SVG is part of the DOM, it
>>> wouldn't be much different from the code you're looking at.
>>>
>>> --
>>> J.
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vassalengine.org/pipermail/messages/attachments/20110330/3bd21e3c/attachment.html>


More information about the messages mailing list