Douglas Crockford Envisions A Post-JavaScript World (infoworld.com)
JavaScript developer (and JSON proponent) Douglas Crockford recently described "a theoretical post-JavaScript World," according to InfoWorld. Crockford "believes the web development staple needs a successor that can fix multiple programming nuances." An anonymous reader summarizes their report:
Despite its status as the world's most popular language, Crockford told an audience at the Oracle Code conference, "It would be sad if JavaScript turns out to be the last language." He complained that JavaScript has two different ways of declaring variables -- let and var -- as well as two different "bottom variables" with no value -- both null and undefined. "There's an argument among language designers, should we have bottom values at all? But there's nobody who thinks you should have two of them."
According to InfoWorld, Crockford "also presented a scenario with JavaScript being turned into a purely functional programming language by getting rid of 'impurities' like date, the delete operation, math.random and object.assign. Afterward, he stressed replacing JavaScript rather than adding functional capabilities to it... The next language also should be better able to deal with multiple cores. Most languages have followed the sequential model of Fortran, executing one operation after another, he said. 'That's not how the world works anymore. We now have lots of cores available to us, which all want to be running at the same time.'"
In other news, Crockford also proposed ending the "spaces vs. tabs" debate by simply eliminating tabs altogether.
According to InfoWorld, Crockford "also presented a scenario with JavaScript being turned into a purely functional programming language by getting rid of 'impurities' like date, the delete operation, math.random and object.assign. Afterward, he stressed replacing JavaScript rather than adding functional capabilities to it... The next language also should be better able to deal with multiple cores. Most languages have followed the sequential model of Fortran, executing one operation after another, he said. 'That's not how the world works anymore. We now have lots of cores available to us, which all want to be running at the same time.'"
In other news, Crockford also proposed ending the "spaces vs. tabs" debate by simply eliminating tabs altogether.
You go to hell and you die.
Who in his right mind wants to use spaces for indentation. That's just bs.
I really don't care which one someone prefers, what I can't stand is not having a standard translation between the two. I wish IDE's, programming languages, and text editors would just pick an arbitrary value like 4 spaces = 1 tab and stick to it. Then, we could let people use whichever they choose.
>also presented a scenario with JavaScript being turned into a purely functional programming language by getting rid of 'impurities' like date, the delete operation, math.random and object.assign.
Getting rid of those things does not make JS a functional programming language.
Also, writing in purely functional languages just fucking sucks, they aren't and won't ever be a multi-core-coding panacea, and if highly-parallel-performance computing is your concern for the future, being ignorant to how parallel processing environments work by "letting the compiler decide" isn't going to make things better.
Make it easy to use all cores? The last thing I want is for a web page to be able to hog all the cores on my machine.
for the kinds of simple data driven apps JavaScript is used for. The current single threaded model + callbacks works just fine for the most part, and promises solve most of the syntax nightmares (e.g. the Pyramid of Doom). I don't need to play Quake 5 written in JavaScript. That's what C's for.
As for the rest of his complaints, well, it's mostly there for backwards compat. Don't use it if you don't want to.
Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
We need a standardised virtual machine that languages can be compiled to run on, that way the language of choice is more free to change. And Web browsers developers can deal with a simpler virtual machine language to translate.
yaml uses 2 spaces for indents.
Maybe tab should be 1 space, then everyone would be happy.
lucm, indeed.
why don't you go 20 years in the past and fix it?
lucm, indeed.
Lets let websites spin every single CPU core, access USB devices and store files and shit on our systems. Lets let sites give carte blanch access to helplessly complex and insecure GPUs and driver stacks. A few bitcoin mining shaders while you browse never hurt anyone. This is in addition to websites now getting to open random sockets to wherever the fuck they want and know yer physical location and keep hot Mic open forever if you ever allowed it in the past.
This all sounds really great. People can't even fucking secure the browser stacks they have now but fuck it MORE MORE.. MORE..... Internet users are not fucked enough as it is.
1) "Impurities" like date and math.random are what let's people do useful stuff with Javascript.
2) Javascript is difficult to use due to it's haphazard "design" but that doesn't mean that we need to get rid of it... Google and Microsoft will just start forking the successor too and recreate the same mess we have today.
3) People that code with spaces are either a bit out of their gourd or people that use tabs in an IDE written by people that think that they have to convert tabs to spaces because they are out of their gourd. Real programmers use 1 tab per indent level and use the setting in their text editor to set the width to be what is comfortable to them. And all those people out their that think that spaces are the one true religion need to cleanup a few million lines of respaced by an IDE spew to help them readjust to mainstream society.
I'd like to have some of the same medication that Douglas Crockford is on, but in a smaller dose.
Just cruising through this digital world at 33 1/3 rpm...
In the last 40 years I've used lots of languages from BASIC to Z80 assembly, 8080 assembly, 8086 assembly, 68k, C, awk, sed, sh, perl, C++, TCL/Tk, ADA, Python, Java, Javascript. Some I really liked (assembly, C), some I used with trepidation (C++, perl), some I actively hated (TCL/Tk, ADA).
But the one and only language that I felt was actually working against me was javascript. Damned script would pass all my tests, then fail on someone else's machine because they chose different options when installing, or had a different version, or just reasons. Note my scripts wouldn't actually fail, as in an error message. No, they just gave the wrong damned results.
I fucking hate Javascript with a passion and wish it would die by the end of the year.
We have been living in the PostScript world for quite some time.
Since PHP has started supporting encryption out of the box, what about advancing that until a better language comes along?
Tabs should be completely eliminated. They are a obsolete vestige left over from mechanical teletypes.
"Completely" is a strong word. I can understand using spaces for indentation, but if you "completely" eliminate tabs, you break compatibility with POSIX Make. Furthermore, if you "completely" eliminate tabs, then what format for delimited flat files? In my experience, tab-separated values format is more efficient than comma-separated values format because a value is far more likely to need escaping because it contains a comma than because it contains a tab.
I'm in the tabs but not spaces camp.
“Common sense is not so common.” — Voltaire
Every I/O blocks, and when the program hits an I/O, the interpreter switches to another thread. Where have I heard that one before? Oh yeah: Python threading and the GIL.
I don't understand why the Web browser can't use whatever scripting languages I have installed. If I don't have installed the website tells me to install.
And when a particular language is available only for one proprietary web browser on one proprietary operating system, you're back to "Best viewed with Internet Explorer". Furthermore, the browser would need to heavily sandbox third-party installable languages in order to protect users from the sort of trojans that were common in the "codec pack" era, and sandboxing is patented.
Many programming people are aware of Richard Gabriel's essays on why C and related languages became the dominant programming paradigm (
https://www.jwz.org/doc/worse-...). In essence, sometimes those ugly compromises are just what people really want (or even need).
Many have argued that JavaScript is a excellent example of this phenomenon, but there's one big difference. Everybody is trying to replace JavaScript. Some are bolting on new keywords to the language, others are pushing features and some have just started using TypeScript. Here's the thing. The history of C, the "worse" language in the article, had a long history of usage (still does), and C++, for better and worse, sought only to argument, not replace C. In the end, JavaScript is not worse, it is broken.
We know that strictly typed object oriented languages do really well for UI based systems. The notion of hierarchy of control classes works. The Document Object Model even acknowledges that by suggesting it too fits that model (but really doesn't do that). If they really want to make an UI ecosystem, they will either continue to hack it together at an increasing expense, or they will get an ecosystem that does it better. Personally, I think the hacks will go on for a long time, because cross platform UI markup, programming frameworks and a new language for that all? Very difficult to do, and there is too much invested in the "Web way" to just steal what works from Microsoft, Apple, Android and so on.
And, the thick client model is making inroads and maybe that will continue. Mobile apps are a thing, maybe desktop apps will gain traction as people realize you can still gain similar levels of control and data collection with those as web pages (sad, but that's how we pay for things now).
In the end, language design is very hard. It's actually not hard to hack up a bad version of Scheme or Lisp (that's what JavaScript is). It is very hard to fix all the problems if your language is a success. A proper set of fundamental types matter. Lexical scoping matters. Proper typing and a effective type model matters. And that's not even talking about the core frameworks that a good language needs, because that's a whole new set of challenges. I just hope that if there is a JavaScript replacement, that they follow in the fine programming language tradition of just stealing what works and carefully replacing what doesn't. C++ stole from C, Java stole from C++, C# stole from Java (and Delphi). F# stole from Haskell, Haskell stole from OCaml which stole from ML and everybody steals from Scheme and Common LISP now. Just do it and don't be too clever about it.
Web workers can be run concurrently if the individual's browser allows for it. The biggest limitation to web workers is that memory cannot be shared between workers. Data is always copied and sent via message between workers and the main thread, so there is some overhead. https://developer.mozilla.org/...
Agreed. Flash was mostly coordinate based and thus far more consistent and predictable across browser brands, OS settings, etc., something the HTML stack fails at badly.
Designers loved Flash for that reason. Now they are stuck back at client-side auto-flow positioning, which makes UI and graphic designers prematurely grey.
Table-ized A.I.
Okay, so this might be a bit of a ramble. Hi, I'm one of the developers of Monte https://monte.rtfd.org/, a new programming language based on E. E http://erights.org/ is a language from the 90s. Crockford worked on E. E's TermL mini-language became JSON. Another person who worked on E was Mark Miller. Miller's thesis project was formalizing and describing systems built with E. Crockford and Miller both are part of the committees that steer JS.
Now, to bring it all together: Object capability security is a security discipline based on the principle of least authority and perfect encapsulation. It allows us to build secure distributed computations with pretty good security properties; wf-stringe can prove that certain data cannot be exfiltrated, that certain I/O cannot happen, and that certain computations are arbitrarily safe to evaluate. It's not perfect, but it's a massive improvement on the state of things.
E and Monte, as well as a few other languages like Caja, Pony, and Waterken, are object-capability languages. Just like languages without manual memory management cannot misbehave in certain ways, these languages also promise that they cannot fail in certain desirable security-related ways.
Crockford, Miller, and others have been deliberately steering JS towards more capability-safe constructions. The object model has been tightened up, and tools like weakmaps, promises, and "template strings" (we call them quasiliterals in the literature) have been added. However, JS is still defined by its weak points, and those points are weak indeed.
Obviously, my bias is towards Monte. It's my preferred language and I want it to be popular. But, more importantly, I want the ideas that went into Monte to be popular. So, in that spirit, I'm going to give you a short list of questions. I want you to think, "How can I do that in my favorite language? Why would I want it?" Monte is meant to be the next Blub http://wiki.c2.com/?BlubParadox, the next language that is mediocre but built on a good foundation, and part of that is trying to see how Monte answers questions like:
~ C.
So...he doesn't like it that there are two ways to declare variables? He doesn't like tabs? He doesn't get out much, does he!
Between languages like CoffeeScript and TypeScript and runtimes like WebAssembly, it looks like we have some pretty good ways of evolving gradually into a post-JavaScript world and are on our way there. No need to articulate grand visions.
After over 2 decades of programming I'm sick of "functional", "OO", "parallel", "strongly typed", "loosely typed", "actor based", etc languages. Every single esoteric or pseudo-esoteric language out there is fucking dumb (this includes c++ and c#.)
Thank you for saying what so many people here will not acknowledge or admit.
Just cruising through this digital world at 33 1/3 rpm...
Tools for people should allow for any style, they should encompass all styles, and they should be infinitely adaptable
"When someone says 'I want a programming language in which I need only say what I wish done,' give him a lollipop." --Alan Perlis
Trying to use a language with a hundred or less keywords is just archaic, I want at least as many meaningful keywords as a toddler has to speak with.
Languages like that tend to be difficult for a team to work with, because no one knows every area well. Also, do you know how hard it is to memorize a thousand vocabulary words? It's a pain.
All the same, you might enjoy the Shakespeare programming language.
"First they came for the slanderers and i said nothing."
I've read all comments as of this time and nobody seems to have taken note of his suggestion about bottom vars:
"There's an argument among language designers, should we have bottom values at all? But there's nobody who thinks you should have two of them."
I would like to _strongly_ disagree, you _do_ need two different kinds:
undefined (Not a Number/Not a Result) which traps if you try to use it, and none which means empty/ignore!
In the Mill cpu architecture (http://millcomputing.com/) we have those two different kinds and they make coding both easier/more elegant/more compact, and at the same time faster and more secure!
Another example:
I am currently on the group that works on the 2018 revision of the IEEE 754 (i.e. floating point) standard. In the original '754 version the "Not a Number" (NaN) type was defined as a way to create a "sticky" error marker in a numeric calculation. I.e. if you accidentally try to calculate 0/0 or Inf/Inf the result will be undefined, the operation might trap or not depending upon how your language runtime is setup, but the result will always be a NaN. There are two kinds of NaNs, Signaling NaN and Quiet NaN, the only difference is that the next time a SNaN is taken as input to an operation it will trap and then be converted to the equivalent QNaN while a QNaN as input will just propagate to the output.
It should be obvious that if your runtime initializes all FP variables to NaN, then any accidental use-before-load should be detected, right?
The problem is that for the 2008 (current) revision of the standard, enough people wanted a totally different behavior when searching for the maximum value in an array, typically used to scale a matrix: They managed to define minNum(a,NaN)/maxNum(NaN,b) so as to ignore any quiet NaN val
ues, always returning the other value. I.e. in those functions they got NaN to behave as None!
The real problem, and the main reason these functions are going away is how the definition above interact with the SNaN/QNaN rules:
maxNum(1.0, QNaN) -> 1.0
maxNum(QNaN, 1.0) -> 1.0
maxNum(1.0, SNaN) -> QNaN
maxNum(SNaN, 1.0) -> QNaN
So if you look for the maximum of 4 values, one of them a SNaN, the result will depend on the order of comparisons, i.e. if you do them pairwise you get this result:
max(1.0, SNaN, 2.0, 3.0) -> maxNum(maxNum(1.0, SNaN), maxNum(2.0, 3.0)) -> maxNum(QNaN, 3.0) -> 3.0
while taking alternate inputs results in
maxNum(maxNum(1.0, 2.0), maxNum(SNaN, 3.0)) -> maxNum(2.0, QNaN) -> 2.0
I.e. we would have been much better off here with a single bit pattern meaning None which would never propagate.
"almost all programming can be viewed as an exercise in caching"
code in your fav lang --> AST --> LLVM representation --> WASM src --> |(interwebs) --> |(browser) --> WASM binary
Diversity means freedom. And if we push it a little further, we could even end the "spaces vs tabs" and the "curlies vs. indentation blocks" and all the other endless AST representation discussions to rest:
code in your fav lang syntax flavor --> code in your fav lang --> AST ...
All it takes is Editors which support "syntax styles" to present the AST of a language, just like css presents HTML. Hell, in Atom you could probably even do this with an actual css. Oh, and it would take developers who understand that we actually code an AST, not spaces and tabs and curlies and stuff.
P.S.: plz do not reply if you don't know what AST means :-)
What? CTRL-Left Arrow/Right Arrow doesn't work in your editor?
Most languages have followed the sequential model of Fortran, executing one operation after another, he said. 'That's not how the world works anymore. We now have lots of cores available to us, which all want to be running at the same time.'"
That's pretty ironic, considering Fortran (at least F90 and up) has native parallel programming features. Namely vector/matrix math syntax, which decent compilers can turn into hardware-level parallelism.
Escher was the first MC and Giger invented the HR department.
No Script and Ad Blocker Plus are on all the time on my system. Why aren't they on for yours?
Necessity is the plea for every infringement of human freedom. It is the argument of tyrants; it is the creed of slaves.
The Shakespeare language is actually very funny.
But, I understand what you want to say. HyperCard was a superb programming environment/framework. But the xTalk languages, that includes AppleScript, are a pain in the ass to program with. AppleScript is incredible powerful, but learning all the quirks is completely impossible.
For the guys who do not know about "Hypertalk" aka xTalk, as there are various variations of it, and don't know about AppleScript: those languages aim to be natural english language. Every application on macOS is scriptable, but "contributes" its own "dictionary".
Scripts in those languages are super easy to read, as they literally are "plain english". But writing a script without google/stackoverflow is close to impossible. Unless you only work with those languages, obviously.
This is a script to find and show a certain tab you have open in Safari:
set question to display dialog ("Find Safari tab:") default answer ""
set searchpat to text returned of question
tell application "Safari"
set winlist to every window
set winmatchlist to {}
set tabmatchlist to {}
set tabnamematchlist to {}
repeat with win in winlist
set ok to true
try
set tablist to every tab of win
on error errmsg
--display dialog name of win as string
set ok to false
end try
if ok then
repeat with t in tablist
if searchpat is in (name of t as string) then
set end of winmatchlist to win
set end of tabmatchlist to t
set end of tabnamematchlist to (id of win as string) & "." & (index of t as string) & ". " & (name of t as string)
--display dialog name of t as string
else if searchpat is in (URL of t as string) then
set end of winmatchlist to win
set end of tabmatchlist to t
set end of tabnamematchlist to (id of win as string) & "." & (index of t as string) & ". " & (name of t as string)
--display
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
Javascript can't die soon enough for my taste.
...and don't forget to check if you did it right by changing the tab size setting in your IDE to several values before saving!
He is a bunch of senseless babble. The nul and undefined nonsense is basically what color to paint the shed nonsense, that has more to do with just changing something for the sake of change or for some spurious reason. They have some convoluted reason but its some highly obfuscated answer using complicated convoluted argumentation to hide its trite baselessness. Functional programming tends to turn into a mess and is not itself a "feature" because many procedural languages have a full set of functional features, functional languages do not offer something other languages do not, its more about what they do not have to fit some puristic idea of the functional cult zealots. the comments about let and define are more nitpicking rather than a real substantial issue. So there are two ways to define a variable. So what? The sky is not falling.
Attempting to go functional leads to horrendous obfuscation and bizzarre code when you try to interact with the external environment. Thanks, but no thanks.
There is no need to replace javascript and this itself is a waste of time and resources, because everyone who knows javascript would have to learn a completely new language, and they will waste time doing so rather than just getting stuff done. People like Crockford are talkers rather than doers who sit around talking about how they are going to make life difficult for others and coming up with crazy schemes to waste peoples time. They are like beauracrats who come up with senseless regulations, they contribute nothing but they enjoy the feeling of power of being able to obstruct productive people.
the best thing we can do is ignore nonsense from these kinds of people.
Or Python. With each year passing, there are fewer reasons to use FORTRAN and many more to use Python. Even on supercomputers.
Je completely mee eens damit.
Agreed. 100%.
Ephemeral, trust-before-first-render, load-from-goshdarn-anywhere is a fine security model (almost) if all the application can do is move coloured pixels around on your screen (1% of these will still pretend to be your favourite financial institution).
With the "native" applications (which could well be 100% portable flavour-of-the-day) I can audit my installation log to determine at all past points in time which applications could potentially have accessed or manipulated key system resources (such as my GPU, but this list could in theory be very long and fine grained), where they were obtained from (including the original authentication handshake), and other potentially incriminating metadata.
So, yeah, there are many cases where I like the "native" security model 10,000% better than any hot-loaded trojan.js.
Even if all computers ever built were 100.000,000% compatible, I would still prefer the "native" security model 99.99% of the time when real resources become involved.
To put this in Tversky / Kahneman terms: the web security model is System 1 lizard brain, while the "native" security model is painful enough to (mostly) be System 2 belt-and-suspenders brain (or at least tighty-whitey and fungus-proof shower-sandal brain).
Did not know know of this implied criteria for language design which by extension means any new language must not confuse JAVA programmers.
And the language certainly can't be functional ... because _that_ confuses Java programmers.
Conclusion: we should all just use JAVA. ... no thank you.
"Consensus" in science is _always_ a political construct.
That's a good point, Applescript is indeed a good example language in this context.
"First they came for the slanderers and i said nothing."
The biggest problem to the Unix way of Web, Is windows doesn't have python or perl or any languages installed.
Would you prefer a web application that works only in web browsers made for, say, the Solaris operating system because the language in which its client-side component is written is available only for Solaris? Solaris is a UNIX operating system.
Also patent trolls is a bad reason to not do something the superior way.
What should people do instead? Pay off every troll that makes a claim?
I don't need to play Quake 5 written in JavaScript. That's what C's for.
Until you find that a program written in C was compiled for an instruction set and operating system other than that of your computer.
Recompile?
Good luck recompiling if all you received from the application's publisher was a binary compiled from source code that the application's publisher considers a trade secret. I figured that would be obvious because Quake is the title of a video game series. Or are you referring to Id Software's historic process of distributing its older engines as free software years later after engine licenses dry up?
Sell yourself as a pure HTML/CSS page developer and convince your buyers that the increased security and throughput is worthwhile.
If they want less users then it's their decision to stick with Solaris.
And this is why web application publishers stick with JavaScript or languages that transpile thereto instead of offering a web browser that supports installable third-party languages: JavaScript or languages that transpile thereto reach the most users.
Personally, I find the difference so stark that the lack of portability is a price I'm willing to pay.
A Mac with a Windows license is the only kind of computer that can (legally) run all current applications for popular desktop operating systems, particularly proprietary applications that are Mac-exclusive or Windows-exclusive. Yet if we were to recommend switching to a Mac as the universal workaround to the lack of portability of desktop computer applications, this would give Apple a monopoly on the desktop computer market. Can I put you on record as believing that granting Apple such a monopoly "is a price I'm willing to pay"? If not, what did I misunderstand?
Sounds viable, but then I wonder why typescript isn't getting adopted.
I see several companies and frameworks (e.g. Angular 2.0) using typescript, but then devs and/or companies avoid those frameworks.
Perhaps you're not old enough to remember this, but browsers used to support Java and you could even embed languages like Tcl/Tk.
Unfortunately, this lacked the one thing browsers are good at: universality.