Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8576119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:51:13+00:00 2026-06-11T19:51:13+00:00

When a programming language is statically typed, the compiler can be more precise about

  • 0

When a programming language is statically typed, the compiler can be more precise about memory allocation and thus be generally more performant (with all other things equal).

I believe ES4 introduced optional type hinting (from what I understand, Adobe had a huge part in contributing to its spec due to actionscript). Does javascript officially support type hinting as a result? Will ES6 support optional type hinting for native variables?

If Javascript does support type hinting, are there any benchmarks that show how it pays off in terms of performance? I have not seen an open source project use this yet.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:51:15+00:00Added an answer on June 11, 2026 at 7:51 pm

    My understanding, from listening to many Javascript talks on the various sites, is that type-hinting won’t do as much to help as people think it will.

    In short, most Javascript objects tend to have the same “shape”, if you will. That is, they will have the same properties created in the same order. This “shape” can be thought of as the “type” of the object.
    An example:

    function Point(x, y) {
      this.x = x;
      this.y = y;
    }
    

    All objects made from “Point” will have the same “shape” and the newer internal Javascript engines can do some fancy games to get faster lookup.

    In Chrome (perhaps others), they use a high-bit flag to indicate if the rest of the number is an integer or a pointer.

    With all of these fancy things going on, that just leaves typing for the human coders. I, for one, really like not having to worry about type and wouldn’t use that feature.

    You are semi-correct, though. Type hinting is a part of ActionScript 3 which is a derivative of ECMAScript — but hinting has never made it into the standard. AFAIK, outside of wishful thinking, it hasn’t been discussed.

    This video describes things in far more detail:
    http://www.youtube.com/watch?v=FrufJFBSoQY

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a programming experience with statically typed languages. Now writing code in Python
Which programming language would you recommend to learn about data structures and algorithms in?
I come from a statically/strongly typed language background (java), and I recently started to
Which programming language and tools can i use, to develope a complete stand-alone gui-application?
In The C++ Programming Language (3rd) p.255: A temporary can be used as an
programming language: C platform: ARM Compiler: ADS 1.2 I need to keep track of
Every programming language has advantages and disadvantages which make it more suitable to a
This is not programming language specific. I just need to understand how can I
Is there a programming language suitable for building web applications, that is compiled, strongly-typed,
I haven't used a statically typed language in many years and have set myself

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.