473,800 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ECMAScript Version 4

Hello All,

Does anyone have any knowledge of when version 4 will be released? I
think that version 3 was finalized in 1999 and it would be really nice
to have the class keyword and statically typed variables.

Thanks,
Mark

Jul 23 '05 #1
12 2323
Simula wrote:
Does anyone have any knowledge of when version 4 will be
released? I think that version 3 was finalized in 1999
Edition 4 is now every overdue, in the sense that it was supposed to be
released some time ago. It now seems unlikely that it will ever be
finalised, because Microsoft have already released their version as
JScript.net and are now not motivated to agree a standard that has moved
on, while everyone else don't seem keen to roll back to the version
Microsoft implements (and yes that is 100% speculation).

Not that the release of edition 4 would change anything for many years
as we are still at a point where the wisdom of using some language
features introduced in edition 3 is debatable.

There is also a great deal to be said for never having another version
of ECMAScript. As it is everyone is in a position to move towards one
consistent standard, and as the few bugs in current implementations get
fixed we are very close to having a genuinely reliable bases for the use
of the language. A new language version would call for in half a dozen
new implementations and a whole new set of bugs, differing between
implementations .
and it would be really nice to have the class keyword
I see no advantage in that. Every useful concept form class-based
languages are demonstrably implementable in ECMAScript.
and statically typed variables.


Many of the most useful techniques for accommodating differences between
browser object models are facilitated by ECMAScript's loose typing. And
loose typing forces programmers to adopt a more disciplined approach to
perceiving the types they are using, because the language does not make
them obvious.

If you want to program Java or C++ why don't you do that? As it is
ECMAScript is the ideal language for scripting web browsers because it
is dynamic and flexible enough to efficiently accommodate a wide range
of execution environments. Making it more like Java would not help in
that respect at all, as Java is specifically designed for, and lends
itself to, one single and precisely defined execution environment.

Richard.
Jul 23 '05 #2
Simula <pe*********@gm ail.com> wrote in message news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Hello All,

it would be really nice to have the class keyword and statically typed variables.


In a compiled language no doubt, but the introduction of a standard will not magically update the range of interpreters
currently in use; making it impractical to exploit such features in code intended for public consumption.
--
Stephen Chalmers
Jul 23 '05 #3
Richard,

As you have pointed out, Javascript is very close to Java or C++ as it
is. Javascript already has classes, it is just that all variables are
public and the function keyword is used to define them. Classes are
for grouping your variables and functions into clear categories and I
think that the class keyword would help clarify the endeavor.

I'm not saying that I wish that the current methods for defining
classes are done away with, just that clearer and more widely known
techniques are added.
I assert the same thing for static typing. I would not wish that
dynamic typing be removed, but static typing would help developers
stamp out logical errors and would potentially result in a speed
increase (if implemented).

I do agree that it would take quite a long time for version 4 to be
implemented within browsers, but I think the additions are worthwhile.
My thought is that the sooner the standard comes out, the sooner it can
be implemented (even if we are talking another 5+ years).

Thanks for the speculation Richard, it helps me understand the
landscape.
Mark

Jul 23 '05 #4
On 28/06/2005 05:00, Simula wrote:
As you have pointed out, Javascript is very close to Java or C++ as it
is.
I don't think Richard did anything of the sort. ECMAScript shares syntax
with other languages (not just C++ and Java), and many of the reserved
words from Java, but the similarities more-or-less end there.
Javascript already has classes,
No, it doesn't.
it is just that all variables are public
If you create public members, then clearly they will be public. But, as
Richard did point out, ECMAScript is capable of more: both public and
private, static and instance members are feasible. Protected members are
also possible, but they require a lot more effort.
and the function keyword is used to define them.
The function keyword defines functions. This does include constructor
functions, but these are still just functions, not classes. The only
special thing about them is that they are written with object
construction in mind - you could still call a constructor function like
any other function.
Classes are for grouping your variables and functions into clear categories
Classes define objects, which in turn allow for abstraction and provide
a way in which a problem can be broken down. Encapsulation groups data
and behaviour.
and I think that the class keyword would help clarify the endeavor.
I would disagree, in that well-written code will have established
conventions that would make something like a constructor function easily
identifiable. Thorough documentation will also aid understanding of the
code.
I'm not saying that I wish that the current methods for defining
classes are done away with, just that clearer and more widely known
techniques are added.
And you're willing to wait around several years for that?
I assert the same thing for static typing. I would not wish that
dynamic typing be removed,
Unless some nasty variant type is added, you can't have both. I would
expect such a type to be horribly misused by many who don't want the
hassle of actually managing their code properly. I've seen VB code where
*everything* is a Variant. Not an Integer or String in sight!
but static typing would help developers stamp out logical errors
Far from it. Logic errors occur in any sort of code. Static typing just
prevents the change of type at run-time. Only proper testing can prevent
non-syntactic errors.
and would potentially result in a speed increase (if implemented).
Maybe, but the potential loss of the dynamic properties of ECMAScript
isn't worth that.
I do agree that it would take quite a long time for version 4 to be
implemented within browsers, but I think the additions are worthwhile.


It's not how long it would take to be implemented, but how long it would
take for older implementations to fade away. Using the class keyword,
for example, in any current implementations will elicit a syntax error
because class is a future reserved word. Unless a versioning system is
reintroduced, or perhaps a MIME type is registered that existing
implementations won't recognise, you'd have to keep using the same
features from the Third Edition.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #5


Simula wrote:
Hello All,

Does anyone have any knowledge of when version 4 will be released? I
think that version 3 was finalized in 1999 and it would be really nice
to have the class keyword and statically typed variables.

Thanks,
Mark


There is a page at http://www.mozilla.org/js/language/ that might be of
interest. It has links to older versions and some links to preliminary
versions of 4. The page is not new, but things seem to be moving at a
snail's pace over the last two years.

If you want to see some really drastic changes and extensions in code,
just look at the code that the W3C is working on to replace xhtml 1.1.
The change, so far as the code writing goes, was not drastic from the
1.0 strict to the 1.1 version. However 1.1 does not have frameset and
transitional versions. I have not yet checked to see what the new xhtml
might mean for javascript, if anything.

Jul 23 '05 #6
Simula wrote:
Richard,

As you have pointed out, Javascript is very close
to Java or C++ as it is.
I did not point that out, as it is not true.
Javascript already has classes,
There are not really classes in ECMAScript. All ECMAScript objects are
of the same type, they are just sometimes augmented to have different
properties. This allows them to be perceived as of different types, and
so numerous objects to be of the same distinct 'type', but in reality
they differ only in terms of what has been done to them, and resemble
each other in having had similar things done to them.
The constructor functions are actually a mechanism for arranging to have
numerous objects augmented in similar ways, but not the only means of
doing so by a long way.

Because you can have objects that are all essentially the same (totally
dynamic) type act as instances of the same 'type' and differ from other
'types', allows concepts of classes and instances of classes to be
employed in ECMAScript, even to the extent of designing and describing
code with UML. But it is just a way of thinking about that code, that
may be useful for some applications, and superfluous or inappropriate in
others.
it is just that all variables are public and the function
keyword is used to define them. Classes are for grouping your
variables and functions into clear categories and I
think that the class keyword would help clarify the endeavor.
It is not difficult to see the grouping of constructor function and
prototype definition as a distinct unit (as common sense would have them
physically adjacent in source code), but if you want more explicit
grouping then you can do that yourself easily enough. Being able to
stick the label 'class' in the source code wouldn't make that much
difference, and the common naming convention of giving constructor
functions initial upper case names should tip readers off when the
concept of 'class' is being implemented, and which code is involved.
I'm not saying that I wish that the current methods for
defining classes are done away with, just that clearer
and more widely known techniques are added.
The problem with continuing to provide the existing mechanisms and then
loading class definitions on top is that it will make the language
considerably more complicated to learn for no significant benefits. Even
those familiar with class-=based languages will need to put work into
understanding how the proposed ECMAScript version differs from their
expectations (in the same way a C++ programmer would have to put effort
into learning how Java differed from their expectations) and because the
original mechanisms remain the novice also has to learn those, in order
to appreciate the circumstances under which they would better suite the
application of the language.

Except, of course, programmers with class-based language experience
would stick to what seemed familiar to them and never go into the areas
of the language that they did not recognise. Javascript already suffers
from that, with many individuals authoring it without any interest in
fully understanding it, and writing code that falls very short of what
it could be as a result.
I assert the same thing for static typing. I would not wish
that dynamic typing be removed, but static typing would help
developers stamp out logical errors and would potentially
result in a speed increase (if implemented).
And I make the same response for typing. If you retain loose typing
along side strict typing you end up with something that is more
complicated. All of the type safety that strict typing is supposed to
impose is undermined by the loose typing along side it, and the
programmer's discipline of having to always keep track of types
themselves is also relaxed. The result is more likely to be the worst of
both worlds than the best of both.
I do agree that it would take quite a long time for version
4 to be implemented within browsers, but I think the additions
are worthwhile. My thought is that the sooner the standard
comes out, the sooner it can be implemented (even if we are
talking another 5+ years).

<snip>

As I have said, I don't see any benefits in the proposed changes. What I
do see is a (long) transition period where browser script engines are
destabilised just at the point when they are starting to settle down
into being something consistent. Even where apparent back-compatibility
with ECMA 262 3rd edition was achieved by a new 4th edition script
engine the mere fact that it must be a new script engine will mean the
introduction of new bugs, in both its back-compatibility and its new
capabilities. And every other browser would have a different new script
engine with its own bugs.

It seems reasonable that there should be a range of languages for
differing task, and languages better suited to those tasks. ECMAScript,
as it is, is very well suited to scripting web browsers (and other
object models), it is less well suited to being used to write the
business logic for an enterprise, and it would be insanity to attempt to
write an aeroplane fly-by-wire system with it. We have class-based
languages, and employment for them. ECMAScript does not need to be yet
another, inferior, cousin to one of them when it is currently something
valuable in its own right.

Richard.
Jul 23 '05 #7
JRS: In article <11************ **********@g47g 2000cwa.googleg roups.com>
, dated Mon, 27 Jun 2005 18:30:12, seen in news:comp.lang. javascript,
Simula <pe*********@gm ail.com> posted :
Does anyone have any knowledge of when version 4 will be released? I
think that version 3 was finalized in 1999 and it would be really nice
to have the class keyword and statically typed variables.


One would only be able to use them in safety on an Intranet; it would
take several years before innovations would be safe on the general
Internet/Web.

ISTM that it might be better to have a new language, that being defined
by having a new name. It could include much of the latest javascript,
but would not need to support quaint features such as getYear and months
being 0..11. It could support applicable international standards by
default, with localisation for non-compliant regions.

It would seem wise to state that the first version should only be used
on Intranets (without preventing wider use); the subsequent for-general-
use versions would then have had a design-and-implementation debugging
stage before reaching the wiser public.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #8
Stephen Chalmers wrote:
Simula <pe*********@gm ail.com> wrote [...]
it would be really nice to have the class keyword and statically
typed variables.


In a compiled language no doubt, [...]


Please do note that J(ava)Script/ECMAScript (following: JS) are compiled
languages and they are interpreted ones. They are source code compiled
into bytecode that is interpreted by a Virtual Machine afterwards, much
like it is with Java. The only difference is that compilation with JS
in almost all cases is performed at runtime (just-in-time compilation).
PointedEars
Jul 23 '05 #9
Thomas 'PointedEars' Lahn <Po*********@we b.de> writes:
Please do note that J(ava)Script/ECMAScript (following: JS) are compiled
languages and they are interpreted ones.


The only meaningful way to distinguish what I would call compiled and
what I would call interpreted languages, is that compiled languages
are compiled only once, whereas interpreted languages start from the
source code each time they are run.

Any language can be compiled to something else, and any language can
be interpreted by a suitable interpreter, so it's not really the
language that decides, as much as the common use of it. Then again,
some languages are more obviously build for interpretation than
others.

I'd say that JavaScript was designed for interpretation rather than
compilation. This is suggested by a lot of small properties rather
than one specific thing. It's things like the availability of "eval",
allowing handling of source code at run time, and the lack of, e.g.,
types, which are practical when you can check them statically at
compile-time.

So, I'd call JavaScript, and ECMAScript, interpreted languages,
not compiled ones, because they are typically run from source
every time, and are designed to be so.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
1869
by: manno | last post by:
Hi all, more or less just out of curiosity... I had a short 'discussion' about JavaScript in different borwsers. The other guy said that there's differeces in JavaScript accross browsers (I assumed he meant apart from versions) "because there's different functions". I didn't agree because I think that's because of different DOM's. I know that for example IE 5.0 (or 5.5?) does not support array.push() (and a
2
1534
by: bissatch | last post by:
Hi, I am one of the many that get fed up with browser sniffing and cross platform issues. Is ECMAscript a new independant cross platform specification that can do loads of nice things that JavaScript can do? If so, is it well supported? If someone could give me brief overview of this that would be great, thanks
2
1258
by: VK | last post by:
2.12 What does the future hold for ECMAScript? <old> The fourth edition of ECMAScript will provide new features like typed variables, and classes. More information can be found at: http://www.mozilla.org/js/language/es4/index.html , http://msdn.microsoft.com/voices/scripting07142000.asp or from microsoft.public.dotnet.languages.jscript </old>
5
1760
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - What is ECMAScript? ----------------------------------------------------------------------- http://www.ecma-international.org/publications/standards/Ecma-262.htm ECMAScript is the international standard for javascript. JScript 3.0 and JavaScript 1.2 (available with version 4. browsers) are more or less ECMAScript compliant. In addition ECMA 327 defines...
34
3023
by: dhtml | last post by:
I made a change to the FAQ of javascript to EcmaScript. I got some feedback that the newsgroup is CLJ and the language is commonly referred to as JavaScript. Therefore, the word in the FAQ should be JavaScript. So I'm asking: what should I use in the FAQ? Technically, 'JavaScript' is Mozilla's implementation of Ecma-262.
4
1779
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - What is ECMAScript? ----------------------------------------------------------------------- ECMAScript is the international standard for JavaScript. JScript 3.0 and JavaScript 1.5 are more or less ECMAScript compliant. In addition ECMA 327 defines the Compact Profile of ECMAScript by describing the features from ECMA 262 that may be omitted in some...
5
1517
by: Martin Rinehart | last post by:
Within this group many use ECMAScript as the name of the language, JavaScript as the name of Mozilla's implementation. I see zero support for this usage outside this group (where JavaScript is the name of the language and ECMAScript is the title of the standards document). Can someone clue me in? And why don't we follow standards and write EcmaScript?
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.