


De facto standard The incredible fact standard in the world_Basic knowledge
IEBlog mentioned a few days ago that achieving interoperability does not rely solely on standards, which cited some considerations about de facto standards - the so-called "de facto standards", that is, not Standard, but something that everyone follows to do things.
These de facto standards (also written as "De facto standards") are often formed by mutual compromise between the parties involved when there is no standard for a certain thing - interestingly, as a compromise As a result, these "de facto standards" themselves are often inconsistent with other things; and what is truly called a "standard" is often produced only after a lot of things have happened, so there are "de facto standards" almost everywhere. "standard" and "standard" feel a little out of place.
After talking nonsense for a long time, it’s time to get to the point:
In the blog post linked at the beginning of this article, a grammatical issue about regular expressions is mentioned:
Forms like "/]/", because "]" itself is part of the syntax of "match any of these characters", the ECMAScript standard marks such a form as an "invalid expression" ” - But at the same time, due to its simple composition, such usage is not easy to cause ambiguity in understanding, so in fact, it is considered “valid” in most browsers.
When the IE9 development team first started testing their new JavaScript engine "Chakra", they found that some JavaScript code that originally ran well could not run in "Chakra". One of the reasons was that the original "Chakra" It is implemented in accordance with the ECMAScript standard, and the old code contains many things like this that are invalid in the standard - to be compatible and "interoperable", "Chakra" needs to not only be consistent with the standard, but also can recognize such expressions.
This is a good example of "achieving interoperability requires more than standards alone".
In addition to this, there are some other de facto standards in JavaScript, such as:
In a string if a newline mark is entered after the backslash "", either [LF] ( actual meaning), or [CR] ( the actual meaning), or [CR][LF] ( n actually represents), will be completely ignored along with the backslash - saying "ignored" is not accurate enough, maybe it should be said "this combination will be considered as splitting a string across multiple lines of code" Something like that.
If you still find it hard to understand (or even inexplicable) after saying this, it should be easier to understand through some code examples.
For example, this code:
var s = "This is an
one line string.";
is actually the same as
var s = "This is an"
" one line string.";
Equivalent.
And if written as
var s = "This is an
one line string."
will generate a syntax error because of "unterminated string".
At the beginning, it was just a feature unique to the JScript engine used in IE, but now several major browsers support this writing method. As I just mentioned, it is also " One of the de facto standards.
I am very interested in talking more about "de facto standards", but unfortunately there are too many such things, and I only know a very small part of them - and I often can't remember them. , so I can only write here today. If I think of something again, I may write a new blog post

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











As the importance of PHP in Web development continues to increase, PHP function library design has become one of the key issues in development. A good function library can not only improve development efficiency, but also ensure code quality and maintainability. Therefore, designing function libraries needs to follow some basic principles and standards. 1. A function library with good reusability should be reusable and can be used in different projects. Therefore, functions should be abstract and general and cannot be tied to a specific project or scenario. 2. Ease of use The function library should be easy to use and pass parameters

PHP functions can be classified according to various criteria: purpose (string processing, array processing, etc.), scope (built-in functions, user-defined functions) and return value (with or without return value). Practical case: The explode() function can split a string into an array with a specified delimiter.

How to judge the criteria for sticky positioning? Revealing the key elements of sticky positioning Introduction: Sticky positioning, as a market positioning strategy, plays a vital role in corporate brand promotion and market competition. However, how to judge the criteria for sticky positioning is a headache. This article will reveal the key elements of sticky positioning and help companies better judge the criteria for sticky positioning. 1. Understand the significance of sticky positioning Sticky positioning means that an enterprise generates strong identification and loyalty among consumers through its unique brand characteristics and core competitive advantages, thus forming a

The standard of sticky positioning refers to the ability of a company or brand to occupy a fixed position in consumers' minds for a long time in market competition and to stably maintain market share and brand loyalty. Sticky positioning is an important concept in marketing. It emphasizes that in a fiercely competitive market environment, companies need to establish their own unique positioning and establish close relationships with consumers to maintain competitive advantages. The core requirements of sticky positioning include the following aspects: Uniqueness: The positioning of a company or brand in the market must be unique and different from competitors.

In web development, PHP is a widely used programming language. Its standard tags are special tag symbols in PHP code that are used to identify the beginning and end of PHP code. It is very important to have an in-depth understanding of PHP's standard tags because they directly affect the parsing and execution process of PHP code. This article will delve into PHP's standard tags and provide specific code examples to help readers better understand and use PHP programming. 1. PHP standard tags In PHP, the most commonly used standard tags are "

Recently, there has been increasing discussion about generative artificial intelligence tools, especially after the release of several large-scale language models and image generators such as DALL-E or Midjourney. These inventions have once again put general artificial intelligence (GPAI) under the spotlight and once again raised hypothetical questions such as whether GPAI should be regulated. Before one explores the possibilities further, first understand the concept of GPAI, what it means, when was it introduced, etc. What is general artificial intelligence? Two years ago, in April 2021, the European Commission launched general artificial intelligence. The original AI bill proposal exempted creators of general artificial intelligence from complying with a number of legal instruments and other liability standards. reason

Title: Does the Go language meet the standards of upper-level languages? In recent years, Go language, as an emerging programming language, has received widespread attention and application. As a statically typed, compiled language, the Go language has unique advantages in concurrent programming, memory management, and code readability. However, in the eyes of some programmers, it does not fully meet the standards that upper-level languages should have. This article will discuss whether the Go language meets the standards of the upper-level language from several aspects, and discuss it with specific code examples. 1. Code simplicity. Upper-level languages are usually

Sticky positioning is a common web layout technique that provides a better user experience by keeping elements in a fixed position as they are scrolled. This article will analyze the standards, elements, and requirements for sticky positioning, and provide specific code examples. 1. Standard compatibility of sticky positioning: Sticky positioning should work normally on mainstream browsers, such as Chrome, Firefox, Safari, etc. Scroll effect: Elements should transition smoothly when scrolling to avoid flickering or jittering. Responsive design: Sticky positioning should adapt to different devices and screen sizes to ensure
