The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



Вариант для распечатки  
Пред. тема | След. тема 
Форум Разговоры, обсуждение новостей
Режим отображения отдельной подветви беседы [ Отслеживать ]

Оглавление

Зафиксирована массовая атака на сайты с необновлённым движко..., opennews (??), 22-Сен-18, (0) [смотреть все]

Сообщения [Сортировка по времени | RSS]


46. "Зафиксирована массовая атака на сайты с необновлённым движко..."  +2 +/
Сообщение от Аноним (44), 22-Сен-18, 18:49 
Не совсем. Там, где другой язык ругнётся и вылетит (при сравнении тёплого с мягким), пых несмотря ни на что выдаст какой-то результат.
Ответить | Правка | Наверх | Cообщить модератору

47. "Зафиксирована массовая атака на сайты с необновлённым движко..."  +/
Сообщение от Аноним (47), 22-Сен-18, 19:29 
Какие кодеры, такой и результат.
Ответить | Правка | Наверх | Cообщить модератору

53. "Зафиксирована массовая атака на сайты с необновлённым движко..."  +1 +/
Сообщение от Аноним (53), 22-Сен-18, 23:47 
Раз ты такой умный, включи и заставь их исправить все.

display_errors = On
error_reporting = E_ALL | E_STRICT
display_startup_errors = On
track_errors = On

Ответить | Правка | К родителю #46 | Наверх | Cообщить модератору

68. "Зафиксирована массовая атака на сайты с необновлённым движко..."  +1 +/
Сообщение от Аноним (68), 23-Сен-18, 13:51 
>при сравнении тёплого с мягким

и в python и в php динамическая типизация допускающее сравнение теплого с мягким.
в php хотя бы есть статическая типизация для параметров функций, методов и их результата.

Ответить | Правка | К родителю #46 | Наверх | Cообщить модератору

72. "Зафиксирована массовая атака на сайты с необновлённым движко..."  +1 +/
Сообщение от Аноним84701 (ok), 23-Сен-18, 17:22 
>>при сравнении тёплого с мягким
> и в python и в php динамическая типизация допускающее сравнение теплого с мягким.

Внимане, сюрприз:


cat test.c && gcc -Wall -Wextra test.c -o tst && ./tst    
#include <stdio.h>
#include <stdbool.h>
int main(void) {
   printf("Hello, World!" + 'a' - 97 + true);
   return 0;
}
ello, World!

% python -c "print('Hello, World!' + 'a' - 97 + true)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for -: 'str' and 'int'

% python -c "print('97' + True)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'bool' objects


Слабая типизация != динамическая типизация
Сильная типизация != статическая типизация

Ваш КО

Ответить | Правка | Наверх | Cообщить модератору

81. "Зафиксирована массовая атака на сайты с необновлённым движко..."  +/
Сообщение от dq0s4y71 (ok), 25-Сен-18, 12:27 
"Strongly typed" and "weakly typed" are terms that have no widely agreed-upon technical meaning. Terms that do have a well-defined meaning are

    Dynamically typed means that types are attached to values at run time, and an attempt to mix values of different types may cause a "run-time type error". For example, if in Scheme you attempt to add one to true by writing (+ 1 #t) this will cause an error. You encounter the error only if you attempt to execute the offending code.

    Statically typed means that types are checked at compile time, and a program that does not have a static type is rejected by the compiler. For example, if in ML you attempt to add one to true by writing 1 + true, the program will be rejected with a (probably cryptic) error message. You always get the error even if the code might never be executed.

Different people prefer different systems according in part to how much they value flexibility and how much they worry about run-time errors.

Sometimes "strongly typed" is used loosely to mean "statically typed", and "weakly typed" is used incorrectly to mean "dynamically typed". A better use for the term "strongly typed" is that "you cannot work around or subvert the type system", whereas "weakly typed" means "there are loopholes in the type system". Perversely, most languages with static type systems have loopholes, while many languages with dynamic type systems have no loopholes.

None of these terms are connected in any way with the number of implicit conversions available in a language.

If you want to talk precisely about programming languages, it is best to avoid the terms "strongly typed" and "weakly typed". I would say that C is a language that is statically typed but that has a lot of loopholes. One loophole is that you can freely cast any pointer type to any other pointer type. You can also create a loophole between any two types of your choice by declaring a C union that has two members, one for each of the types in question.

https://stackoverflow.com/a/430414/8238971

Ответить | Правка | Наверх | Cообщить модератору

82. "Зафиксирована массовая атака на сайты с необновлённым движко..."  +/
Сообщение от Аноним84701 (ok), 25-Сен-18, 14:28 
> "Strongly typed" and "weakly typed" are terms that have no widely agreed-upon

Формально - да, неформально оно давно используется.
Подразумевается (при более-менее грамотном употреблении) под этим что-то типа "strong type checking" и соотв. "weak type checking". Естественно, детали спорны (но это много где так - та же "классика" типа "0 ∈ ℕ или все же 0 ∉ ℕ?").  
Возможно, лучше было переводить как "(не)строгая проверка типа", а не банальной калькой.

> https://stackoverflow.com/a/430414/8238971

Предпочтитаю таки учебные заведения в качестве источников ;)

https://cseweb.ucsd.edu/~wgg/CSE131B/oberon2.htm
> static typing with strong type checking

http://www.ocp.inf.ethz.ch/wiki/Documentation/Oberon ()
> Active Oberon Language
> strong-typed

https://www.cs.colorado.edu/~bec/courses/csci3155-s12/readin...


Definition: Strong type checking prevents all type errors from happening. The
checking may happen at compile time or at run time or partly at compile time and
partly at run time.
Definition: A strongly-typed language is one that uses strong type checking.
Definition: Weak type checking does not prevent type errors from happening.
Definition: A weakly-typed language is one that uses weak type checking.

Ответить | Правка | Наверх | Cообщить модератору

85. "Зафиксирована массовая атака на сайты с необновлённым движко..."  +/
Сообщение от dq0s4y71 (ok), 26-Сен-18, 11:44 
> Предпочтитаю таки учебные заведения в качестве источников ;)

Ну, чел, который это пишет, тоже не хрeн с горы. Вот его страничка на сайте учебного заведения, если вам так предпочтительно :) https://www.cs.tufts.edu/~nr/

Ответить | Правка | Наверх | Cообщить модератору

Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру