Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: Apologia pro meo responso (was: Two questions about Esperanto)

From:Ray Brown <ray.brown@...>
Date:Sunday, July 11, 2004, 18:15
On Saturday, July 10, 2004, at 02:14 , Philippe Caquant wrote:

> 2/ About JavaScript (I'm not an expert in it, I'm just > trying to learn it at my lost moments): > - you declare an array like this : MyTab = new Array ()
Well? Not exactly _new_ syntax - it's been around in other languages for decades. Nor are you simply declaring an array. I'm no expert a Javascript, but even without knowing the language I can see straight away that your created a new array object which you are calling MyTab? How else do expect a new object to be created? I can also guess that the array object has not been given any preset length nor has the datatype of its elements been defined. So the 'array' is not an array in the old sense of contiguous memory locations. It will, in effect, have to be a lnked list. Now without knowing the language, I can spot all this because, as you said in your previous mail: "Nearly all the functions existing in Javascript (that is, concepts, or semantics) also exist in other computer languages." Quite - that's why it's using *familiar syntax* that's been around for ages. [snip]
> and then you refer to an element like this : > MyTab[2] = "hello" > or : > a = MyTab[2]
Eh? what language doesn't? In the first you're copying the string "hello" into element #2 of MyTab, in the second you're copying the contents of element #2 of MyTab into the variable called _a_. How else do you expect it to be done??? This is all familiar syntax that's decades old.
> So I notice that in some cases, you have to use > parentheses ( ), in other cases brackets [ ],
But they mean different things! They are doing different jobs - in fact the jobs they've been doing in most of the mainstream programming languages for the past two or three decades.
> and > anyway the element referred as [2] is not the secund, > but the third one, because JavaScript starts with 0 > (many, but not all, languages do so).
As you say, many do - hardly new. That's been standard for decades.
> But in the > language I use (Pick 'Basic Gestion' - that's its
Not heard of it, nor seen the syntaxes you give as examples - but it looks like a BASIC derivative {shudder} [snip]
> like (if I remember): > 01 MYTAB > 03 MYLINE OCCURS 3 [DEPENDING ON...] > 05 MYCOL OCCURS... etc > But after all, this is all handling arrays. So why do > we need a dozen of different syntaxes, since the > concept is always the same ?
Not really. When COBOL was invented, an array was simply a contiguous set of memory locations, i.e. a set of variables which could either be accessed invidually or treated as one unit. Since that time the concept of 'objects' with methods that encapsulate their data has developed. A different syntax is needed. Also some languages allow only static data types, i.e. their size and datatypes are fixed. Others allow dynamic structures and, in fact, their 'arrays' are not contiguous memory locations but are dynamically accessed through pointers. Different syntaxes are required. [snip]
> In JavaScript, "or" is "||"'. But in Basic Gestion, it > is "OR". In other languages, it is "|".
Not just Javascript, either - but | is, surely, bitwise OR, while || is the logical OR operator connecting two boolean expressions. At least that' s what I'd expect from other languages.
> In JavaScript, > "AND" is "&&". I'm used to "AND". In JavaScript, "not" > is "!".
[snip] I sort of get the impression you've never programmed in C, C++ or Java. Both C and C++ have been widely used for vey many years now. Indeed, it's precisely because of their widespread use that Sun adopted similar syntax for Java. I really don't think you can gripe about Javascript on the basis of a language called "Basic Gestion" which looks horribly as tho it's based on BASIC. In fact, on the evidence you've provided, your complaint "But for every computer language, somebody thought that it would be definitely nicer, or more clever, if the syntax was just a little bit different from the other languages" is simply not holding up. All I see is syntax the same as or very similar to what I've come across in other programming languages.
> That's why I say this looks very childish to me. Let's > invent new smart functions, ok, but let's refuse to > learn new exotic syntaxes for basic functions in every > new language.
That's why it's good idea to get into the mainstream of programming. I mean languages like C, C++ etc aren't exactly new. Just because the inventors of Javascript have gone for a syntax based upon what are probably now the most commonly used syntaxes is no reason to gripe. [snip]
> that I know such or such language : what I want to > mention is that I'm able to conceive a program that > will (reasonably) work, not depending of the language.
Can you? Even if the language is logic based, like Prolog, or function based like LISP? Not if you're only experience in the prodedural approach of some BASIC derivative, I think. [snip]
> out of them. This is totally irrational, and the > people who conceive computer languages are responsible > for that. Their main argument is "if you don't like > it, just use another one". Childish and arrogant. May > they roast in the flames of Hell, amen, dot, semicolon > and two dozen of braces, end-of-program.
Sorry - but to me this last outburst is totally irrational & childish. We're not going to get anywhere with this. I suggest you spend some time actually finding out how programming has developed over the past half century and also getting into the mainstream of programming. Besides, I fail to see what relevance this has to conlanging (still less to Esperanto, where this thread started). If I want to discuss the merits & demerits of programming languages, I would use a different list. Ray =============================================== (home) (work) =============================================== "A mind which thinks at its own expense will always interfere with language." J.G. Hamann, 1760