Tuesday, August 08, 2006

Compiling to JavaScript

Treating JavaScript as a back-end for a compiler is becoming more and more popular. Here are some examples of compilers that already target JavaScript:
This has come up in some of the ECMA-TG1 discussions, and I think some of Edition 4 will help compiler writers, in particular proper tail calls. On the other hand, I'm not sure whether "compiling X to JavaScript" is always a priori a net gain.

Some of these compilers are more toys than anything else: people always get a kick out of translating idioms between languages. That's fun, if a little boring after a while. But a lot of these tools are aiming at building abstractions for web programming, which is much more ambitious.

If you can properly build an abstraction on top of the many incompatibilities and low-level details of web platforms, then the abstraction is probably appropriate. But without a model for the "ideal" behavior of web browsers as approximated by each of the real ones, then the abstraction is likely to be either crippled or flawed. In this case, adding this layer of indirection may actually be maddeningly difficult to work with when it fails. If it's too simplistic, you'll eventually have to give up and drop down to the lower layer. This might be fine, if there are "trap doors" -- such as a foreign interface to JavaScript -- that allow the programmer to dip into the lower level when necessary. But if the abstractions have flaws in them, debugging will have become worse than before, because it involves debugging through the extra level of abstraction, wading through generated code, understanding the compatibility layer, etc.

I still think these abstractions are an important goal, but the hard part isn't the compilers. It's understanding the models, i.e., the implicit specifications for web browsers. Apparently Ian Hickson has done a lot of great work compiling empirical data about the behavior of existing web browsers to infer the implicit specs for web standards. This kind of work is messy and tedious, but important.

22 comments:

Anonymous said...

Pugs, the Perl 6 compiler, is also targetting JavaScript.

Unknown said...

You could add sml to your list

Unknown said...

Something went wrong, here is the link:

http://www.itu.dk/people/mael/smltojs/

Artem said...

Don't forget Haskell Javascript backend: http://haskell.org/haskellwiki/Yhc

Ruby on Rails Consultants said...

This isn't working
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html
404 Not Found

Gangathara said...

Car rental Software
A car rental or car hire agency is a company that rents automobiles for short periods of time for a fee. It is often organized with numerous local branches, and primarily located near airports or busy city areas and often complemented by a website allowing online reservations.
Retailing Software
Retail software is computer software typically installed on PC-type computers or more recently delivered via the Internet. Traditionally this software was delivered via physical data storage media sold to end consumer but very few companies still provide their software using physical media.
Business-consultancy-service
A business consultant is a professional who provides professional or expert advice in a particular area such as security, management, accountancy, law, human resources, marketing, finance, engineering, science, digital transformation or any of many other specialized fields

yuva said...


ecommerce app development companies

Ecommerce development companies keep various points into consideration to deliver the best ecommerce web or app to suit your business requirements. They are the experts backed by years of experience & expertise in this field to deliver such complex project flawlessly

ranjani said...

Construction Management Software

To own construction business is not an easy deal as it involves high risks and good management skills to ensure the project is completed according to the draft plan. A mindset, proper tools, and some experience are required to tackle the business tasks. With the overabundance of engaging duties, as a construction manager, it becomes tiring to deal with a giant heap of responsibilities. But the right technological tool can make it all simple for you.


candy said...

Digital Workplace Software

The digital workplace is a central working environment that employees can access from anywhere and at any time – whether they’re on the train, in their home office or at the beach. All data is stored in one location and can be accessed quickly and easily. Your employees are freer to determine when and how they work and therefore more efficient. Discover the digital workplace for your company.

candy said...

POS Billing Software

A POS billing system, or commonly known as a Retail POS Software is a billing software for retail stores to manage the store. It generates invoices, accepts payments, manages stock, inventory, and the customer database.

josh said...

Law practice management software

A modern law firm needs a reliable system for managing client matters. Most use Law Practice Management Software (LPMS) for this. The options run from streamlined law-firm productivity software to all-in-one law firm marketing and business management software to software that can be integrated with other software and code for a client service technology stack customized to your firm’s specific needs.
Often, your choice of LPMS systems will hinge on the type of law you practice, the software your firm uses, and your comfort with adjusting the software to your needs. For example, most of the legal management systems included in these reviews integrate with Office 365, and Google’s G Suite products. However, you’ll want to confirm that (among other integrations) prior to purchase

josh said...

Parks and recreation software

The recreation software streamlines the management of your operations, which reduces back-office tasks, increases efficiency, and boosts revenue all in one place. The software programs are made up of comprehensive modules equipped with a wide variety of features to cover any and every recreational need.

candy said...

Printing packaging industry software

Maximising economies-to-scale, highest machine allocation and supplies control are some of the challenges the print and packaging sector face. Firms also need to be innovative over minimising waste due to the growing concerns from consumers over environmental issues. With all the different challenges the printing and packaging industry face, managers need to have a complete view of the business.

ranjani said...

Construction crm software

Most customer relationship management platforms are multi-purpose. They can be used for a range of business applications, including construction work. But some are built specifically for the industry.
Over the past decade, the CRM market has grown roughly 8 times larger. Web-based CRM systems have become cheaper, better, and easier to implement. A small business can now use one and enjoy real results.

mahi said...

Customer experience management software

Experience management software allows businesses to measure customer impressions through feedback, seeing how that feedback relates to the business metrics, and analyzing them as one.

rohit said...

Patient case management software

Unlike electronic medical records (EMRs) and electronic health records (EHRs), patient management systems help clinicians provide value-based care by improving patient engagement and nurturing patient-provider relationships.

ranjani said...

Hardware and paint store software

Successfully manage your sales, your special orders, your customers, your inventory, and your accounting - Aralco POS Software is designed for Paint, Hardware and Auto Parts Stores.
These stores of all sizes can benefit from the Aralco point of sale system because they automate virtually every part of the business for you.
Aralco POS software boosts efficiency and productivity in your store environment and allows you to ring up items quickly and easily, manage time and inventory and develop customer loyalty. Aralco POS software allows you to keep the real-time inventory of all kinds of products from paint cans to the copper wire by the meter.

rohit said...

Builder CRM software

Our CRM is a tool that allows you to capture, organize, collaborate, follow-up, and access critical data from anywhere.
In other words, it helps keep all your company information organized and secure. Which means your entire company is on the same page and working together in unison.

John Fei said...

Java advancement innovation is a programming language that permits creating applications beginning from your cell phone to logical working frameworks. As the computerized world is acquiring force, numerous organizations grade to an offshore advancement model to enlist their Java engineers abroad. Since first experience with the IT world in 1995, offshore Java improvement administrations have been demonstrated as the most dependable, quick, and secure innovation for applications and site creation. Official measurements show that starting at 2019, the world's number of programmers hit 24 million and anticipated to grow up to 29 million constantly 2029. Talking about explicitly Java engineers, the number has been quickly expanding since 2003; as indicated by Evans Data Corporation, in 2003 the world saw around 1.5 million Java offshore designers, in 2007 – 6 million, and nowadays the number goes up to 7 million subject matter experts. The vital motivations to employ Java engineer offshore incorporate decreased work costs, advantageous participation, and quality administrations. From top Fortune 100 organizations to SMEs, associations see boundless freedoms by appointing their ventures to a Java offshore group. Walk 2020 constrained the greater part of the organizations to move representatives on the far off model of working because of the COVID-2019 flare-up. In light of this, organizations that haven't applied an offshoring model of recruiting engineers will consider reevaluating as an approach to keep their tasks from falldowns later on.

Anonymous said...

Thanks to all of you for the advice and for the tutorial, this is exactly what I need. By the way, I recently found an interesting website that tells about where and how to hire Rnakt developers, because today it is very difficult to find a really worthwhile specialist among many. There are a lot of programmers' resumes posted on that site, so you can try yourself.

Daniel Lisa said...

One such issue that torments QuickBooks is the QuickBooks Won't Open Error. It is an error that limits the client from opening the QB work area software. Luckily, you have arrived on the right page. In this post, we will encourage you how to destroy my QuickBooks won't open error .

DarenTill said...

Hi friends! I want to tell you about one very cool email marketing outsourcing company that I have been cooperating with for a long time, and I am very pleased with the results that I got from them. The team consists of cool specialists who will help you improve the quality of your marketing. They will conduct a detailed analysis and point out the mistakes that you have made. This will help you become more popular in the market!